Skip to content
Back to skills

Improve

ASecurity

Codebase scan for module friction (shallow modules, module seams, locality, cross-boundary leaks): HTML report, Design-It-Twice interview. Use for 'improve architecture', 'shallow modules', 'locality', deepening, compare interface, derive conventions, layer boundaries, which references cross a boundary. Not for cross-dimension: /improvement:find.

  • 34 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added September 2, 2026
ai-agentsgoshellbashreactnodetestingdebugginggitsecurity

Security analysis

A100/100

Pro scans all 8 files and shows the line behind each finding

Scanned December 3, 2026

npx -y skills add melodic-software/claude-code-plugins --skill improve --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Improve?

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

Security grade badge for Improve
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/melodic-software-improve/badge)](https://www.skillsdirectory.com/skills/melodic-software-improve)

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
---
description: "Codebase scan for module friction (shallow modules, module seams, locality, cross-boundary leaks): HTML report, Design-It-Twice interview. Use for 'improve architecture', 'shallow modules', 'locality', deepening, compare interface, derive conventions, layer boundaries, which references cross a boundary. Not for cross-dimension: /improvement:find."
argument-hint: "[deepening|boundaries|conventions] [--repo <repo> ...] [--medium <value>] [--unattended]"
user-invocable: true
disable-model-invocation: false
metadata:
  workflow-stage: plan
  summary: Scan for shallow modules, boundary crossings or unwritten conventions, then hand on the fix
---

# Improve

**Arguments.** `[deepening|boundaries|conventions] [--repo <repo> ...] [--medium <value>] [--unattended]`. e.g., boundaries. `--repo` and the other target forms in [`${CLAUDE_PLUGIN_ROOT}/reference/target-scope.md`](${CLAUDE_PLUGIN_ROOT}/reference/target-scope.md) run any lens across several repositories ([../../reference/improvement-steps.md](../../reference/improvement-steps.md), "Scope and fan-out"); the default stays this repository. `--medium` sets where the deepening report goes (`actions/deepening.md`, Phase 2). `--unattended` is the caller's declaration that no user is present; it is never inferred, and only the deepening lens has that mode (`actions/deepening.md`, "Unattended mode"). With another lens, say so and stop. `medium` option for the medium resolver ([`${CLAUDE_PLUGIN_ROOT}/reference/rendered-view.md`](${CLAUDE_PLUGIN_ROOT}/reference/rendered-view.md) "The deepening report"): `${user_config.medium}`, and `branding` option: `${user_config.branding}` (`""` when either reads empty or unsubstituted; never put a `${user_config.*}` string in a shell command).

## Repository context. Gather first

<!-- BEGIN GENERATED: gather-block. Edit docs/conventions/gather-block/block.md, then run scripts/sync-gather-block.py -->
Run each command below as its own Bash call, all sent together in one message ([worktree isolation](https://code.claude.com/docs/en/worktrees#how-claude-code-enforces-isolation)).
Keep any bound in the command's own pipe ([output limits](https://code.claude.com/docs/en/tools-reference#output-limits)).
Unless this section says otherwise, treat a failure (not a repository, git unavailable) as an unknown value and carry on. Keep these as body calls, never `## Pre-computed context` lines ([gather-block convention](https://github.com/melodic-software/claude-code-plugins/blob/main/docs/conventions/gather-block/README.md#the-pre-compute-block-runs-as-one-shell-invocation)).
<!-- END GENERATED: gather-block -->

- Current branch, `git branch --show-current`
- Recent commits, `git log --oneline -20`
- Working tree status (empty = clean), `git status --porcelain | head -10`

## Variables

Arguments: `$ARGUMENTS`

Verification level: for the `deepening` lens, run
`bash "${CLAUDE_PLUGIN_ROOT}/lib/read-verification.sh" --plugin architecture --skill improve` and
keep its line; Phase 1.5 says what the level does there
([levels](https://github.com/melodic-software/claude-code-plugins/blob/main/docs/contracts/verification-level/README.md)).

Improve settings: for the `deepening` and `conventions` lenses, resolve `<home>` ("Convention home"
in [../../reference/improvement-steps.md](../../reference/improvement-steps.md)), then run
`node "${CLAUDE_SKILL_DIR}/scripts/improve-settings.mjs" --home <home>` from the repository root,
with `--no-config` in place of `--home <home>` when no home resolves. Keep its `values`, and report
each entry of its `errors`. A value the invocation prompt names wins for that run. If the script
cannot run, use the defaults in `${CLAUDE_PLUGIN_ROOT}/reference/config.md` ("Improve keys") and say
so.

## Purpose

Improvement is distinct from review and planning. Review evaluates a diff against criteria (reactive). Planning designs new work (forward-looking). This skill scans existing code for friction and proposes candidates for improvement (proactive).

The scan-present-pick process generalizes across improvement **lenses**. Each lens (action) brings its own analysis method and vocabulary via an `actions/<lens>.md` playbook plus a `research/<lens>/` reference set, loaded only when that lens runs. The first lens, `deepening`, implements Ousterhout's deep-module concept: finding shallow modules (interface nearly as complex as implementation) and proposing how to deepen them. The aim is **testability and AI/agent-navigability (AX)**: a deep module's small interface lets a reader, human or agent, grasp its purpose without traversing the whole import graph. The `boundaries` lens checks the module boundaries a repository has recorded against the references its build manifests declare, and hands each rule the user confirms to the enforcement audit as an architecture-test proposal. The `conventions` lens derives the building blocks, owners and feature blueprints the code already follows, proposes each as a rule, and routes each rule the user accepts to the place that records its kind.

Whether the files that change together live together is a separate skill, `/architecture:improve-layout`.

This finds existing friction. It does not plan new work, apply mechanical code-level tidyings, enforce rules on a diff, or review changes before a PR. Those are separate concerns handled by planning, tidying, rule-enforcement, and review tools respectively (see "Composition").

## Actions

| Argument | Action | What it does |
|----------|--------|-------------|
| *(empty)* | Defaults to `deepening` | Runs the deepening lens |
| `deepening` | **Deepening (Ousterhout)** | Shallow→deep module scan → HTML report → interview loop on each selected candidate (with a Design-It-Twice branch for parallel interface exploration) → hand off the agreed candidates for planning, never implementing them. Full process: `actions/deepening.md` |
| `boundaries` | **Boundaries** | Recorded boundary rules (from the enforcement ladder's "Where boundary rules live" list) → edges from `/architecture:map-dependencies` → each edge that crosses a rule, presented for the user to pick → each confirmed rule written to a findings file for `/corrections:codify findings` (if enabled). With no rule recorded, asks which directions are forbidden. Full process: `actions/boundaries.md` |
| `conventions` | **Conventions** | Recorded rules, paved paths and decisions → building blocks, owners and feature blueprints derived from the code and its history, each reproduced → one proposed rule per item, recorded only on the user's yes → a boundary rule to the architecture concern file, a divergence to `/corrections:codify` (if enabled), a paved-path entry to `/discipline:reuse-or-replace` (if enabled). Full process: `actions/conventions.md` |

One lens per invocation. Lenses don't chain implicitly. Read the action's playbook for its full process.

### Adding a lens

A new improvement lens (e.g. `coupling`, `testability`, dependency-direction review) is an addition. Never edit an existing lens's contract to add one (open for extension, closed for modification). A step another lens already takes the same way is cited from [../../reference/improvement-steps.md](../../reference/improvement-steps.md), not restated. Add the lens in every place that lists the roster:

- `actions/<lens>.md`. The lens playbook (phases, gates, output shape)
- `research/<lens>/`. Reference for that lens, loaded only when its action runs (per-action progressive disclosure)
- in this file: the `argument-hint` and the **Arguments.** line, the `description` trigger phrases, the `metadata.summary`, the Purpose paragraph, one row in the Actions table, one row per new reference file in the reference index, and a Composition row and a `## Next` bullet when the lens hands on to another skill
- the plugin's `.claude-plugin/plugin.json` `description`, and its `README.md` lens paragraphs and usage block

This skill's `scripts/lens-roster.test.sh` fails when a file in `actions/` has no Actions-table row or no `argument-hint` entry.

## Reference index. Load on demand

| File | Load when |
|------|-----------|
| [research/deepening/scan-briefing.md](research/deepening/scan-briefing.md) | Before briefing the Phase 1 scan subagents. It is the canonical prompt (vocabulary primer, friction checklist, dependency categories, the two badge-acceptance heuristics, per-candidate return schema), so scan quality does not vary run-to-run |
| [../../reference/vocabulary.md](../../reference/vocabulary.md) (`/architecture:principles`) | Applying the deletion test, or naming anything in a candidate, report, or interview turn. The terms are used exactly, not paraphrased |
| [research/deepening/dependencies.md](research/deepening/dependencies.md) | Classifying a candidate's dependencies, where the category chooses the testing strategy |
| [research/deepening/html-report.md](research/deepening/html-report.md) | Writing the report record the builder renders: its fields, the card parts and their order, the page order, the header's evidence counts, the diagram patterns, and the Mermaid label rule |
| [research/deepening/interface-design.md](research/deepening/interface-design.md) | Entering the Design-It-Twice branch, or a single proposed shape is not converging in the interview loop |
| [research/boundaries/README.md](research/boundaries/README.md) | Running the boundaries lens: what counts as a boundary rule, mapping a rule's module names to graph nodes, what manifest edges cannot show, and the findings-row template |
| [research/enforcement-ladder.md](research/enforcement-ladder.md) | Running the boundaries lens: Phase 1 reads its "Where boundary rules live" list each run |
| [research/conventions/README.md](research/conventions/README.md) | Running the conventions lens: the kinds it derives and the evidence each needs, where each kind of proposal goes, and how a boundary rule is written into the architecture concern file |
| [../../reference/improvement-steps.md](../../reference/improvement-steps.md) | A lens playbook cites one of its sections: base freshness, scope and fan-out, recorded decisions, the convention home and its exit codes, memory-tier writes, badge bands, the hand-off |

The lens playbooks and the shared steps write the plugin root as `<plugin-root>`, which is
`${CLAUDE_PLUGIN_ROOT}`, and this skill's directory as `<skill-dir>`, which is
`${CLAUDE_SKILL_DIR}`. Put those paths in place of the placeholders before running a command.

## What this skill does not do

- **Does not plan implementation.** Produces candidates + agreed shape; a planning step plans the work
- **Does not enforce rules.** A rule-enforcement reviewer does that reactively on a diff. The boundaries lens proposes enforcement through a findings file and writes no test
- **Does not apply mechanical tidyings.** Code-level tidyings (rename, extract, inline) are a separate, smaller-grained concern
- **Does not review a diff.** Pre-merge review tools do that
- **Does not write code.** Discovery and design skill only
- **Does not brainstorm a rough problem.** This skill hunts architecture friction on its own lenses; open-ended "how could we approach X" divergence is a brainstorming concern
- **Does not render another repository's files to HTML** until this lane is wired through the rendered-views escape helper. A scan of a repository that is not the user's own delivers the durable candidate artifact and says in one line why no page was produced (`actions/deepening.md`, Phase 2)

## Composition

Graceful degradation: where a named step below is not available in the consuming project, inline the equivalent work in this session instead of blocking on it.

| When | Then | How |
|------|------|-----|
| A debugging pass finds an architectural root cause | Run this skill's deepening lens | Structured deepening review of the affected module |
| A candidate shape is agreed | Hand off to `/planning:design` (if enabled), whose handoff carries the shape into the plan; else summarize the agreed shape for design and planning | Consumes the `agreed-shape` entry from the candidate artifact (see `actions/deepening.md`) |
| During the interview loop | Maintain resolved project vocabulary | Invoke `/domain-driven-design:ubiquitous-language curate` (if enabled) via the Skill tool when available in the current session; otherwise update an existing consumer-declared glossary in its own shape |
| Post-improvement | Review the implemented changes with the project's review tool | Standard diff review |
| The boundaries lens wrote a findings file | Offer `/corrections:codify findings <file>` (if enabled); never run it unasked | Without it, the report states each confirmed rule and the architecture test it calls for (`actions/boundaries.md`, Phase 4) |
| The user accepts a conventions-lens proposal | Route it by kind: a boundary rule into the architecture concern file's `## Boundary rules` section; a divergence to `/corrections:codify` (if enabled); a paved-path entry to `/discipline:reuse-or-replace` (if enabled), which writes it after its own yes | Without the routed skill, the report carries the description or the draft (`actions/conventions.md`, Phase 4) |

## Next

- A deepening candidate's shape is agreed: /planning:plan.
- A finding is about coupling between modules: /coupling:reduce.
- A boundary rule is recorded and nothing enforces it yet: /architecture:enforce-boundaries.
- An agreed candidate's module has no tests to protect the refactor: /testing:write, characterization tests first.

## Related

- Co-change folder layout check: /architecture:improve-layout.
- Cross-dimension improvement hunt: /improvement:find.
- Curate domain vocabulary during interview: /domain-driven-design:ubiquitous-language.
- Paved-path convention proposal: /discipline:reuse-or-replace.

## Gotchas

Failure modes this lens runs into, each stated as the rule it implies.

- **The durable candidate artifact is a per-project memory-tier file, never `${CLAUDE_PLUGIN_DATA}`.** Even resolved it points at a plugin-global dir with no project dimension that collides candidates across projects. Pointer: when deciding what may live in that directory and when it is removed, fetch [plugins reference § Environment variables](https://code.claude.com/docs/en/plugins/manifest-reference#environment-variables) and [plugin components § Reference plugin paths and store data](https://code.claude.com/docs/en/plugins/components#path-variables-and-persistent-data) live. The artifact lands in the memory tier, default `.work/<topic-slug>/`. A `${CLAUDE_PROJECT_DIR}/.claude/...` path is also wrong: `.claude/` generated output is reserved for observability, and an unignored artifact there leaks scan output into git.
- **Unattended output is treated as public.** A routine's log or a filed item can be read by anyone with access to the repository, so a security defect reaches neither the candidate file nor the final output beyond its placeholder line (`actions/deepening.md`, "Unattended mode").
- **Scan-agent claims are shipped only after Phase 1.5 reproduction, or labeled `unverified`.** Exploration subagents infer from partial reads, so a claim that a service is unused or a call path is dead can be wrong in a way a single grep settles. Any candidate headed for a `Strong` badge and any runtime-bug / dead-code claim is reproduced against the actual code before it reaches the user-facing report; under the `light` and `off` verification levels it is labeled `unverified` instead. The report lends every claim its authority, so an unreproduced overstatement is cheap to make and expensive to reputation.

Files in this skill

  • SKILL.md7.9 KB
  • actions/deepening.md15.2 KB
  • evals/evals.json7.8 KB
  • research/deepening/dependencies.md2.5 KB
  • research/deepening/html-report.md6.6 KB
  • research/deepening/interface-design.md5.6 KB
  • research/deepening/scan-briefing.md4.1 KB
  • research/deepening/vocabulary.md3.3 KB

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.

View all in ai-agents →

Comments

Loading comments…

Newsletter

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