Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add tomzx/agents --skill improve-codebasegit clone --depth 1 https://github.com/tomzx/agentsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/tomzx/agents/improve-codebase)<a href="https://agentmods.dev/skills/tomzx/agents/improve-codebase"><img src="https://agentmods.dev/badge/skills/tomzx/agents/improve-codebase.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00096 | $0.04764 |
| Opus 5 | $0.00048 | $0.02382 |
| Sonnet 5 | $0.00019 | $0.00953 |
| Haiku 4.5 | $0.00010 | $0.00476 |
Grade B, and why
improve-codebase scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Asks the agent to reveal its instructionsmediumSystem prompt leakage
Directions to print, repeat or translate the system prompt extract configuration the operator did not intend to expose.
For `--dry-run`, write the full report to `.sdlc/improvement-dryrun-<YYYY-MM-DD>.md` and print it. For `--no-pr`, leave the local branch in place and print instructions to review and push. How it starts
The opening of the file, as written. The whole thing — 392 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Improve Codebase
Makes a bounded set of safe, verified improvements to a codebase, then opens a single reviewable PR. Designed to run on a weekly cadence so the codebase gets incrementally better without a big-bang refactor.
The Core Problem This Solves
/audit-sdlc and /sync-repository tell you what is wrong. They produce reports and issues, but the work of actually deleting the dead export, adding the missing type annotation, and running the formatter still falls to a human. That backlog grows faster than anyone clears it.
This skill closes that loop. Each run it scans for the same opportunities the audit skills find, picks a small batch that is safe to apply automatically, applies it, proves it is safe by running the project's own lint/typecheck/test suite, and ships it as one PR. Over weeks, the backlog shrinks instead of grows.
How It Differs From Related Skills
| Skill | Reads code | Writes code | Opens PR | Cadence |
|---|---|---|---|---|
audit-sdlc |
yes | no (report only) | no | on demand |
sync-repository |
yes | .sdlc/ only, or --fix |
no | on demand |
improve-codebase |
yes | yes, source code | yes | weekly routine |
Use audit-sdlc to find problems. Use improve-codebase to fix the safe ones automatically.
Prerequisites
- Working directory is the root of a
gitrepository on a clean working tree (no uncommitted changes) - A default branch to branch from (
main, or the repo's detected default) - A way to verify changes: a test suite, a linter/formatter, or a typechecker. The skill discovers these (see Discovery below). If none can be found, it runs in
--dry-runonly and asks the user to record commands inAGENTS.md. - Read any files under
.sdlc/context/for project conventions - Network access to push the branch and open a PR (unless
--no-pr)
Safety Contract (Non-Negotiable)
These rules make the skill safe to run unattended on a schedule:
- Never touch the default branch. All work happens on a short-lived branch.
- Never auto-fix anything rated higher than "low risk". Security issues, dependency majors, complexity refactors, and public API changes become issues, not commits.
- Never skip verification. Every change must be validated by the project's own checks. If verification fails, revert that change and continue with the next candidate.
- One concern per commit, one PR per run. Reviewers see small atomic commits, not a wall of diff.
- Respect
.gitignore, lint configs, and existing suppression comments (# noqa,//nolint). Do not fight the project's stated preferences. - Never force-push, never amend published commits, never bypass hooks.
- Bounded output. A run stops at the change budget so the PR stays reviewable.
- Never introduce new dependencies. Only removes or patches existing ones.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 4d ago First seen · 392 lines · 96 tokens per session scan B f1d91c9a5bef
improve-codebase is a skill published in the GitHub repository tomzx/agents (6 stars, last pushed 4d ago), licensed MIT. It adds 96 tokens to every session and 4,764 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it B with 1 finding (asks the agent to reveal its instructions). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other skills, from other repositories
adversarial-reviewer
Adversarial code review that assumes bugs exist and hunts for them. Use when asked to review code, find bugs, audit for correctness, stress-test a PR, or when someone says "tear this apart" or "what's wrong with this". Give no benefit of the doubt — every line is guilty until proven innocent.
go-testing
Trigger: Go tests, go test coverage, Bubbletea teatest, golden files. Apply focused Go testing patterns.
semgrep-rule-variant-creator
Creates language variants of existing Semgrep rules. Use when porting a Semgrep rule to specified target languages. Takes an existing rule and target languages as input, produces independent rule+test directories for each language.
include-test-files-that-assert-on-behavior-being-changed-in-decl
When delegating a task affected by this skill, include.
brooks-sweep
Full-sweep mode: runs a unified analysis across all quality dimensions — code decay, architecture, tech debt, and test quality — then applies fixes directly to the codebase. Safe changes are auto-applied; risky changes are confirmed before execution. Drawing on twelve classic engineering books. Triggers when: user…
plugin-review
Review plugin quality with tiered checks and dependency scoping. Use for PR and pre-release audits.