Command Palette

Search for a command to run...

Назад к скиллам
скилл № 76245

bip-decay-audit

Sweep a repo for the decay modes Armin Ronacher calls out in agent-written codebases — duplicate symbols, monster files, zombie code, scaffolding duplication…

БесплатноБез исполняемых скриптов
matsenот matsen★ 35 звёзд на GitHub

Установить bip-decay-audit в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

/bip-decay-audit

Periodic codebase-health sweep for an agent-written repository.

Context

The decay axes (greppability, component extraction, monster files, zombie code, test asymmetry) come from Armin Ronacher, "Agentic Coding Recommendations".

This skill produces signals; the user decides what to act on. For per-diff review use /bip-pr-review or @clean-code-reviewer.

Usage

/bip-decay-audit                 # sweep current repo, compare to last run
/bip-decay-audit --baseline      # record this run as the new baseline (first use, or after a refactor)
/bip-decay-audit --no-compare    # run fresh, don't load previous state
/bip-decay-audit --src <path>    # sweep a subdirectory (default: src/ if it exists, else repo root)
/bip-decay-audit --full          # include expensive optional signals

Workflow

Step 1: Locate state

Per-repo state lives at .bipartite/audit/ (add to .gitignore if not already covered). Structure:

.bipartite/audit/
  baseline.json       # the last committed-to-baseline run
  history/
    2026-04-21.json
    2026-04-28.json
    ...
  config.yml          # repo-specific thresholds (optional)

If .bipartite/audit/baseline.json does not exist, this is a first run: collect signals and write the report with no deltas, and suggest --baseline unless it was passed.

Step 2: Detect languages and pick metric adapters

Detect languages from the source tree and pick adapters:

Language Detection Generic-name set "Public function" pattern
Zig *.zig present, build.zig at root run, compute, get, init, build, apply, step, score, update, handle, process ^pub fn <name>(
Go go.mod at root Run, Get, Process, Handle, Init, Build, New ^func [A-Z][A-Za-z]+(
Python pyproject.toml / setup.py at root run, get, process, handle, main, step ^def <name>\( (module-level only)
Rust Cargo.toml at root run, get, process, handle, new, init, build ^pub fn <name>(

If no adapter matches, print the detected files and stop.

Step 3: Collect signals

Each signal is one rg/wc/find invocation; do not read full files or spawn subagents (Step 3.5 is the exception). Skip _ignore/, zig-cache/, zig-out/, target/, build/, .pixi/, node_modules/, experiments/, and testdata/. Thresholds (e.g. the 1500-LOC monster cutoff; a Python webapp might use 500) are overridden in .bipartite/audit/config.yml.

Required signals, for each detected language:

  1. pub fn <generic> counts. For each name in the generic-name set, rg -c "^<pattern>" <src> and sum across files. Report per-name count plus list of files.

  2. Top 20 duplicated public symbols. rg -oh "^<public-fn-pattern>" <src> | sort | uniq -c | sort -rn | head -20. Report name, count, and 5-file sample.

  3. Monster files. find <src> -name '*.<ext>' -exec wc -l {} + then threshold. Report files > 1500 LOC; flag any new since baseline.

  4. TODO/FIXME/XXX/HACK/BUG. rg -c "TODO|FIXME|XXX|HACK|BUG" per-file, sorted by density (markers per 100 LOC). Top 10 files plus total count.

  5. Disabled/skipped tests. rg "if \(false\)|SkipZigTest|@pytest\.mark\.skip|t\.Skip\(|\.skip\(" per-file. Total count.

  6. Commented-out code heuristic. Per file: count lines matching ^\s*//\s*(if|while|for|fn|return|try|const|var|pub|test|def|func)\b (adjust comment token per language). Top 10 files by count.

  7. CLI parser duplication. Report the count of distinct CLI sites:

    • Zig: rg -l "^pub const CliConfig" ∪ rg -l "^pub const CliError" ∪ rg -l "^pub fn parseArgs".
    • Go: rg -l "cobra\.Command{" and total RunE: function count.
    • Python: rg -l "argparse.ArgumentParser|click.command".
  8. Files larger by > 30% since baseline. wc -l compared to baseline.json.

  9. New files since baseline without a sibling test. Diff find <src> against baseline; for each new file, check for a corresponding tests/test_<name>.* or <name>_test.<ext> (per language); flag any without one.

  10. Module coupling (optional, if supported by language). For Zig: rg "@import\(\"\.\./" <src> | awk -F/ '{print $1,$3}' | sort -u → edges; flag any bidirectional edge.

Under --full, also collect: function LOC distribution, per-module test LOC ratio, and symbols defined in > 1 file that were defined in exactly 1 file in baseline.

Step 3.5: Comments that justify a workaround (--full)

A comment that explains away odd code often hides a workaround or a bug (poteto, pstack). This step reads shared code only: the package, not experiments/, tests or scripts. Experiment code is the record a result was computed from, and a package bug that a notebook reaches is found through the package.

  1. Pull each comment block and keep those matching `w
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл bip-decay-audit?

Sweep a repo for the decay modes Armin Ronacher calls out in agent-written codebases — duplicate symbols, monster files, zombie code, scaffolding duplication, test asymmetries — and diff against a previous run. Not a PR reviewer; a whole-repo weather check.

Как установить скилл bip-decay-audit?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл bip-decay-audit запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить bip-decay-audit с