Skip to content
Docs menuWorking with your agent

Working with your agent

Your repo ships with files that teach Claude Code, Cursor, GitHub Copilot and Windsurf how it is built.

Last updated November 1, 2026

Agent files

AGENTS.md and CLAUDE.md are written for the exact modules you generated, so your agent starts with the right context. Each module adds a block to both files that points to its guide in .tailar/agent/<module>/MODULE.md.

Agent files in a saas-ai app
├─ AGENTS.md
├─ CLAUDE.md
├─ SETUP.md
├─ .tailar/agent/<module>/MODULE.md
├─ .cursor/rules/*.mdc
├─ .windsurf/rules/*.md
├─ .github/instructions/*.instructions.md
├─ .claude/skills/<skill>/SKILL.md
├─ lib/ai/AGENTS.md
├─ lib/payments/AGENTS.md
└─ lib/storage/AGENTS.md
  • What each module does and where its code lives
  • Rules to follow: server components by default, access to the database only through its singleton, user-facing text in messages/*.json, design tokens instead of raw colours
  • Which files depend on what is installed, and when to run tailar sync
  • Rules only for the modules you actually installed
AGENTS.md
<!-- tailar:begin payments -->
## Payments
Subscription billing behind a provider seam: plans, checkout, portal, and webhooks that write one neutral schema.
Read `.tailar/agent/payments/MODULE.md` before changing files matching: `**/lib/payments/**`, ...
<!-- tailar:end payments -->

Text between the tailar:begin and tailar:end markers is owned by Tailar and rewritten by tailar add and tailar sync. Anything you write outside the markers is never touched.

Rules and skills

Rules keep your agent on convention. Skills teach it a repeatable change. Skills ship with the module they belong to:

SkillModuleWhat it does
add-billing-providerpaymentsAdds a billing provider adapter and its webhook route for a vendor other than Stripe, Lemon Squeezy or Paddle
migrate-legacy-paymentspaymentsMoves an app generated with the earlier Stripe-shaped payments module to the provider-neutral schema, before running tailar sync payments
add-storage-scopestorageAdds a named upload area with its own size limit, allowed types and access rule

Write your own: add a folder with a SKILL.md under .claude/skills. Claude Code picks it up on its next run. The other modules, database, email, auth, AI and i18n, have rules but no skills yet.

Prompt recipes

Copy a prompt, paste it into your agent and review the diff. The rules in your repo tell it where things live.

Add a plan
Add a Team plan at $99 a month. Add it to lib/payments/plans.ts, create the price in my billing provider and add its environment variable, update the pricing UI and the feature gates. Run typecheck and tests.
Add a page
Add a changelog page at /changelog. Put its copy in messages/*.json, link it from the navigation and add metadata. Follow .cursor/rules.
Add a storage scope
Use the add-storage-scope skill to add an invoices scope: PDF only, 5 MB, owner-only.
Swap a provider
Switch email from Resend to Postmark: run tailar sync emails --provider postmark, then update my .env and check that sending still works.