بنقرة واحدة
api-contract-init
Generate API_CONTRACT.md by scanning existing routes and controllers
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Generate API_CONTRACT.md by scanning existing routes and controllers
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Compresser une session de debug en cours et produire un prompt forensique strict (donnees -> hypothese unique -> test decisif -> STOP). A utiliser quand un debug long ou complexe derive vers la speculation, ou quand le contexte de la conv est sature et qu'il faut basculer sur une session vierge sans perdre les eliminations deja faites.
Switch to supervisor/CTO mode — plan, delegate to workers, never write code directly
Auto-bootstrap codebase indexing in any project. Detects the stack, dispatches to the native installer if supported (Dart in v0.1), or generates a stack-appropriate indexer with strict guardrails (official AST parser, format contract, auto-validation, refinement loop) for TypeScript, Python, Go, or Rust.
Switch to expert-comptable / fiscaliste mode — optimisation fiscale FR, structuration de societes, expatriation, patrimoine
Check if API_CONTRACT.md is in sync with the actual code
Deep code audit — security, tests, architecture, performance, stack-specific checks
| name | api-contract-init |
| description | Generate API_CONTRACT.md by scanning existing routes and controllers |
| argument-hint | ["shared|root — where to create the file"] |
Generate an API_CONTRACT.md by scanning the real codebase. Never fabricate endpoints or types.
| File | Stack |
|---|---|
package.json with @nestjs/core | NestJS |
package.json with express/fastify | Express/Fastify |
composer.json | CakePHP / Laravel |
pyproject.toml or requirements.txt with django/fastapi/flask | Python |
go.mod | Go |
Cargo.toml with actix/axum/rocket | Rust |
Gemfile with rails | Rails |
| Stack | Where to look |
|---|---|
| NestJS | *.controller.ts — decorators @Get, @Post, @Put, @Delete, @Patch |
| Express/Fastify | routes/**, router/** — router.get(), app.post(), etc. |
| CakePHP/Laravel | *Controller.php — public methods, routes/*.php |
| Django | urls.py — urlpatterns, ViewSet classes |
| FastAPI | *.py — @app.get, @router.post, etc. |
| Go | *_handler.go, *_router.go — HandleFunc, mux.Handle |
| Rails | config/routes.rb — resources, get/post/put/delete |
| Rust | routes/*.rs — handler functions, route macros |
// TODO: define type — NEVER fabricateUse this format:
# API Contract — [Project Name]
Source of truth for backend/frontend communication.
## Global Conventions
- Base URL: [detected or TODO]
- Auth: [detected or TODO]
- Response format: [detected or standard JSON]
- Error format: [detected or TODO]
## [Domain — grouped by controller/router]
### [METHOD] [path]
**Request:**
\`\`\`[lang]
[body type / query params]
\`\`\`
**Response:**
\`\`\`[lang]
[response type]
\`\`\`
**Auth:** [required/optional/none]
**Notes:** [if applicable]
---
## Changelog
| Date | Change | Side |
|------|--------|------|
| [today] | Initial generation from code | backend |
shared or no argument: propose shared/API_CONTRACT.mdroot: propose API_CONTRACT.md at project rootPresent the generated contract and wait for user validation before writing.