Skip to content
Back to skills

Deep Repo Analysis

ASecurity

Full codebase health audit using jcodemunch — cycles, complexity, coupling, dead code, test gaps, and architectural debt. Use when you need a scored health report with prioritized action items.

  • 3 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added October 1, 2026
ai-agentspythongo

Security analysis

A100/100

Scanned October 1, 2026

npx -y skills add williamblair333/Uncle-J-s-Refinery --skill deep-repo-analysis --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Deep Repo Analysis?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Deep Repo Analysis
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/williamblair333-deep-repo-analysis/badge)](https://www.skillsdirectory.com/skills/williamblair333-deep-repo-analysis)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md

---
name: deep-repo-analysis
description: Full codebase health audit using jcodemunch — cycles, complexity, coupling, dead code, test gaps, and architectural debt. Use when you need a scored health report with prioritized action items.

---

## When to use

Run this skill when you want a scored architectural health report on an unfamiliar or evolving codebase. It produces a graded breakdown across six axes with concrete action items.

## Steps

### 1. Check memweave for prior analysis
`.venv-memweave/bin/python scripts/memweave/mw_search.py "repo health analysis <project-name>" --k 5`
If a recent snapshot exists, diff against it rather than starting cold.

### 2. Index the repo (if not already indexed)
index_repo(path=".")          # or index_folder if partial
list_repos()                  # confirm it appears

### 3. Run the full analysis suite in parallel
Fire all six queries simultaneously:
get_dependency_cycles()
get_repo_health()             # overall score + axis breakdown
get_hotspots()                # churn × complexity surface
get_symbol_complexity(top_n=20)
get_dead_code_v2()
get_untested_symbols()

### 4. Pull coupling metrics for hotspot files
Take the top 3–5 files from `get_hotspots` and call:
get_coupling_metrics(file="<path>")
get_extraction_candidates(file="<path>")

### 5. Read project status docs
jdocmunch search_sections("status milestone done")
Cross-reference against dead-code and untested-symbol reports to filter false positives.

### 6. Synthesize — structured report

Produce a report with this shape:

Overall Health: <letter> (<score>/100)

| Axis         | Score | Raw                  |
|---|---|---|
| Cycles       | ...   | N cycles             |
| Test gap     | ...   | X% symbol reach      |
| Coupling     | ...   | N unstable modules   |
| Complexity   | ...   | avg Y                |
| Churn surface| ...   | Z (dominant file)    |
| Dead code    | ...   | X% (N symbols)       |

For each axis below threshold (< 70), add a named problem block:
- **What**: the specific symbol/file and its metric
- **Why it matters**: testability / blast radius / coupling impact
- **What to do**: concrete extraction or decomposition steps

### 7. Dead code triage — filter before reporting
Static analyzers flag test helpers and factory functions called only from executables as dead. Before surfacing dead-code items:
- Exclude `__tests__/` helpers (Jest isn't a recognized entry point)
- Exclude factory functions called only from `server.ts` / `main.ts`
- Flag only symbols with zero known callers across all entry points

### 8. Snapshot to the memweave corpus
The session is auto-ingested by the Stop-hook; for a durable standalone note, append a one-line
summary to `~/.uncle-j-memory/memory/` (tags: health, repo-analysis) — the nightly
`sync_memory.sh` embeds it for future prior-art checks.

## Key interpretation rules

- **Cycles = 0** is the gold standard; any cycle is a structural defect
- **Complexity > 50** on a single function = extraction target; > 100 = critical
- **Instability 0.0** on a types file = correct (stable leaf); flag instability on shared utilities instead
- **Dead code % > 15** almost always contains false positives — triage before acting
- **Test gap concentrated in db/*.ts** = low urgency if E2E covers those paths; high urgency if not

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.