unfolding-architecture

unfolding-architecture is a skill for Claude Code, Codex from t1/tdder. It costs 135 tokens per session (3,135 once invoked), scanned A, original, Apache-2.0.

A method for adding software architecture structure gradually, starting with simple code and introducing extra layers only when a real problem requires them. Architecture means how a program’s parts are organized and connected.

In plain words
What is it for?
Use it when deciding whether to separate data and logic, add abstractions, introduce a service or repository, split layers, use ports and adapters, or add domain events. It is for making code easier to change over time.
Why use it?
It helps prevent unnecessary interfaces, services, repositories, and layers that make code harder to understand. Each structural change must address a concrete constraint or measurable increase in complexity.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: names the AskUserQuestion tool.

Part of the tdder plugin — 14 skills, 2 commands, 6 agents, 1 hook shipped together

Good fit Use it when deciding whether to separate data and logic, add abstractions, introduce a service or repository, split layers, use ports and adapters, or add domain events. It is for making code easier to change over time.

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

Made for: Claude Code, Codex.

Or install tdder, the plugin that ships this one along with the rest of its 14 skills, 2 commands, 6 agents, 1 hook.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/t1/tdder/unfolding-architecture"><img src="https://agentmods.dev/badge/skills/t1/tdder/unfolding-architecture.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 135 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,135 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 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.00135 $0.03135
Opus 5 $0.00068 $0.01568
Sonnet 5 $0.00027 $0.00627
Haiku 4.5 $0.00014 $0.00314

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

Security

Grade A, and why

unfolding-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 10d 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/unfolding-architecture/SKILL.md · 289 lines

How it starts

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

Unfolding Architecture

Progressive architectural decisions: start simple, add complexity only when it reduces complexity.

Architecture is not a blueprint drawn before construction. It unfolds from working code under concrete pressure. Each dimension of architecture starts at its simplest form (Level 0) and only moves to a higher level when a specific, demonstrable problem forces the change.

Central creed: code quality = maintaining long-term speed of development. Every architectural decision — unfolding a dimension, applying a design pattern, or removing one — is judged by whether it keeps the code easy to understand and change tomorrow.

Default Starting Point

Level 0 in all dimensions. No deviation without a concrete reason backed by a violated constraint, or measurable complexity increase. "It might be useful later" is never a valid reason to unfold.

Dimensions

1. Data vs Logic

Level Style Description
0 OOP: data + logic together Data and the logic that operates on it live in the same class. Logic hides data. This is the natural OOP default.
1 DOP: separate data from algorithms Stable data structures with varying algorithms applied externally. Data is transparent; logic is separate.

Unfold to Level 1 when:

  • Multiple independent algorithms need to operate on the same data
  • Data structures are stable but processing varies significantly
  • Serialization/deserialization concerns conflict with behavior encapsulation

Do NOT unfold when:

  • Data and logic change together (they belong together)
  • There is only a hand full of algorithms per data structure that are closely related to the data
  • The separation would scatter related behavior across files

Read the full file on GitHub · 289 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. 10d ago First seen · 289 lines · 135 tokens per session scan A 31ae34f4e682

Subscribe to this mod's changes

unfolding-architecture is a skill published in the GitHub repository t1/tdder (14 stars, last pushed today), licensed Apache-2.0. It adds 135 tokens to every session and 3,135 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.