architecture-first

architecture-first is a skill for Claude Code from AnastasiyaW/codex-claude-code-config. It costs 143 tokens per session (1,792 once invoked), scanned A, original, MIT.

A software-design guide for deciding a system's structure before writing code, including module boundaries, dependencies, and ownership of state.

In plain words
What is it for?
Use it when planning services, websites, APIs, multi-team systems, or multi-stage work to map boundaries and keep business rules separate from technical tools.
Why use it?
It helps prevent code from becoming tangled as the project grows and makes each part's responsibilities clearer.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the claude-code-config plugin — 57 skills, 8 agents shipped together

Good fit Use it when planning services, websites, APIs, multi-team systems, or multi-stage work to map boundaries and keep business rules separate from technical tools.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/anastasiyaw/codex-claude-code-config/architecture-first
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 AnastasiyaW/codex-claude-code-config --skill architecture-first
Clone the repo
git clone --depth 1 https://github.com/AnastasiyaW/codex-claude-code-config

Made for: Claude Code.

Or install claude-code-config, the plugin that ships this one along with the rest of its 57 skills, 8 agents.

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 architecture-first

README.md
[![agentmods](https://agentmods.dev/badge/skills/anastasiyaw/codex-claude-code-config/architecture-first.svg)](https://agentmods.dev/skills/anastasiyaw/codex-claude-code-config/architecture-first)
Your own site
<a href="https://agentmods.dev/skills/anastasiyaw/codex-claude-code-config/architecture-first"><img src="https://agentmods.dev/badge/skills/anastasiyaw/codex-claude-code-config/architecture-first.svg" alt="Measured on agentmods" height="20"></a>
Per session 143 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,792 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.00143 $0.01792
Opus 5 $0.00072 $0.00896
Sonnet 5 $0.00029 $0.00358
Haiku 4.5 $0.00014 $0.00179

Measured today against content hash 262dc262dd4c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

architecture-first 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 today.

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/development/architecture-first/SKILL.md · 139 lines

How it starts

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

Architecture first — the shape before the first file

Most bad structure is not a bad decision. It is an absent one: code goes where the smallest diff puts it, and the smallest diff is always "next to the last thing". This skill exists to make the layout an explicit, cheap, early decision.

Scope guard — read first

Match the ceremony to the problem. Over-applying this is its own failure mode.

Situation What this skill asks of you
Script, spike, one file, throwaway Nothing. Skip.
One module, <500 lines, one reason to change Name the module and its one job. Stop.
Service / site / API, several concerns The full pre-code checklist below.
Multiple teams or deployables, shared domain Checklist + bounded-context map + one ADR per boundary
Multi-stage work or external release prerequisite Checklist + a small stage map before the first implementation boundary

The one law

Dependencies point inward, toward policy. Business rules must not import the web framework, the ORM, the queue, or the file layout. The reverse is required.

Violating it silently is the failure — a violation that is written down, with the reason and the cost, is a decision. A violation nobody named is erosion.

Practical test: could this module be exercised by a test with no network, no database and no framework? If not, something outer leaked inward.

Pre-code checklist — before the first file

  1. Name the modules by reason to change, not by technical layer. queue, billing, catalog — not controllers, models, utils. A module that changes for two unrelated reasons is two modules.
  2. Say what each module owns. Especially state: every piece of mutable state has exactly one owning module, and everyone else asks that module. Module-level mutable state shared across features is the coupling that later makes a split expensive.
  3. Draw the dependency arrows. Any cycle is a design bug, not a build inconvenience. Any arrow from domain to framework is inverted — fix it with an interface owned by the inner side.
  4. Establish the ubiquitous language. One term, one meaning, in code and in speech. If the same word means different things in two places, you have found a bounded context boundary — draw it there.
  5. Define the aggregates. What must be consistent in one step, and what may lag. Transaction boundaries follow this, not the other way round.
  6. Write one vertical slice end-to-end — UI to store to test — before broadening. A slice that works proves the seams; six half-built layers prove nothing.
  7. Record it. One page: modules, ownership, data flow, external systems. Plus one short ADR per decision that was genuinely a choice (context, options, decision, consequences). Both live in git, next to the code.
  8. Name the promotion boundaries. When one verified result becomes the input to another stage, name its contract, inputs, output, and invalidation keys before implementation. A missing signer, VM, account, or remote service is a future BLOCKED stage, not a reason to keep reopening already-proven code.

Read the full file on GitHub · 139 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. today Changed · -6 lines · -117 tokens per session 262dc262dd4c
  2. 8d ago First seen · 145 lines · 260 tokens per session scan A e936dd663ac2

Subscribe to this mod's changes

architecture-first is a skill published in the GitHub repository AnastasiyaW/codex-claude-code-config (149 stars, last pushed yesterday), licensed MIT. It adds 143 tokens to every session and 1,792 once invoked, about $0.0007 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-30.