hardening-codebase

hardening-codebase is a skill for Claude Code from qte77/claude-code-plugins. It costs 44 tokens per session (1,094 once invoked), scanned A, original, Apache-2.0.

A staged codebase review and tightening process for architecture, lint rules, type checking, tests, documentation, and code review.

In plain words
What is it for?
Use it when taking over a project, preparing for a release, or making validation checks less permissive.
Why use it?
It finds weak quality checks and raises them gradually, helping a project become stricter without changing application code during the configuration phase.

Skill for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: mentions Claude Code.

Part of the codebase-tools plugin — 2 skills, 1 agent shipped together

Good fit Use it when taking over a project, preparing for a release, or making validation checks less permissive.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/qte77/claude-code-plugins/hardening-codebase
Install

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.

Any agent
npx skills add qte77/claude-code-plugins --skill hardening-codebase
Clone the repo
git clone --depth 1 https://github.com/qte77/claude-code-plugins

Made for: Claude Code.

Or install codebase-tools, the plugin that ships this one along with the rest of its 2 skills, 1 agent.

Wrote 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.

agentmods badge for hardening-codebase

README.md
[![agentmods](https://agentmods.dev/badge/skills/qte77/claude-code-plugins/hardening-codebase/github.svg)](https://agentmods.dev/skills/qte77/claude-code-plugins/hardening-codebase)
Your own site
<a href="https://agentmods.dev/skills/qte77/claude-code-plugins/hardening-codebase"><img src="https://agentmods.dev/badge/skills/qte77/claude-code-plugins/hardening-codebase/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for hardening-codebase

Your own site · 80×15
<a href="https://agentmods.dev/skills/qte77/claude-code-plugins/hardening-codebase"><img src="https://agentmods.dev/badge/skills/qte77/claude-code-plugins/hardening-codebase.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,094 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00044 $0.01094
Opus 5.5 $0.00018 $0.00438
Sonnet 5.5 $0.00009 $0.00219
Haiku 4.5 $0.00004 $0.00109

Measured 1mo ago against content hash 24cc41579608, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

hardening-codebase scanned grade A with 0 findings 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 1mo 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/codebase-tools/skills/hardening-codebase/SKILL.md · 127 lines

How it starts

The opening of the file, as written. The whole thing — 127 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Harden Codebase

Scope: $ARGUMENTS (default: full)

Systematic quality tightening. Nine phases, each with a clear gate. KISS: tighten one level at a time — never jump to max strictness.

Phase 1: ARCHITECTURE (read-only)

  1. Identify entry points, module boundaries, and dependency flow
  2. Map layering: which modules depend on which?
  3. Flag circular dependencies and boundary violations
  4. Output module map as indented text tree (plain markdown, no diagrams)
  5. Note undocumented coupling, god modules, misplaced responsibilities

Gate: Module map + issue list. Present to user before proceeding.

Phase 2: AUDIT (read-only)

  1. Does make setup_all (or equivalent) work from scratch?
  2. What lint rules are enabled? Gap vs recommended? See references/lint-tightening-checklist.md
  3. Type checker strictness level?
  4. Do tests pass? Are slow/hardware tests filtered?
  5. Is check-only gate separate from auto-fix?

Gate: Issue list ranked HIGH/MEDIUM/LOW. Present to user before proceeding.

Phase 3: TIGHTEN (config only — no code changes)

  1. Enable next-level lint rules (baseline → recommended, not strict)
  2. Bump type checker one level
  3. Split auto-fix from check-only gate if missing
  4. Add test marker filters for slow/hardware/network
  5. Count new violations — report before fixing

Gate: Config committed. Violation count known.

Phase 4: FIX (mechanical)

  1. Run auto-fix
  2. Fix remaining violations manually
  3. Update tests broken by signature changes
  4. make validate must pass

Gate: All checks green. Commit fixes.

Phase 5: DOCS QUALITY

  1. Does README exist and reflect current state?
  2. Are public APIs documented (docstrings, JSDoc, rustdoc)?
  3. Are architecture decisions recorded (ADRs or equivalent)?
  4. Do inline comments explain why, not what?
  5. Are there stale/misleading docs that contradict the code?
  6. Enforce KISS in docs — no walls of text, no redundant sections
  7. Enforce DRY — single source of truth, no copy-pasted explanations
  8. Enforce YAGNI — remove docs for features that don't exist

Read the full file on GitHub · 127 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

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.

  1. 1mo ago First seen · 127 lines · 44 tokens per session scan A 24cc41579608

Subscribe to this mod's changes

hardening-codebase is a skill published in the GitHub repository qte77/claude-code-plugins (3 stars, last pushed 4d ago), licensed Apache-2.0. It adds 44 tokens to every session and 1,094 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

codex-advisor

Advisory consultation skill for architectural reviews, design decisions, code analysis, and technology evaluation. Codex provides recommendations without making code changes. Invoked by phrases like "consult Codex", "get Codex's opinion", "ask Codex about", "have Codex review", "Codex analysis", "validate this…

and3r817/dot-claude-plugins · 85 tokens

code-review

Review code for actionable defects. Correctness is the core; performance and security are optional sub-cases of the same engine. Anchors on agreements between participants across a boundary, forces a violating execution, and refutes every candidate before reporting. Use when asked to review changes, find bugs, audit a…

phuryn/pm-skills · 74 tokens

intended-vs-implemented

The method for finding the gap between what a system is supposed to do and what the code actually does — the class of bug generic scanners miss because they have no model of intent. Defines what counts as documented intent, what counts as implementation evidence, which mismatches matter, and how to avoid hand-wavy…

phuryn/pm-skills · 95 tokens

improve-code-quality

Guided journey from a working-but-untested vibe-coded prototype to a production-ready product with tests, clean structure, a business-rules boundary, and resilience at scale. Orchestrates nine skills phase by phase - working-with-legacy-code, clean-code, refactoring-patterns, software-design-philosophy…

wondelai/skills · 227 tokens

refactoring-patterns

Apply named refactoring transformations to improve code structure without changing behavior. Use when the user mentions "refactor this", "code smells", "extract method", "replace conditional", "technical debt", "move method", "inline variable", "decompose conditional", or "clean up this messy code". Also trigger when…

wondelai/skills · 125 tokens

team-review

Review changed code for reuse, quality, and efficiency using a team of persistent named reviewers. This skill should be used when the user says "team review", "review with team", or wants parallel code review with persistent team members for follow-up questions. Similar to /subagent-review but reviewers persist after…

NikiforovAll/claude-code-rules · 65 tokens