agentleFS
rommelporrasrommelporras/kiro-config/skills/codebase-audit/SKILL.md

codebase-audit

Skill13 starsChanged 7 months agoMITView on GitHub

Periodic codebase health check. Use when the user says "health check", "technical debt", "what needs attention", "codebase audit", "codebase health".

28 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use cloud-api-recipe-authoring, codebuddy-ide-mcp-upgrade and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • TencentCloudBaseSkill

    cloud-api-recipe-authoring

    Author or revise a cloud-api-operations recipe (config/source/skills/cloud-api-operations/references/recipes/). Encodes why the long tail of control-plane capabilities is deliberately NOT wrapped as MCP/CLI tools, the API-first admission test for whether a capability deserves a recipe, the negative and positive lists, the fixed recipe structure, the writing rules distilled from writing-for-agents, the user-facing copy red lines, and the product regeneration/verification pipeline. Also routes contributors (and their agents) to the contribution flow and the pre-PR self-test protocol in references/contributing.md. Use when adding a recipe, judging whether a scenario belongs in the recipe set, updating the recipes index, re-checking existing recipes against the admission test, or onboarding someone who wants to submit one.

    Also in 3 projects that use this

  • TencentCloudBaseSkill

    codebuddy-ide-mcp-upgrade

    升级 CodeBuddy IDE(genie 扩展)内置的 CloudBase MCP,以及 MCP 发版时同步 IDE 侧白名单。当用户提到「更新 IDE 里的 MCP」「内置 MCP 版本太老」「IDE 集成的 CloudBase 功能不足」「改工具白名单 toolWhiteList」「把新 bundle 打进 CodeBuddy」「白名单漂移」「MCP 发版要同步什么」时使用。覆盖:解包定位内置 bundle 与内嵌配置、重新构建 mcp bundle、生成新的工具白名单与系统提示词、安全注入 IDE 并备份、用 MCP 协议验证工具清单、人工端到端验收、一键回滚。

    Also in 3 projects that use this

  • frostneySkill

    native-nostalgia-stack

    Applies the user's FreePascal toolchain and its build, formatting, hook, and test contracts while leaving project-specific mechanics local. Use when scaffolding or working in a FreePascal project that follows this toolchain.

    Also in 3 projects that use this

  • frostneySkill

    software-engineering-excellence

    Applies the user's engineering standards during substantial technical work: preserve scope, use current evidence, delegate independent parts, and complete authorized outcomes. Use during substantial implementation, debugging, refactoring, or multi-part delivery work.

    Also in 3 projects that use this

  • withpiperSkill

    roadmap-review

    Audit roadmap health — issues, dependency order, spec coverage, doc freshness. Use when speccing a new initiative. Use when /phase-plan output looks suspicious. Use before /roadmap-create reruns.

    Also in 3 projects that use this

  • zaxbysauceSkill

    pr-review-fix

    Codex adapter for addressing pull request review feedback in opencode-swarm. Use when the user asks to fix PR review comments, requested changes, reviewer findings, CI-review notes, or a pasted review summary with low false-positive tolerance.

    Also in 3 projects that use this

  • +6 more from TencentCloudBase

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 5 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 28 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run a health check on the current repository and report findings.

    line 8
  2. Distinctive:

    Before running any checks, detect the project type from config files:

    line 14
  3. Distinctive:

    Run the appropriate linter for the detected project type.

    line 37
  4. Distinctive:

    Run commands, don't guess — show real numbers

    line 115
  5. Distinctive:

    When running as part of the refactor pipeline, structured findings feed directly into devops-reviewer's analysis and devops-refactor's …

    line 117

“Common” is measured: kept by at least 6 in 10 of the 28 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Codebase Audit

Run a health check on the current repository and report findings.

Announce at start: "Running codebase audit on [repo name]."

Project-Type Detection

Before running any checks, detect the project type from config files:

  • pyproject.toml present → Python project (run ruff, mypy, pytest, bandit)
  • package.json present → TypeScript/Node project (run eslint, tsc, vitest)
  • *.sh files present → Shell scripts (run shellcheck)
  • Multiple indicators → run all applicable toolchains
  • None found → skip automated quality gate, warn: "No pyproject.toml or package.json found — skipping automated quality checks."

Scope Limits (large codebases)

  • Scan to depth 3 only
  • Prioritize files changed in the last 30 days (git log --since="30 days ago" --name-only)
  • Cap findings at 20 — if more exist, note "N additional findings omitted"

Checks (run in order)

1. Churn Analysis

git log --format=format: --name-only --since="90 days ago" | sort | uniq -c | sort -rn | head -20

Most-changed files = highest risk for bugs and complexity growth.

2. Complexity Hotspots

Run the appropriate linter for the detected project type. Flag:

  • Functions over 30 lines
  • Cyclomatic complexity > 10
  • Files over 300 lines

3. Test Coverage

uv run pytest tests/ -q --cov --cov-report=term-missing 2>/dev/null || echo "No pytest found"

Flag modules with < 70% coverage.

4. Dependency Health

uv pip list --outdated 2>/dev/null || pip list --outdated 2>/dev/null || echo "No pip found"

Flag packages > 2 major versions behind.

5. TODO/FIXME Inventory

grep -rn "TODO\|FIXME\|HACK\|XXX" --include="*.py" --include="*.sh" . | grep -v .venv | grep -v __pycache__

Count and list untracked debt markers.

6. Doc Health

Check documentation integrity:

  • Internal links: For each .md file in docs/, verify that relative links resolve to existing files.
  • Spec implementation: For each spec in docs/specs/, check that the files it describes actually exist in the codebase.
  • README counts: Extract counts mentioned in README.md (skills, agents, steering docs) and compare against actual counts on disk.
  • Stale docs: Flag any doc in docs/ not modified in 30+ days that references files changed in the last 30 days.
# Find docs not updated in 30+ days
find docs/ -name "*.md" -not -newer "$(date -d '30 days ago' +%Y-%m-%d 2>/dev/null || date -v-30d +%Y-%m-%d)" 2>/dev/null

Structured Findings Format

Each finding must include all five fields:

FieldValues
CategoryDRY violation | God object | stale test | dead code | dependency issue | structural problem | doc staleness
Locationfile:line
Severityhigh | medium | low
Effortsmall (< 30 min) | medium (1-2 hrs) | large (half day+)
AgentWhich agent would fix this: devops-python, devops-typescript, devops-refactor, devops-docs, devops-shell

Report Format

## Codebase Audit — [repo] — YYYY-MM-DD

### Project Type
Detected: [Python | TypeScript/Node | Shell | Mixed]

### Churn (top 10 most-changed files)
| File | Changes (90d) | Concern |

### Findings (max 20)
| # | Category | Location | Severity | Effort | Agent | Description |

### Doc Health
| Doc | Issue | Severity |

### Dependencies
| Package | Current | Latest | Behind |

### Debt Markers
TODO: X | FIXME: Y | HACK: Z

### Summary
2-3 sentence overall assessment with top 3 recommended actions.

Guidelines

  • Run commands, don't guess — show real numbers
  • Present to user for review — never auto-fix
  • When running as part of the refactor pipeline, structured findings feed directly into devops-reviewer's analysis and devops-refactor's execution list

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.