improve-codebase-architecture

improve-codebase-architecture is a skill for Codex from macintog/codex-spine. It costs 63 tokens per session (378 once invoked), scanned A, original, MIT.

A guide for finding clearer boundaries and better structure in a software codebase. It focuses on putting related behavior together so the code is easier to understand and test.

In plain words
What is it for?
It is for architecture reviews and refactoring work, including consolidating modules, improving test seams, and making code easier for developers and coding agents to navigate.
Why use it?
It helps when important concepts are spread across many small modules, modules depend too closely on each other, or code structure does not match how the system works.

Skill for Codex

Written for Codex: agents/openai.yaml present.

Good fit It is for architecture reviews and refactoring work, including consolidating modules, improving test seams, and making code easier for developers and coding agents to navigate.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/macintog/codex-spine/improve-codebase-architecture
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 macintog/codex-spine --skill improve-codebase-architecture
Clone the repo
git clone --depth 1 https://github.com/macintog/codex-spine

Made for: Codex.

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 improve-codebase-architecture

README.md
[![agentmods](https://agentmods.dev/badge/skills/macintog/codex-spine/improve-codebase-architecture/github.svg)](https://agentmods.dev/skills/macintog/codex-spine/improve-codebase-architecture)
Your own site
<a href="https://agentmods.dev/skills/macintog/codex-spine/improve-codebase-architecture"><img src="https://agentmods.dev/badge/skills/macintog/codex-spine/improve-codebase-architecture/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 improve-codebase-architecture

Your own site · 80×15
<a href="https://agentmods.dev/skills/macintog/codex-spine/improve-codebase-architecture"><img src="https://agentmods.dev/badge/skills/macintog/codex-spine/improve-codebase-architecture.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 63 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 378 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00063 $0.00378
Opus 5.5 $0.00025 $0.00151
Sonnet 5.5 $0.00013 $0.00076
Haiku 4.5 $0.00006 $0.00038

Measured 19d ago against content hash a4ee87dcfe6f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

improve-codebase-architecture 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 19d 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.

skills/improve-codebase-architecture/SKILL.md · 19 lines

What it actually says

Architecture audit

Goal: less effort to use, change, and debug the code, with required behavior preserved. Fewer files or lines is not by itself an improvement.

  1. Establish the need first. Read callers, docs, ADRs, tests, and history before judging a mechanism; code that looks redundant may encode a domain rule.
  2. Look for:
    • One rule implemented in two places that disagree, especially across languages or processes (a pre-check here, an enforcer there). Name the inputs on which they diverge.
    • Sibling paths (create/update, push/PR, CLI/API) whose names, owners, validation, or failure handling differ without a domain reason. Keep asymmetries the domain justifies.
    • Shallow modules whose callers must know their internals (protocols, sentinels, ordering). Deepen; do not split.
    • Deletion test: if a module were removed, would its responsibility vanish or move into callers? Name what would move.
  3. Avoid: new interfaces or ports with one implementation, merging code that changes for different reasons, rewrites, cosmetic renames, invented metrics.
  4. Report a few ranked candidates, each with file:line evidence, the concrete friction, the change, its migration cost, and the test that pins current behavior. "Keep as is" and "insufficient evidence" are valid results. Write in the project's own vocabulary, not architecture jargon.
  5. Stop at recommendations unless the user selected a candidate to implement.
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. 19d ago Changed · -73 lines · -22 tokens per session a4ee87dcfe6f
  2. 1mo ago Changed · +3 lines · +9 tokens per session f3d786eb28ea
  3. 1mo ago First seen · 89 lines · 76 tokens per session scan A 554e8daf4c61

Subscribe to this mod's changes

improve-codebase-architecture is a skill published in the GitHub repository macintog/codex-spine (12 stars, last pushed yesterday), licensed MIT. It adds 63 tokens to every session and 378 once invoked, about $0.0003 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.