architect-before-code

A system-planning method for describing an application's parts and relationships before writing code.

In plain words
What is it for?
Use it before prototyping or major development to document models, prompts, tools, data stores, outside services, and the main system roles.
Why use it?
It reduces the chance that an AI coding agent invents a different structure each time or produces a codebase that becomes difficult for people to understand and change.

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/impactbrussels/ainativeos/architect-before-code
Any agent
npx skills add impactbrussels/AINativeOS --skill architect-before-code
Clone the repo
git clone --depth 1 https://github.com/impactbrussels/AINativeOS

Made for: Claude Code, Codex.

Per session 166 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,307 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.00166 $0.01307
Opus 5 $0.00083 $0.00654
Sonnet 5 $0.00033 $0.00261
Haiku 4.5 $0.00017 $0.00131

Measured 2d ago against content hash c52ff9f4fca5, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

architect-before-code 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 2d 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/architect-before-code/SKILL.md · 82 lines

How it starts

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

Architect Before Code

AI made prototyping nearly free, which is precisely how it hides the bill. You describe a feature, a working version appears, and the ease of appearing stops you deciding anything. Hand an agent no shape and it invents one freshly each session, until six weeks in you run a system no human holds in their head and no model holds across two conversations. Cheap code did not abolish the cost of bad architecture. It moved it downstream, where it is dearer. You are the lead systems engineer now. Fix the shape, write it down, let the agents fill it in after.

The method

Architect first, then generate. Full framework: Handbook Chapter 05. Artefact: SYSTEM-INVENTORY-TEMPLATE.md. The four pillars expanded, the naming walkthrough, a worked architecture, anti-patterns and a copyable template: references/system-inventory-method.md.

  1. Write the System Inventory. Name every moving part before you generate one of them: each model, each prompt layer, each tool, each data store, each outside dependency, in one document. An agent that can see the whole system stops hallucinating a parallel one. Use the template.
  2. Name the four pillars. The Brain reasons and you rent it at your competitor's price. The Memory is everything the system knows that the Brain does not: retrieval, vector store, master file. Planning is how it decides what to do, in order, before it acts. Tools are how it reaches the world, each call with a blast radius you can name out loud.
  3. Design the closed loop first. Find the one line where a customer's use today makes the product measurably better next month. That line is your moat. Bolt it on last, as most teams do, and you have a wrapper. Put it in first; everything downstream either feeds it or robs it.
  4. Write the master file first. Put CLAUDE.md / AGENTS.md in the repo before the first feature, holding your principles, trade-offs, and the constraints a newcomer would break by accident. Add a line each session. The prompt is a performance. The file is a memory.
  5. Decide the fallbacks. List the answers that must never be wrong, then write the deterministic, non-AI route for each. A hallucination in a meme app is a screenshot. The same one on a label is a recall.
  6. Then generate. Agents build against the inventory, never a blank page. The structure you wrote is the score. You know who the conductor is.

Read the full file on GitHub · 82 lines

Files

What ships with it

1 file 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. 2d ago First seen · 82 lines · 166 tokens per session scan A c52ff9f4fca5

Subscribe to this mod's changes

architect-before-code is a skill published in the GitHub repository impactbrussels/AINativeOS (1 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 166 tokens to every session and 1,307 once invoked, about $0.0008 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

external-context

Invoke parallel document-specialist agents for external web searches and documentation lookup.

Yeachan-Heo/oh-my-claudecode · 16 tokens

security-ownership-map

Analyze git repositories to build a security ownership topology (people-to-file), compute bus factor and sensitive-code ownership, and export CSV/JSON for graph databases and visualization. Trigger only when the user explicitly wants a security-oriented ownership or bus-factor analysis grounded in git history (for…

HKUDS/DeepCode · 99 tokens

moai-ref-ui-polish

UI polish and interface-completion reference: the small visual details — concentric border radius, optical alignment, shadow-vs-border, motion easing, typography smoothing, tabular numbers, icon stroke weight, hit areas — that separate polished interfaces from generic ones. Agent-extending skill that amplifies…

modu-ai/moai-adk · 98 tokens

submit-github-pr

Use when publishing an existing TensorRT-Model-Connect change as a GitHub pull request. Verifies authenticated repository access, branch and diff scope, validation evidence, commit identity, reviewer-facing text, exact pushed head, and the created draft PR without merging it.

NVIDIA/TensorRT-Model-Connect · 58 tokens

lemlist-campaign-from-icp

Use when the user says "create a lemlist campaign for X", "build a lemlist campaign from this ICP", "spin a lemlist campaign for Y", "ICP to lemlist", "natural language to lemlist campaign", "draft a lemlist campaign", "lemlist campaign for VPs/Managers/ICs at Z", or any variant indicating they want to turn a…

Othmane-Khadri/YALC-the-GTM-operating-system · 251 tokens

cross-task-learner

Enable agent loops to learn from similar past tasks and share patterns across loops.

jmagly/aiwg · 20 tokens