Analyze the repository for code hotspots and forensic signals with bbu. Use when the user asks which parts of the codebase are unstable, risky, or worth refactoring first.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Analyze?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/michael-denyer-analyze)
---
name: analyze
description: Analyze the repository for code hotspots and forensic signals with bbu. Use when the user asks which parts of the codebase are unstable, risky, or worth refactoring first.
---
Run a forensic analysis of this repository using the bbu CLI:
1. Prefer the `get_repo_overview` MCP tool (`days=90`, `include_ci=True` when
GitHub Actions data is wanted) if the `black-box-unlock` server is connected.
Otherwise run: `bbu analyze-repo --output=json --days=90`.
- If `ci_status.state` is `unavailable` or `partial` (for example `gh` is
missing or unauthenticated), re-run with `--no-ci` or note that CI data
was unavailable.
- If `bbu` is not installed, tell the user: `uv tool install black-box-unlock`,
then retry.
2. Parse the JSON. Report, in order:
- **Top 5 hotspots** by `hotspot_score` (commits x indentation complexity),
from `hotspots` (MCP) or `files` (CLI), with their `bugfix_commits` and
`build_failures` counts.
- **Coupled pairs**: from `top_couplings` (MCP `get_repo_overview`, showing
`coupling_ratio`, `rate_a_to_b`, `rate_b_to_a`, and
`recent_shared_commits`) or `files[].coupled_with` entries with
`rate_to_partner` >= 0.5 (CLI / `get_coupled_files`). Changing one file
without its coupled partner is a defect source.
- **High-risk ownership**: from `diffuse_ownership` (MCP) or `files` where
`is_high_risk` is true (more than three authors and no one holding half
the commits).
- **Flaky steps** from `flaky_steps`, if any.
3. Recommend which 2 or 3 files deserve refactoring or extra review first, and
why. Ground every recommendation in the numbers you just reported.
Use `get_hotspots`, `get_coupled_files`, `get_ownership`, `xray_file`,
`get_flaky_steps`, and `doctor` to drill into individual files or inspect
`.bbu.toml` configuration. Every analysis result carries `provenance` naming
the HEAD it read.