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 mblode/agent-skills --skill codebase-architecturegit clone --depth 1 https://github.com/mblode/agent-skillsWrote 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/mblode/agent-skills/codebase-architecture)<a href="https://agentmods.dev/skills/mblode/agent-skills/codebase-architecture"><img src="https://agentmods.dev/badge/skills/mblode/agent-skills/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.
<a href="https://agentmods.dev/skills/mblode/agent-skills/codebase-architecture"><img src="https://agentmods.dev/badge/skills/mblode/agent-skills/codebase-architecture.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00070 | $0.04569 |
| Opus 5.5 | $0.00028 | $0.01828 |
| Sonnet 5.5 | $0.00014 | $0.00914 |
| Haiku 4.5 | $0.00007 | $0.00457 |
Grade A, and why
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 11d 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.
Copies of this mod
1 near-identical copy found in the catalogue:
- codebase-architecture — 95% identical, 143 lines differ
How it starts
The opening of the file, as written. The whole thing — 188 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Codebase Architecture
Decide a TypeScript codebase's structure, improve it where change has become expensive, and make it hold. The target is a codebase a reader can hold in their head: few surfaces, one canonical way to do each job, and behaviour where you would first look for it.
- IS: folder structures, module interfaces, request context and middleware pipelines, frontend/backend boundaries; architecture briefs; domain language and decision records; domain-informed deepening; guardrail tooling, CI gates, and agent wayfinding.
- IS NOT: scaffolding a new repo (
scaffold-nextjsfor a Next.js turborepo,scaffold-clifor a TypeScript CLI), multi-tenant domain/isolation/routing (multi-tenant-architecture), the content of AGENTS.md itself (agents-md), a plan for one feature (planning), a diff-scoped cleanup pass (tidy), structural review of a local diff (tidy), or a product's own verify CLI, doctor command, and feature map (app-verification, call it by name).
Contents
- Modes
- References
- Design mode (new codebase)
- Deepen mode (existing codebase)
- Harden mode (make it stick)
- Validation loop
- Output template
- Gotchas
- Related skills
Modes
Pick by the problem, not by the artifact, and say which you picked.
| Mode | You are here when | Output |
|---|---|---|
| Design | Starting a new app, service, or surface, and the structure is not decided yet | An architecture brief |
| Deepen | The code works, but change is expensive: concepts scattered, seams leaking, one idea under three names | Ranked opportunities, then one migrated slice |
| Harden | The structure is decided and keeps decaying, or agents keep doing the wrong thing in this repo | Wired checks, markers, and recipes |
Modes compose, and running more than one is normal. Design ends in Harden, because a contract with no check is a suggestion. Deepen ends in Harden, so the new seam cannot decay back. Harden runs alone when the structure is already right and only the enforcement is missing, which is the common case in a repo that agents work in.
What ships with it
15 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.
- evals/evals.json 3.8 KB
- evals/evaluation-scenarios.md 5.4 KB
- references/agent-runtime.md 7.1 KB
- references/api-design.md 5.4 KB
- references/brief-conventions.md 5.5 KB
- references/contagion-markers.md 5.3 KB
- references/deepening-existing.md 8.7 KB
- references/distributed-correctness.md 5.7 KB
- references/domain-language.md 6.2 KB
- references/enforcement-ladder.md 10 KB
- references/guardrail-tooling.md 15 KB
- references/stack-defaults.md 1.1 KB
- references/verification-tiers.md 3.8 KB
- references/vocabulary.md 3.0 KB
- references/wayfinding.md 5.3 KB
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.
- 11d ago Changed · +8 tokens per session 295907e5ee1a
- 15d ago Changed · -25 lines · -5 tokens per session ed86d31d2be5
- 22d ago Changed · +3 lines 5201c33e8d09
- 28d ago Changed 27d124a6b719
- 1mo ago Changed · +9 lines · -136 tokens per session 5083a2839d78
- 1mo ago First seen · 201 lines · 203 tokens per session scan A 9c23eec70e6d
codebase-architecture is a skill published in the GitHub repository mblode/agent-skills (151 stars, last pushed 3d ago), licensed MIT. It adds 70 tokens to every session and 4,569 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-30.
Other skills, from other repositories
bun-runtime
Bun as runtime, package manager, bundler, and test runner. When to choose Bun vs Node, migration notes, and Vercel support.
nestjs-patterns
NestJS architecture patterns for modules, controllers, providers, DTO validation, guards, interceptors, config, and production-grade TypeScript backends.
cpp-coding-standards
C++ coding standards based on the C++ Core Guidelines (isocpp.github.io). Use when writing, reviewing, or refactoring C++ code to enforce modern, safe, and idiomatic practices.
kotlin-testing
Kotlin testing patterns with Kotest, MockK, coroutine testing, property-based testing, and Kover coverage. Follows TDD methodology with idiomatic Kotlin practices.
rust-patterns
Idiomatic Rust patterns, ownership, error handling, traits, concurrency, and best practices for building safe, performant applications.
java-coding-standards
Java coding standards for Spring Boot and Quarkus services: naming, immutability, Optional usage, streams, exceptions, generics, CDI, reactive patterns, and project layout. Automatically applies framework-specific conventions.