better-codebase

A guided skill for reviewing and improving an existing codebase as a whole. It covers structure, complexity, repeated code, maintainability, dependencies, testing, and performance.

In plain words
What is it for?
Running a codebase audit, creating a prioritized refactoring plan, or implementing selected improvements while preserving intended behavior.
Why use it?
It helps connect related problems and find root causes instead of fixing isolated code smells without considering the rest of the system.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/nicolasyusim/better-codebase/better-codebase
Any agent
npx skills add NicolasYusim/better-codebase --skill better-codebase
Clone the repo
git clone --depth 1 https://github.com/NicolasYusim/better-codebase

Made for: Claude Code, Codex.

Per session 101 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,959 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00101 $0.01959
Opus 5 $0.00051 $0.00979
Sonnet 5 $0.00020 $0.00392
Haiku 4.5 $0.00010 $0.00196

Measured yesterday against content hash 33f9ab0b0978, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

better-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 yesterday.

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.

skills/better-codebase/SKILL.md · 206 lines

How it starts

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

Improve the codebase as one system

Preserve intended behavior, find root causes instead of isolated smells, and prefer the smallest safe change with the highest maintainability impact.

Own orchestration only. Let each specialized skill own its domain rules:

Skill Ownership
better-architecture Boundaries, dependency direction, coupling, cohesion, and system structure
better-simplicity Unnecessary complexity and the simplicity review of every proposed change
better-duplication Repeated knowledge and unsafe or missing abstractions
better-maintainability Local clarity, control flow, side effects, naming, and changeability
better-dependencies Dependency necessity, health, compatibility, and upgrade risk
better-testing Behavioral protection, test design, confidence, and testability
better-performance Measured bottlenecks and established complexity problems

Never duplicate or override domain rules here.

Resolve the request

Resolve three independent inputs: depth, action, and scope. State all three in the result.

Depth

Depth Coverage Finding cap
quick Default. Inspect the requested scope or a risk-weighted complete slice. Report only high- and medium-impact findings. 7
full Inspect the entire credible scope across every available owner, including tests, manifests, boundaries, and runtime evidence when relevant. 20

Never claim repository-wide coverage from a sample. If a full review is too large, narrow it to a complete subsystem or end-to-end path and name the boundary.

Action

Action Behavior
review Default. Remain read-only and return evidence-backed findings.
plan Remain read-only and turn confirmed findings into ordered, reversible steps.
implement Modify only explicitly selected findings or a scope the user clearly approved, then verify each step.

Treat a bare implement with no prior report, finding IDs, or explicit change scope as review + plan. Do not choose an unbounded refactor on the user's behalf.

Read the full file on GitHub · 206 lines

Files

What ships with it

3 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. yesterday First seen · 206 lines · 101 tokens per session scan A 33f9ab0b0978

Subscribe to this mod's changes

better-codebase is a skill published in the GitHub repository NicolasYusim/better-codebase (1 stars, last pushed 23d ago), licensed MIT. It adds 101 tokens to every session and 1,959 once invoked, about $0.0005 per session on Opus 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

issue-triage

Issue triage: audit open issues, categorize, detect duplicates, cross-ref PRs, risk assessment, post comments. Args: "all" for deep analysis of all, issue numbers to focus (e.g. "42 57"), "en"/"fr" for language, no arg = audit only in French.

rtk-ai/rtk · 70 tokens

performance

CLI performance optimization - startup time, memory usage, token savings benchmarking.

rtk-ai/rtk · 13 tokens

build-teaql-app

Build or change a TeaQL application in Java, Rust, Go, Swift, Python, C#/.NET, or TypeScript, including Kotlin/JVM applications that consume Java-generated libraries. Mandatory order: first draft and save a complete KSML model, then verify the client and evaluate that saved model, repair it through repeated evaluation…

teaql/teaql-agent-kit · 112 tokens

orchestrator-lanes

Claude Code dev-orchestrator only. File-based multi-lane PM playbook (score, DAG, run-controller, L0/L1/L2, ship). Use when this session IS that agent, or user says info / справка / lane-stack:orchestrator-lanes info. SKIP: Grok, Codex, Kimi, Qwen, AGY, Cursor writer CLIs and any default coding agent — do not load, do…

VKirill/claude-lane-stack · 104 tokens

self-assessment

Interactive skill assessment with personalized learning path generation.

FlorianBruniaux/claude-code-ultimate-guide · 12 tokens

source-command-methodology-advisor

Analyzes your codebase and asks 3 targeted questions to recommend the right AI-assisted development methodology stack.

FlorianBruniaux/claude-code-ultimate-guide · 27 tokens