Agent skill
xero_connection_management
Install this agent skill to your Project
npx add-skill https://github.com/CleanExpo/ATO/tree/main/docs-backup-20260213-150302/.agent/skills/xero_connection_management
SKILL.md
Xero Connection Management Skill
Description
This skill focuses on the end-to-end setup and maintenance of the Xero OAuth 2.0 connection. It ensures that the application is correctly registered in the Xero Developer Portal, environment variables are synchronized across local and production (Vercel), and the authentication flow is robust.
Connection Requirements
1. Xero Developer Portal Configuration
- App Type: Web App
- Redirect URIs:
- Local:
http://localhost:3000/api/auth/xero/callback - Production:
https://ato-git-main-unite-group.vercel.app/api/auth/xero/callback
- Local:
- Scopes Required:
offline_access(Required for refresh tokens)openid(Required for identity)profile(Required for user profile)email(Required for user email)accounting.transactions.readaccounting.reports.readaccounting.contacts.readaccounting.settings.read(Optional but recommended)
2. Environment Variables
XERO_CLIENT_ID: The unique identifier for your Xero app.XERO_CLIENT_SECRET: The secret key generated in Xero.NEXT_PUBLIC_BASE_URL: Must match the environment (localhost or Vercel URL).
3. Database Sync
- Connections must be stored in the
xero_connectionstable in Supabase. - Table schema includes
tenant_id,access_token,refresh_token, andexpires_at.
Standard Procedures
Setup New App
- Create app in Xero Dev Portal.
- Configure Redirect URIs.
- Generate Client Secret.
- Update
.env.localand Vercel Environment Variables. - Restart development server.
- Initialize connection from
/dashboard.
Troubleshooting Connection
- Verify Redirect URI exact match (case sensitive, trailing slashes).
- Check
SESSION_SECRETis set. - Verify
xero-nodeSDK version compatibility. - Check Xero system status.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
ato-rate-scraping
Automated scraping and extraction of current Australian tax rates from ATO.gov.au and related government sources
rate_limiter
payg-instalment-optimization
PAYG instalment strategy analysis — amount vs rate method, variation penalty risk, GDP adjustment
idea-queue-capture
Instantly capture user ideas to work queue with intelligent grouping
simple-report-export
Simple report generation without Google Cloud - uses Gmail App Password or local file export (PDF, Excel, Word-compatible formats)
cashflow-forecasting
Project future tax obligations and cash flow requirements based on historical transaction patterns
Didn't find tool you were looking for?