project-architecture

Foundational architecture instructions for a declarative agent platform, where YAML describes the system instead of containing executable business logic. They define the path from configuration through validation and compilation to runtime execution.

In plain words
What is it for?
Use them before making any project change, especially when working on configuration, compilation, runtime execution, prompts, plugins, package layout, or secrets.
Why use it?
They keep the system’s layers, data flow, security boundaries, and request handling consistent as the codebase changes.

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/extra-org/extra/project-architecture
Any agent
npx skills add extra-org/extra --skill project-architecture
Clone the repo
git clone --depth 1 https://github.com/extra-org/extra

Made for: Claude Code, Codex.

Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 547 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.00032 $0.00547
Opus 5 $0.00016 $0.00273
Sonnet 5 $0.00006 $0.00109
Haiku 4.5 $0.00003 $0.00055

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

Security

Grade A, and why

project-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 3d 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.

.claude/skills/project-architecture/SKILL.md · 68 lines

How it starts

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

Skill: Project Architecture

When to use this skill

Always. Read this before any change, regardless of area. It anchors every other skill in the project's non-negotiable rules and layout.

Files to read first

  • AGENTS.md
  • docs/ARCHITECTURE.md
  • docs/ROADMAP.md
  • docs/adr/

Architecture rules

  • The pipeline is one-directional: config.yml → validate → compile → CompiledAgentGraph → RuntimeEngine → ExecutionContext (per request) → execution → response + trace.
  • YAML is declarative specification, never executable business logic.
  • Validate before compile; compile before run. The runtime sees only compiled, typed models — never raw YAML dicts.
  • RuntimeEngine is created once at startup; ExecutionContext is per request.
  • Client-specific auth/business logic lives in customer plugins, not the runtime.
  • Prompts are templates rendered per request; security is enforced at the tool/data layer, not via prompt text.
  • Secrets never live in YAML or prompts.

Implementation rules

  • Follow the planned package layout in AGENTS.md (src/agentplatform/<layer>). No giant single-file modules.
  • Keep each module to one architectural responsibility.
  • Respect layer boundaries: a layer depends only on the typed outputs of the layers before it.
  • Do not change public contracts (YAML schema, plugin contracts, API shape) without an ADR and approval.
  • Stay within the current task's scope; propose new tasks for discovered work.

Validation checklist

  • Change fits the layered architecture and the planned layout.
  • No architecture rule from AGENTS.md §3 is violated.
  • No contract changed without an ADR.
  • Tests added for new behavior.
  • make check passes.

Common mistakes to avoid

  • Reading raw YAML in the runtime instead of compiled models.
  • Adding request state to RuntimeEngine or the compiled graph.
  • Putting customer auth/business logic in the runtime.
  • Expanding scope beyond the current task or doing large uncontrolled rewrites.
  • Relying on prompt wording for security.

Read the full file on GitHub · 68 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. 3d ago First seen · 68 lines · 32 tokens per session scan A 6b137c8dce90

Subscribe to this mod's changes

project-architecture is a skill published in the GitHub repository extra-org/extra (108 stars, last pushed 5d ago), licensed MIT. It adds 32 tokens to every session and 547 once invoked, about $0.0002 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.