/universe:discover [focus-area]from universe
Analyzes a codebase to infer and codify unwritten project conventions as actionable instruction rules for consistent Claude behavior.
Ships in universe. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Reverse-engineer the conventions a project actually follows by analyzing the codebase. Every project has unwritten rules — import patterns, naming conventions, error handling styles, testing approaches, architectural boundaries. This skill makes them explicit and actionable as instruction rules.
Works with zero dependencies. No alignkit installation needed.
Most CLAUDE.md files document what the developer intended. The codebase reveals what actually happened. Conventions that exist in practice but not in instructions are invisible to Claude — it may follow them by accident in one session and violate them in the next. Discovering and codifying these conventions makes Claude's behavior consistent.
If the user specified a focus area (e.g., "imports", "testing", "API routes"), narrow the analysis to that domain. Otherwise, run a broad analysis across all convention categories.
Read the existing instruction files (CLAUDE.md, .claude/rules/*) first to avoid suggesting rules that already exist.
Collect foundational data about the project:
Read a representative sample of source files across the project. Do not read every file — sample strategically:
The goal is coverage of different parts of the codebase, not exhaustiveness.
For each category in references/convention-categories.md, look for consistent patterns
across the sampled files. A convention must appear in most or all sampled files to
qualify — a pattern in 2 out of 10 files is not a convention.
For each discovered convention:
Format discoveries as a numbered list with evidence. Group by category.
Report format:
## Discovered Conventions — {project name}
{n} conventions found across {n files sampled} files
### Import & Module Patterns
1. **{Pattern name}** — {brief description of what's consistent}
Suggested rule: "{concrete, paste-ready rule text}"
Evidence: {specific files, counts, or grep results}
For each discovery, include:
Value filtering — this is critical:
Before including a convention, ask: "If Claude violated this, would it cause a real problem?"
High value: Include conventions whose violation would cause bugs, architectural damage, security regressions, or tooling breakage. Typical examples are layer boundaries, ownership checks, API response contracts, and build-sensitive import rules.
Medium value: Violations cause inconsistency but not breakage. Naming conventions, type organization, export style. Include these but mark as medium.
Low value — OMIT THESE: Patterns Claude would follow anyway from reading existing code (function vs arrow syntax, where props are defined, logging format). Also omit implementation details that describe HOW something was built rather than a rule to follow (e.g., "SSE uses TextEncoder" is an implementation detail, not a convention). Also omit patterns that might be gaps rather than intentional choices (e.g., "no Zod for API inputs" might mean they haven't added it yet, not that it's a convention to avoid it).
Aim for 8-12 high/medium conventions, not 17+ with filler. Fewer, stronger rules are more valuable than a comprehensive list that dilutes signal.
Projects with no existing CLAUDE.md: When no instruction files exist, this is a greenfield opportunity. Focus on the highest-value conventions first:
After presenting discoveries, offer to create a new CLAUDE.md with the selected rules organized by category. Use this structure:
# Project Instructions
## Architecture
{architecture boundary rules}
## Code Style
{naming, import, export rules}
## Testing
{test framework, package-specific placement, assertion rules}
## Workflow
{tool constraints, process rules}
Small projects (fewer than 8 source files): Reduce sampling -- read all source files instead of a sample. Adjust evidence thresholds downward since the sample IS the population:
Note to the user: "This is a small project -- conventions may solidify as it grows. These rules reflect what exists now."
After presenting discoveries, offer to add selected rules to CLAUDE.md:
Add rules: [1] [2] [3] [all] — or specify which to add
If the user selects rules, add them to the appropriate section of CLAUDE.md. If no CLAUDE.md exists, create one with the selected rules organized by category.
When adding rules, place them in the most appropriate location:
.claude/rules/ with appropriate glob patterns/lint-rules — After adding discovered conventions to CLAUDE.md, use /lint-rules to check
the overall quality of the instruction file/check-rules — Use to verify whether the adopted rules still match the codebasereferences/convention-categories.md — Detailed list of convention categories to
analyze, with specific patterns to look for and grep commands for detectionWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub mbwsims/claude-universe --plugin universe20 skills in this plugin
/check-rulesThis skill should be used when the user asks to "check adherence", "check rule adherence", "are my rules being followed", "is Claude following my instructions", "how effective is my CLAUDE.md", "rule compliance", "instruction effectiveness", "how are my rules performing", "which rules are being violated", "audit my rules", "check my CLAUDE.md", mentions "/check-rules", or wants to know whether their coding agent instruction rules are actually being followed across Claude Code sessions./dissectThis skill should be used when the user asks "when did this get complicated", "why is this file so complex", "how did this evolve", "complexity history", "trace the evolution", "what happened to this code", "dissect this file", mentions "/dissect", or wants to understand how a file or function became complex by tracing its evolution through git history./driftThis skill should be used when the user asks "has this module drifted", "is this code still doing what it was designed for", "scope creep analysis", "architectural drift", "what was this originally for", "how has this changed over time", mentions "/drift", or wants to detect when code has quietly evolved away from its original purpose./explainUse when the user wants a deep explanation of a specific file, module, or implementation flow: "explain this code", "walk me through this file", "why is this structured this way", or "/explain". Best for focused code understanding with history context, not for repo-wide architecture mapping, recent-change summaries, or generic "what happened?" requests./forecastThis skill should be used when the user asks "what's about to become a problem", "predict issues", "trend analysis", "which files are growing", "what's getting worse", "complexity forecast", "what should I refactor next", mentions "/forecast", or wants to predict which files are on concerning trajectories before they become critical./hotspotsThis skill should be used when the user asks to "find hotspots", "what are the riskiest files", "where do bugs hide", "churn analysis", "which files change most", "find risky code", "technical debt hotspots", mentions "/hotspots", or wants to identify the highest-risk areas of their codebase based on change frequency, complexity, and coupling.Other plugins' skills for the same job