git clone https://github.com/Athe1st3154/awesome-claude-skills-cn
T=$(mktemp -d) && git clone --depth=1 https://github.com/Athe1st3154/awesome-claude-skills-cn "$T" && mkdir -p ~/.claude/skills && cp -r "$T/composio-skills/xero-automation" ~/.claude/skills/athe1st3154-awesome-claude-skills-cn-xero-automation && rm -rf "$T"
composio-skills/xero-automation/SKILL.mdXero Automation
Automate Xero accounting operations including managing invoices, contacts, payments, bank transactions, and chart of accounts for small business bookkeeping.
Toolkit docs: composio.dev/toolkits/xero
设置
This skill requires the Rube MCP server connected at
https://rube.app/mcp.
Before executing any tools, ensure an active connection exists for the
xero toolkit. If no connection is active, initiate one via RUBE_MANAGE_CONNECTIONS.
Multi-tenant: If you manage multiple Xero organizations, first call
XERO_GET_CONNECTIONS to list active tenants and obtain the correct tenant_id for subsequent calls.
Core Workflows
1. List and Filter Invoices
Retrieve invoices with filtering by status, contact, date range, and pagination.
Tool:
XERO_LIST_INVOICES
Key Parameters:
-- Comma-separated status filter:Statuses
,"DRAFT"
,"SUBMITTED"
,"AUTHORISED""PAID"
-- Comma-separated Contact IDs to filter byContactIDs
-- Comma-separated Invoice IDs to filter byInvoiceIDs
-- OData-style filter, e.g.,where"Status==\"AUTHORISED\" AND Total>100"
-- Sort expression, e.g.,order
,"Date DESC""InvoiceNumber ASC"
-- Page number for paginationpage
-- UTC timestamp; returns only invoices modified since this dateIf-Modified-Since
-- Xero organization ID (uses first tenant if omitted)tenant_id
Example:
Tool: XERO_LIST_INVOICES Arguments: Statuses: "AUTHORISED,PAID" order: "Date DESC" page: 1
2. Manage Contacts
Retrieve and search contacts for use in invoices and transactions.
Tool:
XERO_GET_CONTACTS
Key Parameters:
-- Case-insensitive search across Name, FirstName, LastName, Email, ContactNumbersearchTerm
-- Fetch a single contact by IDContactID
-- OData filter, e.g.,where"ContactStatus==\"ACTIVE\""
,page
-- Pagination controlspageSize
-- Sort, e.g.,order"UpdatedDateUTC DESC"
-- Include archived contacts whenincludeArchivedtrue
-- Lightweight response whensummaryOnlytrue
Example:
Tool: XERO_GET_CONTACTS Arguments: searchTerm: "acme" page: 1 pageSize: 25
Note: On high-volume accounts, some
filters (e.g.,where,IsCustomer) may be rejected by Xero. Fall back toIsSupplieror pagination.searchTerm
3. Create Payments
Link an invoice to a bank account by creating a payment record.
Tool:
XERO_CREATE_PAYMENT
Key Parameters:
(required) -- Xero Invoice ID the payment applies toInvoiceID
(required) -- Bank account ID for the paymentAccountID
(required) -- Payment amount (number)Amount
-- Payment date inDate
formatYYYY-MM-DD
-- Payment reference or descriptionReference
-- Exchange rate for foreign currency paymentsCurrencyRate
Example:
Tool: XERO_CREATE_PAYMENT Arguments: InvoiceID: "a1b2c3d4-e5f6-7890-abcd-ef1234567890" AccountID: "b2c3d4e5-f6a7-8901-bcde-f12345678901" Amount: 1500.00 Date: "2026-02-11" Reference: "Payment for INV-0042"
4. Create Bank Transactions
Record spend (payments out) or receive (money in) bank transactions.
Tool:
XERO_CREATE_BANK_TRANSACTION
Key Parameters:
(required) --Type
(payment out) or"SPEND"
(money in)"RECEIVE"
(required) -- Xero Contact IDContactID
(required) -- Bank account code from chart of accountsBankAccountCode
(required) -- Array of line items, each with:LineItems
(required) -- Line item descriptionDescription
(required) -- Unit priceUnitAmount
(required) -- Account code for categorizationAccountCode
-- Quantity (default 1)Quantity
-- Tax type:TaxType
,"OUTPUT"
,"INPUT""NONE"
-- Transaction date inDate
formatYYYY-MM-DD
-- Transaction referenceReference
--Status
or"AUTHORISED""DELETED"
-- e.g.,CurrencyCode
,"USD""EUR"
Example:
Tool: XERO_CREATE_BANK_TRANSACTION Arguments: Type: "SPEND" ContactID: "a1b2c3d4-e5f6-7890-abcd-ef1234567890" BankAccountCode: "090" LineItems: [ { "Description": "Office supplies", "UnitAmount": 75.00, "AccountCode": "429", "Quantity": 1, "TaxType": "INPUT" } ] Date: "2026-02-11" Reference: "Feb office supplies"
5. List Payments and Bank Transactions
Review existing payments and bank transaction history.
Tools:
-- List payments linking invoices to bank transactionsXERO_LIST_PAYMENTS
-- List spend/receive bank transactionsXERO_LIST_BANK_TRANSACTIONS
Common Parameters:
-- OData filter, e.g.,where"Status==\"AUTHORISED\""
-- Sort expression, e.g.,order"Date DESC"
-- Page number for paginationpage
-- Incremental updates since timestampIf-Modified-Since
-- Organization IDtenant_id
6. View Chart of Accounts and Connections
Tools:
-- Retrieve all account codes for categorizing transactionsXERO_LIST_ACCOUNTS
-- List active Xero tenant connectionsXERO_GET_CONNECTIONS
-- List attachments on an entity (invoice, contact, etc.)XERO_LIST_ATTACHMENTS
已知陷阱
| Pitfall | Detail |
|---|---|
| Multi-tenant routing | If is omitted, the first connected tenant is used. Always verify the correct tenant with when managing multiple organizations. |
| High-volume filter rejection | On large accounts, some filters like / may be rejected. Fall back to with pagination. |
| OData filter syntax | Use double-equals () in OData filters, e.g., . Single causes errors. |
| Pagination required | Most list endpoints paginate results. Always check for additional pages and continue fetching until complete. |
| Date format | All dates must be in format. Timestamps for must be full ISO 8601 UTC datetime. |
| Bank account codes | in bank transactions must match a valid code from the chart of accounts. Use to discover valid codes. |
快速参考
| Tool Slug | Description |
|---|---|
| List invoices with filtering and pagination |
| Retrieve and search contacts |
| Create a payment linking invoice to bank account |
| Record a spend or receive bank transaction |
| List payment records |
| List bank transactions |
| Retrieve chart of accounts |
| List active Xero tenant connections |
| List attachments on an entity |
由 Composio 提供支持