Codebase Inspection Protocol
Mandatory inspection before writing any Rails code. Use when: (1) Starting ANY implementation task, (2) Making architectural decisions, (3) Suggesting patterns or conventions, (4) Creating new files/classes. Core rule: Never plan without file path citations. Trigger keywords: analyze, inspect, patterns, conventions, codebase, discover, structure, dependencies, existing, before
npx skills add majiayu000/claude-skill-registry --skill codebase-inspection --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Codebase Inspection Protocol **Core Rule**: "Inspect before you suggest" — No planning decisions without codebase inspection. Every recommendation must cite observed file paths. ## Inspection Decision Tree ``` What are you doing? │ ├─ Creating a new file │ └─ Inspect: Target directory + similar existing files │ ├─ Implementing a pattern (service, component, job) │ └─ Inspect: Existing implementations of same pattern │ ├─ Modifying existing code │ └─ Inspect: All usages + method visibility │ ├─ Making architectural decision │ └─ Inspect: Project structure + Gemfile + existing patterns │ └─ Starting fresh on a project └─ Run FULL inspection (all sections below) ``` --- ## Quick Inspection Commands ### Project Structure ```bash tree app -L 2 -I 'assets|javascript' 2>/dev/null || find app -type d -maxdepth 2 head -60 Gemfile | grep -v '^#' | grep -v '^$' ``` ### Pattern Discovery ```bash # Services ls app/services/*/ 2>/dev/null head -30 $(find app/services -name '*.rb' | head -1) # Components ls app/components/*/ 2>/dev/null head -40 $(find app/components -name '*_component.rb' | head -1) # Jobs ls app/jobs/ 2>/dev/null head -30 $(find app/jobs -name '*.rb' | head -1) ``` ### Naming
- Inspection Decision Tree
- Quick Inspection Commands
- Project Structure
- Pattern Discovery
- Naming Conventions
- Method Visibility (Critical!)
- NEVER Do This
- Inspection Output Template
- When Inspection Fails
- Citation Requirements
tree app -L 2 -I 'assets|javascript' 2>/dev/null || find app -type d -maxdepth 2 head -60 Gemfile | grep -v '^#' | grep -v '^$' Services ls app/services/*/ 2>/dev/null head -30 $(find app/services -name '*.rb' | head -1) Components ls app/components/*/ 2>/dev/null head -40 $(find app/components -name '*_component.rb' | head -1) Jobs ls app/jobs/ 2>/dev/null
What does the Codebase Inspection Protocol skill do?
Mandatory inspection before writing any Rails code. Use when: (1) Starting ANY implementation task, (2) Making architectural decisions, (3) Suggesting patterns or conventions, (4) Creating new files/classes. Core rule: Never plan without file path citations. Trigger keywords: analyze, inspect, patterns, conventions, codebase, discover, structure, dependencies, existing, before
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill codebase-inspection --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
