Agent skill
codebase-knowledge
Provides cached knowledge about project domains. Maps files by domain, tracks connections between components, records recent commits. Use before implementing to understand affected areas.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/codebase-knowledge
SKILL.md
Codebase Knowledge - Domain Mapping System
Purpose
This skill provides cached knowledge about project domains:
- Maps files by domain/feature area
- Tracks connections between components
- Records recent commits per area
- Caches architecture decisions
How It Works
Domain Files Location
.claude/skills/codebase-knowledge/domains/
├── [domain-name].md # One file per domain
└── ...
Domain File Template
# [Domain Name]
## Last Update
- **Date:** YYYY-MM-DD
- **Commit:** [hash]
## Files
### Frontend
- `app/[path]/page.tsx` - Description
- `components/[path]/*.tsx` - Description
### Backend
- `server/trpc/routers/[name].router.ts` - Router
- `server/db/models/[name].model.ts` - Model
### Types/Schemas
- `lib/validators/[name].ts` - Zod schemas
## Connections
- **[other-domain]:** How they connect
## Recent Commits
| Hash | Date | Description |
| ------ | ---------- | ----------------- |
| abc123 | YYYY-MM-DD | feat: description |
## Attention Points
- [Special rules, gotchas, etc]
Workflow
BEFORE Implementation
- Identify which domain is affected
- Read
domains/[domain].mdfile - Check affected files listed
- Verify recent commits for context
- Note connections with other domains
AFTER Implementation
- Update the domain file
- Add new commit to "Recent Commits"
- Add/remove files if changed
- Update connections if affected
Commands
Check Recent Commits by Domain
git log --oneline -10 -- [list of domain files]
Check Uncommitted Changes
git diff --name-status main..HEAD
Create New Domain File
# Copy template
cp .claude/skills/codebase-knowledge/TEMPLATE.md .claude/skills/codebase-knowledge/domains/[name].md
Rules
MANDATORY
- READ domain before implementing - Always check cached knowledge
- UPDATE after implementing - Keep cache current
- VERIFY connections - Changes may affect other domains
- RECORD commits - Maintain history
FORBIDDEN
- Ignore cached knowledge - It exists to accelerate development
- Leave outdated - Old docs are worse than none
- Modify without recording - Every commit should be noted
Integration with Agents
The analyzer agent MUST use this skill:
- Check which domain is affected
- Read domain file for context
- Report affected files and connections
- Update domain after implementation
Version
- v2.0.0 - Generic template (no project-specific domains)
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?