openlore-analyze-codebase
Skill365 starsChanged 6 months agoMITView on GitHub
Run a full static OpenLore analysis and summarize architecture, call graph, refactoring issues, and duplicate code. Use when asked to analyze, map, or assess a codebase without LLM inference.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- clay-good/spec-genword for word, first seen Oct 8, 2026
Other versions1 project uses a version of this.
Word for word · 1
- clay-good/spec-gen★ 359100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository13 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- openlore-brainstormSkill
- openlore-configureSkill
- openlore-debugSkill
- openlore-execute-refactorSkill
- openlore-generateSkill
- openlore-implement-storySkill
- openlore-orientSkill
- openlore-plan-refactorSkill
- openlore-repairSkill
- openlore-review-changesSkill
- openlore-write-testsSkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 5 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 23
Ask the user which project to analyze, or confirm the current workspace root.
- Very specific: line 34
Call the openlore MCP tool analyze_codebase with {"directory": "$DIRECTORY"}.
- Very specific: line 52
If none of these files exist, skip this section and suggest running openlore analyze --force.
- Distinctive: line 75
If no duplicates found, note this as a positive signal
- Very specific: line 83
Call get_minimal_context on the highest-priority function — returns callers, callees, body, and test coverage in one call (~300 tokens).
- Very specific: line 84
Call get_cluster on any function to see its full community (tightly coupled neighbors across directories).
- Very specific: line 85
Call detect_changes to rank recently changed functions by blast radius — spot riskiest commits before reviewing.
- Distinctive: line 86
If significant duplication was found, suggest consolidating clone groups before refactoring
- Very specific: line 88
If the project has OpenSpec specs, call list_spec_domains then search_specs to enable spec-first reasoning (question → requirements → …
- Distinctive: line 97
Never skip the duplication step — it determines the order of subsequent actions
- Distinctive: line 98
Always present call graph and duplicate report results even if numbers are low
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
openlore: Analyze Codebase
When to use this skill
Trigger this skill whenever the user asks to analyze a codebase with openlore, with phrasings like:
- "analyze my project / my code"
- "give me a code quality report"
- "what are the structural issues in my codebase"
- "find duplicates in my code"
- explicit command
/openlore-analyze-codebase
This skill is read-only — it modifies no files. It produces a report and suggests next steps.
Step 1 — Confirm the project directory
Ask the user which project to analyze, or confirm the current workspace root.
Which project directory should I analyze?
Options: current workspace root | enter a different pathStep 2 — Run static analysis
Call the openlore MCP tool analyze_codebase with {"directory": "$DIRECTORY"}.
Step 3 — Summarize the results
Present a concise summary:
- Project type and detected frameworks
- File count, function count, internal call count
- Top 5 refactoring issues (function name, file, issue type, priority score)
- Detected domains
Also report stack inventory (read directly from .openlore/analysis/ — no extra MCP call needed):
- HTTP routes: N routes across M files — if
route-inventory.jsonexists - ORM tables: N tables — if
schema-inventory.jsonexists - Env vars: N total, X required without default — if
env-inventory.jsonexists - UI components: N components — if
ui-inventory.jsonexists
If none of these files exist, skip this section and suggest running openlore analyze --force.
Step 4 — Show the call graph
Call the openlore MCP tool get_call_graph with {"directory": "$DIRECTORY"}.
Highlight:
- Hub functions (fanIn ≥ 8) — over-solicited functions, high coupling risk
- Layer violations detected (e.g. a UI layer calling the database directly)
Step 5 — Show duplicate code report
Call the openlore MCP tool get_duplicate_report with {"directory": "$DIRECTORY"}.
Present a concise summary:
- Overall duplication ratio (e.g. "12% of functions are duplicated")
- Top 3 clone groups sorted by impact (instances × line count):
- Clone type (exact / structural / near) and similarity score
- List of instances (file + function name + line range)
- If no duplicates found, note this as a positive signal
Step 6 — Suggest next steps
Based on the analysis, guide the user through the natural next actions in order:
- Call
get_minimal_contexton the highest-priority function — returns callers, callees, body, and test coverage in one call (~300 tokens). Use instead ofget_subgraph+get_signaturesseparately. - Call
get_clusteron any function to see its full community (tightly coupled neighbors across directories). - Call
detect_changesto rank recently changed functions by blast radius — spot riskiest commits before reviewing. - If significant duplication was found, suggest consolidating clone groups before refactoring
- Suggest running
/openlore-plan-refactoronce the user has enough context to act, then/openlore-execute-refactorto apply the plan - If the project has OpenSpec specs, call
list_spec_domainsthensearch_specsto enable spec-first reasoning (question → requirements → linked source files). To activatesearch_specs, runopenlore analyze --embedoropenlore analyze --reindex-specs.
Absolute constraints
- No code modifications in this workflow
- Never skip the duplication step — it determines the order of subsequent actions
- Always present call graph and duplicate report results even if numbers are low
- Next steps (Step 6) are suggestions, not automatic actions
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

