$git clone https://github.com/XeroAPI/xero-prompt-libraryA comprehensive collection of prompts and agent skills designed for use with Large Language Models (LLMs) and AI coding tools to develop applications and integrations with the Xero API.
| 1 | # Xero Prompt Library |
| 2 | |
| 3 | A comprehensive collection of prompts and agent skills designed for use with Large Language Models (LLMs) and AI coding tools to develop applications and integrations with the Xero API. |
| 4 | |
| 5 | ## Overview |
| 6 | |
| 7 | This repository contains carefully crafted prompts and skills that help developers quickly bootstrap projects and build integrations with Xero's accounting API. Each prompt provides detailed specifications, requirements, and guidance for creating specific types of applications across various programming languages and frameworks. |
| 8 | |
| 9 | **What's new:** The library now includes **agent skills** — deep, production-oriented guides for Xero OAuth, token management, scopes, and API gotchas — alongside the original project bootstrap prompts. Skills are organized by platform and cover both **single-account** (one Xero org you own) and **multi-account** (each end user connects their own Xero) integration patterns. |
| 10 | |
| 11 | ## How to Use |
| 12 | |
| 13 | ### Project prompts (`.txt` files) |
| 14 | |
| 15 | 1. **Browse the collection** — Navigate through the organized folders to find prompts that match your project needs. |
| 16 | 2. **Copy the prompt** — Open the `.txt` file (or a `2026-prompt-template-*` file) containing the prompt you want to use. |
| 17 | 3. **Paste into your AI tool** — Copy the entire prompt and paste it into your preferred IDE with AI capabilities (Cursor, GitHub Copilot, ChatGPT, Claude, Lovable, Replit, etc.). |
| 18 | 4. **Follow the AI's guidance** — Let the AI tool guide you through building your Xero integration. |
| 19 | |
| 20 | ### Prompt templates (`2026-prompt-template-*`) |
| 21 | |
| 22 | Use these as starting scaffolds when building a new app on a specific platform. Fill in the bracketed placeholders (`[APP_NAME]`, `[INSERT YOUR SPECIFIC APP FEATURES HERE]`, scopes, pages, design, etc.) before pasting into your AI tool: |
| 23 | |
| 24 | - `lovable/2026-prompt-template-lovable` — TanStack Start + Lovable Cloud |
| 25 | - `replit/2026-prompt-template-replit` — Node.js/Express + React/Vite on Replit |
| 26 | |
| 27 | ### Agent skills (`SKILL.md`) |
| 28 | |
| 29 | Skills are long-form integration guides meant to be loaded by AI agents that support the skill format. They cover OAuth 2.0 + PKCE, encrypted token storage, granular scope selection, refresh rotation, idempotent writes, rate limits, and other production gotchas. |
| 30 | |
| 31 | **Single-account vs multi-account:** Most platforms offer two skill variants: |
| 32 | |
| 33 | | Pattern | When to use | |
| 34 | | --- | --- | |
| 35 | | **Single-account** | One Xero org that *you* own — internal tools, single-merchant stores, prototypes | |
| 36 | | **Multi-account** | Multi-tenant SaaS where *each end user* connects their own Xero organisation | |
| 37 | |
| 38 | ## Claude Code skills |
| 39 | |
| 40 | [Claude Code](https://docs.anthropic.com/en/docs/claude-code) can load skills from this repository to guide multi-tenant Xero integrations in Python and JavaScript/TypeScript. Add the skill files to your project's skills directory, or reference them directly when prompting. |
| 41 | |
| 42 | | Skill | Path | Stack | |
| 43 | | --- | --- | --- | |
| 44 | | **Multi-tenant Xero (Python)** | [`python/SKILL.md`](python/SKILL.md) | `xero-python` + Authlib — Flask, FastAPI, Django, etc. | |
| 45 | | **Multi-tenant Xero (JavaScript/TypeScript)** | [`javascript/SKILL.md`](javascript/SKILL.md) | `xero-node` — Node.js, Next.js, Express, etc. | |
| 46 | |
| 47 | Both skills cover the full OAuth2 + PKCE lifecycle, per-user encrypted token storage, refresh/rotation, tenant selection, the March 2026 granular scope migration, and production API gotchas. Each skill also explains when **not** to use multi-tenant (and points to the simpler single-org Custom Connection approach instead). |
| 48 | |
| 49 | For Lovable and Replit projects, use the platform-specific skills in those folders (see below) rather than the generic Python/JavaScript skills. |
| 50 | |
| 51 | ## Repository Structure |
| 52 | |
| 53 | The library is organized by programming language and platform. Each folder may contain project prompts (`.txt`), prompt templates, and/or integration skills. |
| 54 | |
| 55 | ### 📁 **python/** |
| 56 | |
| 57 | - [`SKILL.md`](python/SKILL.md) — **Claude Code skill:** multi-tenant Xero integration (`xero-python` + Authlib) |
| 58 | - `ecommerce-python-dja |