Docs/AI Skill

AI Skill

One file

Give your AI coding assistant full knowledge of Astapa's APIs, auth flow, JWT shape, and code patterns. One markdown file — works with Kiro, Cursor, Copilot, or any tool that supports context files.

What the skill teaches your AI

Instead of pasting docs into every conversation, the skill file gives your AI assistant permanent context about Astapa:

OAuth 2.0 flow

Redirect → callback → token exchange → JWT verification. The full sequence, not just snippets.

Every API endpoint

Token, claims, revoke, userinfo, plans, user lookup, orgs — with request/response shapes.

JWT payload shape

Knows where sub, email, custom_claims, and org fields live in the token.

Security rules

httpOnly cookies, CSRF state parameter, server-side secrets — baked into every code suggestion.

Sandbox mode

Auto-detects environment based on which client secret is used. No env flag needed.

Ready-to-use patterns

TypeScript snippets for every integration step — callback handlers, middleware, feature gating.

Add to Kiro

Download the skill file into your project's .kiro/skills/ directory. Kiro loads it automatically on every conversation.

terminalbash
curl -o .kiro/skills/astapa-integration.md https://astapa.com/api/skill
Auto-loaded
Kiro reads all files in .kiro/skills/ as context. No configuration needed — just drop the file and go.

Add to Cursor

Save the file as a Cursor rule in your project root. Cursor picks it up as persistent context for all conversations in the project.

terminalbash
mkdir -p .cursor/rules
curl -o .cursor/rules/astapa-integration.mdc https://astapa.com/api/skill

Add to any AI assistant

The skill file is plain markdown. Paste it into any AI assistant's context window, system prompt, or project knowledge base — ChatGPT, Claude, Gemini, whatever you use.

What your AI can do after

With the skill loaded, your AI assistant will:

→
Generate correct OAuth callback handlers

With CSRF state validation, token exchange, and httpOnly cookie storage

→
Write JWT verification middleware

Using JWKS endpoint with proper caching and RS256 verification

→
Implement feature gating with custom claims

Reading plan and claims from the JWT to show/hide features

→
Set up token refresh logic

Silent refresh before expiry, proper error handling for revoked tokens

→
Use the correct env variables and API paths

No more guessing — the skill includes every URL, header, and variable name

Always up to date
Re-run the curl command periodically to get the latest skill file. We update it whenever we ship new APIs or change existing ones.

Next steps

API Playground
Click "Try it" on any endpoint to get started.
AI Skill — Astapa Docs | Astapa