Skip to content

docs: Add Instructions section to llms.txt for AI coding assistants#571

Open
anhtho-lago wants to merge 1 commit into
mainfrom
add-llms-txt-instructions
Open

docs: Add Instructions section to llms.txt for AI coding assistants#571
anhtho-lago wants to merge 1 commit into
mainfrom
add-llms-txt-instructions

Conversation

@anhtho-lago
Copy link
Copy Markdown

Summary

  • Adds a custom llms.txt that overrides Mintlify's auto-generated version
  • Prepends an Instructions section (inspired by Stripe's pattern) that tells AI coding assistants the correct Lago integration flow
  • Covers: auth, the billable metric → plan → customer → subscription → events sequence, idempotency, batch events, payment providers, wallets, webhooks, and pricing models

Why

AI coding assistants (Cursor, Copilot, Claude) are becoming the primary way developers discover and integrate billing APIs. Without behavioral guidance in llms.txt, they guess the integration order and often get it wrong — e.g., creating events before creating a billable metric.

Stripe already does this and it dramatically improves generated code quality.

Test plan

  • Verify docs.getlago.com/llms.txt serves the custom file (not the auto-generated one) after deploy
  • Test in Cursor: "Set up usage-based billing with Lago in Python" — should follow the correct flow
  • Test in Claude: "Push metering events to Lago API" — should include idempotency key

Note

The custom file includes all existing auto-generated page links so nothing is lost. The only addition is the blockquote description + Instructions section at the top.

🤖 Generated with Claude Code

Adds a custom llms.txt that overrides Mintlify's auto-generated version
with an Instructions section at the top. This tells AI coding assistants
(Cursor, Copilot, Claude) the correct Lago integration flow — authentication,
the billable metric → plan → customer → subscription → events sequence,
idempotency keys, batch events, payment provider configuration, and webhooks.

Inspired by Stripe's llms.txt pattern. Without behavioral guidance, AI
assistants guess the integration order and often get it wrong.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@mintlify
Copy link
Copy Markdown
Contributor

mintlify Bot commented Apr 14, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
lago 🟢 Ready View Preview Apr 14, 2026, 5:59 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant