원클릭으로
inject-docs
Inject framework-specific best practices into CLAUDE.md. Supports Next.js and FastAPI.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Inject framework-specific best practices into CLAUDE.md. Supports Next.js and FastAPI.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Headless browser automation CLI optimized for AI agents. Uses snapshot + refs system for 93% less context overhead vs Playwright. Purpose-built for web testing, form automation, screenshots, and data extraction.
Manage a gitflow branching workflow — starting and finishing feature, release, and hotfix branches; cutting versioned releases with changelog generation; coordinating emergency hotfixes directly to production; and keeping long-lived branches in sync. Activates when users mention gitflow, feature/release/hotfix branches, cutting a release, branching strategy, promoting an integration branch to production, tagging a version, or rolling back a live release. Also reaches for it when the user says "ship it", "promote dev to main", or "we need to hotfix prod" without naming gitflow. Skip for general git mechanics (commit messages, merge conflicts, interactive rebase, git education) or CI-failure debugging unrelated to a release.
Fixes a bug through test-driven debugging — reproduces it with a failing test, locates the root cause with evidence (file:line), then applies the smallest fix that resolves it without refactoring unrelated code. Use when the user wants to fix a bug, debug an issue, resolve an error, or investigate a failing test. Not for building new functionality (use implement-feature) or restructuring working code with no bug involved (use refactor).
Implements a new feature end-to-end as a senior staff engineer would — discovers project conventions, researches current best practices, drafts a plan for approval, then builds it with parallel subagents that reuse existing code, skip speculative abstractions, and verify with tests before completion. Use when the user wants to implement, build, add, or ship new functionality (a feature, endpoint, component, module, or integration) — not for fixing an existing bug (use fix-bug) or restructuring code that already works (use refactor).
Restructures existing code without changing its behavior — maps callers and test coverage, adds characterization tests where coverage is thin, then applies the change in small steps verified against the full test suite after each one. Use when the user wants to refactor, extract a method or class, simplify logic, reduce duplication, improve naming, restructure modules, or pay down technical debt in code that already works. Not for adding new functionality (use implement-feature) or fixing broken behavior (use fix-bug).
Runs a comprehensive multi-agent code review of a PR, commit, or the whole codebase across six dimensions (correctness, performance, code style, test coverage, error handling, and simplicity/over-engineering) and returns a severity-ranked report with file:line findings and fix suggestions. Use when the user wants a thorough code review, asks to review a PR or diff, or wants over-engineered code flagged for simplification. Analysis only, identifying issues without modifying code, committing, or running tests. Not for a security-focused audit (use review-security) or a visual/UX design critique (use review-design).
| name | inject-docs |
| description | Inject framework-specific best practices into CLAUDE.md. Supports Next.js and FastAPI. |
| metadata | {"author":"mgiovani","version":"1.0.0","source":"https://github.com/mgiovani/skills"} |
| disable-model-invocation | true |
Cross-Platform AI Agent Skill This skill works with any AI agent platform that supports the skills.sh standard.
Inject compressed framework-specific best practices and documentation into the current project's CLAUDE.md or AGENTS.md file. This gives AI coding agents passive access to framework knowledge without requiring tool calls or skills.
| Framework | Detection Method | Documentation Source |
|---|---|---|
| Next.js | next in package.json | Vercel's agents-md codemod (version-aware) |
| FastAPI | fastapi in requirements.txt/pyproject.toml | zhanymkanov/fastapi-best-practices |
CRITICAL:
Before running anything, auto-detect the framework and verify prerequisites:
package.json with next dependency → Next.js projectpyproject.toml with fastapi dependency → FastAPI projectrequirements.txt containing fastapi → FastAPI projectpackage.jsonpyproject.toml or requirements.txtCLAUDE.md exists in the project root - use CLAUDE.mdAGENTS.md exists - use AGENTS.mdCLAUDE.md (Claude Code's native format)Execute the Vercel codemod with the --output flag:
npx @next/codemod@canary agents-md --output <TARGET_FILE>
**What this does**:
- Auto-detects the Next.js version from package.json
- Downloads version-matching documentation from Vercel's servers
- Injects a compressed pipe-delimited index into the target file
- Downloads full docs to `.next-docs/` and adds it to `.gitignore`
- Non-interactive mode (no prompts)
**Important**:
- Requires network access
- Non-destructive: updates existing file without overwriting content
- Compresses ~40KB of docs into ~8KB (Vercel's agent evals showed 100% pass rate vs 53% baseline)
#### Option B: FastAPI Projects
Run the bundled injection script:
```bash
uv run "$(dirname "$0")/scripts/inject_fastapi_docs.py"
The script:
CLAUDE.md or AGENTS.md exists and targets the right fileTemplate for FastAPI injection (see references/fastapi-best-practices.md for full content):
## FastAPI Best Practices
### Project Structure
- Use domain-driven organization (by feature), not file-type organization
- Each domain is self-contained: router, schemas, models, service, dependencies
- Structure per domain:
- `router.py` - API endpoints
- `schemas.py` - Pydantic request/response models
- `models.py` - Database models (SQLAlchemy)
- `service.py` - Business logic
- `dependencies.py` - Route-level dependencies
- `constants.py`, `config.py`, `exceptions.py`, `utils.py`
### Async Patterns
- Use `async def` for non-blocking I/O (database queries, HTTP calls)
- Use `def` for blocking operations (FastAPI handles threadpool automatically)
- **NEVER** use `time.sleep` in async functions (blocks event loop)
- Use `await asyncio.sleep` for delays
- CPU-intensive work requires multiprocessing/Celery (not threads due to GIL)
- Prefer async database drivers (SQLAlchemy 2.0+ with asyncio)
### Import Discipline
- Use explicit imports with module names: `from src.auth import constants as auth_constants`
- Avoids hidden coupling and improves maintainability
- Critical when importing services or dependencies from other packages
### Validation & Dependencies
- Leverage Pydantic's built-in validation (regex, enums, email, URL, constraints)
- Create custom BaseModel for application-wide consistency
- Use dependencies for business logic validation (DB constraints, authorization, token parsing)
- Dependencies cache within request scope - chain them to avoid redundant computations
### Response Serialization
- Always use `response_model` parameter on endpoints
- Create custom encoders for special types (datetime, UUID)
- FastAPI auto-generates OpenAPI schemas from type hints
### Error Handling
- Define module-specific exception classes
- Raise from dependencies and service layer
- FastAPI auto-converts to HTTP responses
- Use HTTP status codes correctly (400 for client errors, 500 for server errors)
### Database Integration
- SQL-first design: design schema first, then models
- Enforce naming conventions at database level
- Use Alembic for migrations
- Prefer async drivers for scalability
### Testing
- Use async test clients from day one
- Configure fixtures for async operations
- Test at multiple levels: unit (service), integration (router), e2e
### Code Quality
- Use Ruff for linting and formatting (Python-focused, fast)
- Always include type hints for OpenAPI generation
- Enforce strict mypy or pyright type checking
- Use pre-commit hooks for quality gates
### REST Conventions
- Use correct HTTP methods: GET (read), POST (create), PUT/PATCH (update), DELETE (remove)
- Docstrings on endpoints for clarity in auto-generated docs
- Leverage FastAPI's OpenAPI `/docs` as primary API documentation