codebase-architecture

codebase-architecture is a skill for Claude Code, Codex from OKHP3/skillz. It costs 203 tokens per session (4,516 once invoked), scanned A, a copy of codebase-architecture, MIT.

TypeScript architecture guidance for designing or improving folders, module boundaries, and middleware pipelines. It also covers guardrails that help the structure remain understandable as the project grows.

In plain words
What is it for?
Structuring a new TypeScript app, improving an existing one, defining module contracts, and adding CI checks for architectural rules.
Why use it?
It reduces the cost of changing a codebase by making responsibilities and the preferred location for each kind of behavior clearer.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions AGENTS.md.

Good fit Structuring a new TypeScript app, improving an existing one, defining module contracts, and adding CI checks for architectural rules.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/okhp3/skillz/codebase-architecture
View source ↗ OKHP3/skillz
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 OKHP3/skillz --skill codebase-architecture
Clone the repo
git clone --depth 1 https://github.com/OKHP3/skillz

Made for: Claude Code, 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 codebase-architecture

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/okhp3/skillz/codebase-architecture"><img src="https://agentmods.dev/badge/skills/okhp3/skillz/codebase-architecture.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 203 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,516 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 95% copy Near-identical to another mod 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.00203 $0.04516
Opus 5 $0.00102 $0.02258
Sonnet 5 $0.00041 $0.00903
Haiku 4.5 $0.00020 $0.00452

Measured 6d ago against content hash a9837d44469b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

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 6d 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.

Origin

This is a copy

95% identical to codebase-architecture — 127 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

community/codebase-architecture/SKILL.md · 199 lines

How it starts

The opening of the file, as written. The whole thing — 199 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 contracts, 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-nextjs for a Next.js turborepo, scaffold-cli for a TypeScript CLI), multi-tenant domain/isolation/routing (multi-tenant-architecture), the content of AGENTS.md itself (agents-md), a diff-scoped cleanup pass (tidy), or structural review of a local diff (pr-reviewer).

Contents

  • Modes
  • References
  • Design mode (new codebase)
  • Deepen mode (existing codebase)
  • Harden mode (make it stick)
  • Validation loop
  • Output template
  • Excuses
  • Gotchas

Modes

Pick by the problem, not by the artifact.

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.

When the two look equally right, prefer Deepen. A user reporting "agents keep using the old pattern" is describing a Harden symptom, but if the cause is one concept living in two places, quarantine only freezes the duplicate in place: Deepen deletes it and Harden holds the line until that lands. Harden alone is the right answer when the old thing genuinely has to stay.

Read the full file on GitHub · 199 lines

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. 6d ago First seen · 199 lines · 203 tokens per session scan A a9837d44469b

Subscribe to this mod's changes

codebase-architecture is a skill published in the GitHub repository OKHP3/skillz (3 stars, last pushed yesterday), licensed MIT. It adds 203 tokens to every session and 4,516 once invoked, about $0.0010 per session on Opus 5. A static security scan graded it A with 0 findings. It is 95% identical to codebase-architecture, differing in 127 lines, and is treated as a copy.

Related

Other skills, from other repositories

frontend-conventions

Coding conventions, architecture patterns, and testing rules for the SkillHub React frontend. Ensures agents follow Feature-Sliced Design and use the generated OpenAPI types.

iflytek/skillhub · 36 tokens

nestjs-expert

Creates and configures NestJS modules, controllers, services, DTOs, guards, and interceptors for enterprise-grade TypeScript backend applications. Use when building NestJS REST APIs or GraphQL services, implementing dependency injection, scaffolding modular architecture, adding JWT/Passport authentication, integrating…

Jeffallan/claude-skills · 107 tokens

electron-dev

Electron desktop apps with React, TypeScript, and Vite. Use for IPC, window/tray, PTY terminals, WebRTC, and packaging.

jamditis/claude-skills-journalism · 34 tokens

react-component-generator

Generate React components with TypeScript, proper props, hooks, and accessibility. Use when creating new React components, UI elements, or refactoring existing components.

OneWave-AI/claude-skills · 35 tokens

database-orm-expert

Expert guide for database schema design, ORM tools (Prisma 6, Drizzle ORM, TypeORM), migrations, query optimization, and type-safe SQL patterns in TypeScript / Panduan ahli untuk desain skema database, ORM tools (Prisma 6, Drizzle ORM, TypeORM), migrasi, optimasi query, dan pola SQL type-safe di TypeScript.

roedyrustam/vibes-plug · 82 tokens

js-backend-expert

Expert-level skill for Node.js 24+ (LTS), Bun 1.2+, and Deno 2.x backend development. Covers Express 5, Fastify 5, Hono v4, NestJS, Prisma 6, Drizzle ORM, WebSockets, BullMQ, OpenTelemetry, and microservices in English and Indonesian.

roedyrustam/vibes-plug · 77 tokens