mirror of
https://github.com/luongnv89/claude-howto.git
synced 2026-12-03 02:03:31 +01:00
* docs: sync to Claude Code v2.1.302 Release changes (v2.1.301-2.1.302): fork subagents on by default in claude -p, the Agent SDK, desktop and VS Code (CLAUDE_CODE_FORK_SUBAGENT=0 turns them off); claude -p / SDK sessions with no permission mode start in default on third-party providers, with telemetry off or on a fresh install; at most 12 prompt/agent hooks of one event run at once; new CLAUDE_CODE_AUTO_MODE_MODEL and CLAUDE_CODE_RETRY_WATCHDOG_MAX_USAGE_LIMIT_WAIT_MS; /config Idle compaction row; vim % motion; tool_decision OTel attributes; fable/best fallback; 64-argument limit; hook ask prompts name their plugin or skill; PowerShell finds plugin bin/; mod Input rows. Also: standalone Claude Design closes Dec 14, 2026; Sonnet 4.5 retires Nov 30, 2026; managed Code Review GA; npm install marked deprecated per the official README. Verified drift fixes (each checked against code.claude.com): hook handler JSON shapes, prompt-hook response schema, exec/HTTP/mcp_tool hook fields; GitHub MCP URL (api.githubcopilot.com) and token; nonexistent @modelcontextprotocol/server-database; plugin layout, marketplace, userConfig, strictKnownMarketplaces, blockedMarketplaces and enabledPlugins shapes; nonexistent deniedPlugins, autoCheckpoint, planning.*/extendedThinking.* keys; invented 09 settings schema; claude -p JSON output jq paths; subagent forks via subagent_type "fork" not context: fork; --agents priority; MCP default scope; command descriptions; rewind menu has six options; broken nested code fence in 07-plugins. Shipped hook scripts: pre-commit.sh reads stdin and only gates git commit; validate-prompt.sh uses hookSpecificOutput; session-end.sh no longer reads /dev/tty. Fixes mirrored into vi/ja/zh/uk where the same claim existed. Learning skills: quiz Lesson 05 Q2 option B (GitHub MCP URL; Correct letter unchanged), explanations for L02 Q2, L04 Q6/Q9, L09 Q1, L07 Q2 wording; self-assessment wording in paired files; lesson-quiz 1.6.2, self-assessment 2.5.5. * fix(hooks): parse pre-commit.sh hook input with sed instead of jq * fix(mcp): restore DATABASE_URL expansion and align MCP env var setup * fix(mcp): align QUICK_REFERENCE GitHub token and Example 2 DATABASE_URL setup
Documentation Plugin
Comprehensive documentation generation and maintenance for your project.
Features
✅ API documentation generation ✅ README creation and updates ✅ Documentation synchronization ✅ Code comment improvements ✅ Example generation
Installation
claude --plugin-dir ./07-plugins/documentation
What's Included
Slash Commands
/generate-api-docs- Generate API documentation/generate-readme- Create or update README/sync-docs- Sync docs with code changes/validate-docs- Validate documentation
Subagents
api-documenter- API documentation specialistcode-commentator- Code comment improvementsexample-generator- Code example creation
Templates
api-endpoint.md- API endpoint documentation templatefunction-docs.md- Function documentation templateadr-template.md- Architecture Decision Record template
MCP Servers
- GitHub integration for documentation syncing
Usage
Generate API Documentation
/generate-api-docs
Create README
/generate-readme
Sync Documentation
/sync-docs
Validate Documentation
/validate-docs
Requirements
- Claude Code 2.1+
- GitHub access (optional)
Example Workflow
User: /generate-api-docs
Claude:
1. Scans all API endpoints in /src/api/
2. Delegates to api-documenter subagent
3. Extracts function signatures and JSDoc
4. Organizes by module/endpoint
5. Uses api-endpoint.md template
6. Generates comprehensive markdown docs
7. Includes curl, JavaScript, and Python examples
Result:
✅ API documentation generated
📄 Files created:
- docs/api/users.md
- docs/api/auth.md
- docs/api/products.md
📊 Coverage: 23/23 endpoints documented
Templates Usage
API Endpoint Template
Use for documenting REST API endpoints with full examples.
Function Documentation Template
Use for documenting individual functions/methods.
ADR Template
Use for documenting architectural decisions.
Configuration
Set up GitHub token for documentation syncing:
export GITHUB_TOKEN="your_github_token"
Best Practices
- Keep documentation close to code
- Update docs with code changes
- Include practical examples
- Validate regularly
- Use templates for consistency
Last Updated: October 18, 2026 Claude Code Version: 2.1.302 Sources:
- https://code.claude.com/docs/en/plugins
- https://github.com/anthropics/claude-code/releases/tag/v2.1.131
- https://github.com/anthropics/claude-code/releases/tag/v2.1.138
- https://code.claude.com/docs/en/model-config
- https://code.claude.com/docs/en/plugins/cli-reference
- https://code.claude.com/docs/en/plugins/install Compatible Models: Claude Fable 5, Claude Opus 5, Claude Sonnet 5, Claude Sonnet 4.6, Claude Opus 4.8, Claude Haiku 4.5