name: ez-context description: "Extract coding conventions and generate CLAUDE.md, AGENTS.md, Cursor rules, and more — with semantic drift detection." allowed-tools: Read, Glob, Grep, Bash, Edit, Write
ez-context: AI Context File Generator
Extract coding conventions and keep AI context files accurate.
Steps
-
Scan conventions — Read the codebase to extract:
# Build tool and language cat package.json | grep -E '"(name|version|main|scripts)"' cat tsconfig.json | grep -E '"(target|module|strict)"'- Language, framework, runtime version
- Build commands, test commands, lint commands
- Directory structure and module organization
- Import/export conventions
- Naming patterns (files, variables, functions)
-
Extract architecture — Map the codebase:
ls src/ grep -n "export " src/index.ts- Public API surface
- Key interfaces and types
- Module responsibilities
- Dependency flow
-
Detect drift — Compare existing CLAUDE.md against actual code:
# Check if documented modules exist grep -c "src/module.ts" CLAUDE.md test -f src/module.ts- Files mentioned that no longer exist
- Commands that have changed
- Versions that are outdated
- Missing new modules or features
-
Generate — Create or update context files:
CLAUDE.md: Project conventions, build commands, architectureAGENTS.md: Agent-specific instructions (if needed).cursorrules: Cursor IDE rules (if needed)- Keep existing structure, update only stale sections
-
Verify — Ensure generated files are accurate:
- All mentioned files exist
- All commands run successfully
- No contradictions with actual code
Rules
- Never remove information — only add or update
- Preserve the existing file structure and formatting
- Every command mentioned must actually work
- Every file path mentioned must actually exist
- Include version numbers and dates for temporal context