with one click
context-docs
Maintain CLAUDE.md passive context documentation. Use when adding docs for new features, importing external LLM prompts, or refreshing stale documentation.
Menu
Maintain CLAUDE.md passive context documentation. Use when adding docs for new features, importing external LLM prompts, or refreshing stale documentation.
| name | context-docs |
| description | Maintain CLAUDE.md passive context documentation. Use when adding docs for new features, importing external LLM prompts, or refreshing stale documentation. |
| allowed-tools | Read, Grep, Glob, Edit, Write |
| argument-hint | <add|import|refresh|diff> [target] |
Maintain CLAUDE.md to provide accurate passive context for AI agents. Based on Vercel's finding that passive context (100% pass rate) outperforms active retrieval (79%).
Principle: Documentation must reflect actual code patterns, not generic/external docs.
Parse $ARGUMENTS to determine the subcommand:
add <feature-name>Analyze implementation and add a condensed section to CLAUDE.md.
Steps:
Output format:
## Feature Name
Brief description of what it does.
**Key files:**
- `path/to/file.ts` - What it does
- `path/to/other.py` - What it does
**Project-specific patterns:**
- Pattern 1 that differs from standard approach
- Pattern 2 specific to this project
**Environment variables:**
- `VAR_NAME` - Description (optional if applicable)
**Research:** `docs/path/to/detailed-docs.md` (if exists)
import <file-path>Adapt an external LLM prompt (like Clerk's, Supabase's, etc.) to project-specific patterns.
Steps:
Important: Flag conflicts between external docs and actual code. Project code is authoritative.
refreshScan codebase and flag stale documentation in CLAUDE.md.
Steps:
Output: List of issues with suggested fixes, don't auto-fix without user approval.
diffShow what's documented vs what's actually in the code.
Steps:
Output format:
## Documentation Diff Report
### Auth Section
- Documented: "graceful fallback if key missing"
- Actual: [MATCHES] main.tsx:11-21 implements fallback
- Documented: "custom UserButton component"
- Actual: [MATCHES] UserButton.tsx exists with custom implementation
### Missing Documentation
- backend/app/services/user_service.py - Not documented, handles user sync
- frontend/src/stores/authStore.ts - Not documented, caches user for offline
### Stale References
- Code Index references "CategoryLearning" model but it's now in a different file