Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/doancan/mags/api-lifecyclenpx skills add doancan/mags --skill api-lifecyclegit clone --depth 1 https://github.com/doancan/magsWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00058 | $0.03015 |
| Opus 5 | $0.00029 | $0.01507 |
| Sonnet 5 | $0.00012 | $0.00603 |
| Haiku 4.5 | $0.00006 | $0.00301 |
Grade A, and why
api-lifecycle scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 203 lines — stays where its author put it; the contents beside it link to each section on GitHub.
API Lifecycle
API Design Principles
- Resource-oriented design: Model APIs around resources (nouns), not actions (verbs). Use
GET /orders/123notGET /getOrder?id=123. Nest sub-resources logically:GET /users/123/orders. Keep nesting to a maximum of two levels. - Idempotency: GET, PUT, and DELETE must be idempotent. Repeated calls produce the same result. For POST (create) operations, support client-provided idempotency keys (
Idempotency-Keyheader) to prevent duplicate resource creation on retries. - Stateless requests: Every request must contain all information needed to process it. Do not store client session state on the server between requests. Use tokens (JWT, opaque) for authentication context.
- Pagination: Always paginate list endpoints. Choose the appropriate strategy:
- Cursor-based (recommended): Use an opaque cursor token. Best for real-time data, large datasets, and when items can be inserted/deleted between pages. Return
next_cursorin the response. - Offset-based: Use
?offset=20&limit=10. Simpler to implement but has consistency issues with changing datasets. Acceptable for admin UIs and static data. - Always include
total_count(or indicate if more pages exist),nextlink, and the current page size in the response.
- Cursor-based (recommended): Use an opaque cursor token. Best for real-time data, large datasets, and when items can be inserted/deleted between pages. Return
- Consistent naming: Use snake_case for JSON fields (
created_at, notcreatedAt). Use plural nouns for collection endpoints (/users, not/user). Use kebab-case for URL paths (/order-items, not/orderItems). Be consistent across the entire API. - HTTP methods and status codes: Use methods correctly: GET (read), POST (create), PUT (full replace), PATCH (partial update), DELETE (remove). Return appropriate status codes: 200 (success), 201 (created), 204 (no content), 400 (bad request), 401 (unauthorized), 403 (forbidden), 404 (not found), 409 (conflict), 422 (unprocessable entity), 429 (rate limited), 500 (server error).
Versioning Strategies
| Strategy | Format | Pros | Cons | Best For |
|---|---|---|---|---|
| URL path | /v1/users, /v2/users |
Explicit, easy to route, easy to document, cacheable | URL pollution, clients must update all URLs | Public APIs, APIs with infrequent breaking changes |
| Header | Accept: application/vnd.api+json;version=2 |
Clean URLs, version is metadata not resource identity | Harder to test in browser, less discoverable | Internal APIs, APIs with frequent version changes |
| Query parameter | /users?version=2 |
Easy to add, backward-compatible | Breaks caching, pollutes query string, easy to forget | Quick prototyping, transitional use only |
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 203 lines · 58 tokens per session scan A 52d0939dbb5a
api-lifecycle is a skill published in the GitHub repository doancan/mags (3 stars, last pushed 6mo ago), licensed MIT. It adds 58 tokens to every session and 3,015 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.
chat-pet-sprite-creation
Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.
cpu-profile-analysis
Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…
agent-host-chat-contributions
Build and review cross-cutting agent-host chat behavior through lifecycle contributions. Use when adding turn lifecycle side effects, prompt or context injection, restored-history transformation, protocol-action observation, or when reviewing changes that add code to AgentSideEffects or AgentService.
auto-perf-optimize
Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.