Decide the structure of software when writing or changing code in a real repository: where a boundary goes and how much care it deserves, who may know whom (invariants stated as absences, and how to enforce them), where I/O, the clock, allocation, errors and branching live, how large a module, function or crate should be against its interface, and what to depend on or own (libraries, build, CI, automation). Use when adding a module, crate, layer or dependency, splitting or merging code, when one change keeps breaking unrelated parts, when I/O sits deep inside logic, when reviewing a design or an ARCHITECTURE file, or when shaping the build and CI. Runs a gated procedure from one reconstructed model (Alex Kladov's practice). Not for: the content of a decision (data structures, algorithms, domain facts); how to test (testing); splitting a system into services, HTTP or cloud design; pattern catalogues.
Ships in thinking. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
This skill is one reconstructed reasoning model, not a body of architecture knowledge. It was rebuilt from the design practice of Alex Kladov (matklad) in rust-analyzer and TigerBeetle: his blog (206 posts, 2017–2026), rust-analyzer's design documents, style guide and blog, TigerBeetle's documents, blog and pull requests, 215 commits checked in both repositories, streams and talks. He did not take part in it, review it or endorse it. An adversarial verification pass checked 234 extracted moves against that corpus: 82 held as stated, 56 held only in a narrower scope, 91 rest on a single occurrence and are quarantined as hypotheses, 5 were cut (3 another person's, 1 inverted, 1 absent). Of seven proposed concepts five survived; of 69 named tricks, 47 instruct here (arithmetic).
His concepts carry the direction of a structural decision: on records written at decision time they carried 12 of 28 non-domain steps of ten of his decisions. They do not carry its content: see what the concepts do not carry.
Before you state a number, attribute a phrase, close a fork, or answer where this comes from, load references/limits.md.
testing skill. This skill names a test only as the carrier of an invariant.Each answers a different question about a structure. They are distinct, not orthogonal: the edge's core invariant is itself an absence ("Analyzer does not do any I/O."), but where effects go is a separate rule.
main or the event loop; the core takes its input as data. "Analyzer does not do any I/O. It starts in an empty state and all input data is provided via apply_change API." (rust-analyzer guide, 2019); "Push IO and error handling up" (commit, 2020); a "sans-io ReceiveBuffer" (TigerBeetle, 2025). TigerBeetle's static allocation and I/O-free transaction core are Joran Dirk Greef's design; Kladov's part is named in limits.The gate order is this skill's scaffolding, not a protocol he follows. Look at anything first; commit to no structure until the gates above it have a written answer.
Gate 1: Control. List every interface the change touches and who controls its other side. Not you: a published library's API, a serialized type (an IPC boundary), a protocol whose other end someone else implements. Design those for stability and plan the upgrade: "Solid upgrade strategy for deployment trumps any design which seems perfect at a given moment in time." Keep everything else cheap to change. Visibility matters at the compilation-unit edge: "you have either closed world (all usages are known) or open world (usages are not-knowable)". rust-analyzer's review rule scales scrutiny by the boundary a change touches and splits API changes into their own pull request (scope). Tricks: control.
Gate 2: Edge. List every I/O, clock read, environment or working-directory read, allocation, fallible call and branch on outside state. Move each to the caller, main or the event loop; pass in what it produced. Separate genuine I/O failure from expected outcomes: "Hitting an io::Error is a legit problem. Finding more than one Cargo.toml is not." Give the code that talks to the OS its own component. When outside I/O delivers events, several are ready at once: take them all, then prioritize ("always be batching"). Keep the join: an API that spawns work with no handle loses causality, and "Broken once, causality link is not reforgable by a layer above." An error's destination decides its type: handled, a small closed set of codes; reported, rendered at an isolation boundary ("If you know the ultimate destination up front, it usually is simpler to render the error immediately."). Tricks: edge, concurrency and failure.
Gate 3: Absence. For each component, write what it must not know or depend on, in that form: "hir should know nothing about URLs, markdown and html." Move code to the layer whose vocabulary it uses: "auto-import is purely an IDE concern, so it should be done outside of HIR". Record the absences where the next reader looks: for a project of 10k–200k lines (his stated range, a limit), an ARCHITECTURE file with a codemap. Then enforce the ones feature pressure will reach: a crate or package edge with a declared dependency, a lint, a type-erased handle, a capability never handed over, or a test (named by testing). Inside one module, privacy and a local convention are enough: "maintaining local conventions needs little effort." Tricks: absence.
Gate 4: Ratio. For each cut, compare the body with its interface: "keep related things together, and independent things apart". Extract a self-contained data structure whatever its length; fold back a split whose implementation is a small part of its interface; treat an hourglass function or a dependency that only repackages another as glue. Phrase the outermost internal API in its consumer's vocabulary, as plain data ("Rather than talking in definitions and references, it talks in Strings and textual offsets."), for "a hypothetical ideal client" rather than the one you have. Give producer and consumer their own constructs when they want different shapes. Screen limits override the ratio for lines and functions, not for files (numbers in limits). The gate judges a cut; it does not find one: "The hard part is to realize that there is (or there could be) an interface in the first place." Tricks: shape.
Gate 5: Rent. For each dependency, tool and platform, name the fundamental part it absorbs and the accidental part it adds. Read the lockfile, not the manifest: "it's important to realise what problems your application is and is not solving." What the bootstrap already needs is free: "This adds dependency on the git executable, but this is fine, as we need it to clone the repo anyway". The build system is "a bootstrap process: it is how you get from git clone to a working binary"; put the check logic there, in the project's own language, and let CI drive it and spread work over unlike machines. Not to the end: a CI that is "just a single line which calls into make CI. This is also incorrect." TigerBeetle keeps the platform matrix and runtime setup in CI on purpose. Tricks: rent.
Then the tricks. Pick a trick only where its signed when matches what the gates found, never because it is familiar: references/tricks.md. For an IDE, language server, compiler or incremental build, load references/incremental.md as well.
Sans-io, pushing ifs up, call-site injection, a kitchen-sink module, a crate edge, a multicall binary, owning instead of depending: each is right in one context and wrong in another. Never recall a sign; read it off the context. Each row in references/tricks.md carries his condition for it and his case against it; where he gives none, it says none stated, and none is supplied.
The content of a decision: which data structure, which algorithm, where a storage layout puts what, what a language or protocol allows. In his own decisions that came from domain expertise, and here it comes from yours: read it off the codebase, the user or your own knowledge, and say which. In a blind prediction test, a core built from his earlier writing gave the direction but missed the criterion that decided his case: constructor functions, the screen limit, the single binary, "one correct way". Finding where a cut could go is part of the content.
His own 2026 account of architecture opens elsewhere, with Conway's law and incentives: rust-analyzer's features are crash-isolated "To attract weekend warriors", around a core held to a stricter bar. The model takes that as domain input: ask who will work on the code, and say what you assumed.
The practice behind this model is two systems, each one codebase: an IDE back end (rust-analyzer) and a replicated database (TigerBeetle). Beyond them his words are: "I don't have much experience building these kind of systems" (2024, of a multi-service system on Kafka); "I don't know how to best test modern HTTP applications built around inter-process communication." (2021); "I am not well-versed in cloud things" (2023).
For service code, the model decides inside each process and at the edge of each service's own code: effects at the edge, absences, the cut ratio, rent or own, and every serialized message type as an IPC boundary whose other side you often do not control. It decides nothing that depends on how a network, a broker or another service behaves: how to split a system into services, consistency between them, timeouts, retries and redelivery, deployment topology, cloud infrastructure. One binary with subcommands for several services is a hypothesis there, not a rule. At this line say the model does not reach here, make the call yourself, label it yours, and name what would show it wrong. Do not import another author's rule and present it as this model's.
Every structural proposal, change or design review carries:
Load a file when its condition fires, never preventively. Every file has a row.
| Load this file | At this moment |
|---|---|
references/tricks.md | After the gates, before applying any named move; a familiar pattern comes to mind. |
references/incremental.md | The system is an IDE, language server, compiler, or an incremental build or analysis. |
references/limits.md | Before stating a number, attributing a phrase, touching a fork or a hypothesis, citing the model, or answering where it comes from; at the line. |
references/glossary.md | A term from this skill or from his writing is used or met, especially "boundary", "invariant", "kitchen sink", "hourglass". |
What SKILL.md sets; muted values are Claude Code's defaults
/thinking:software-architecturefrom thinking
npx claudepluginhub fozy-labs/astp --plugin thinking4 skills in this plugin
/analysisAnalytical checks for claims and evidence: a benchmark, eval or test-suite score, a metric, a speedup or latency claim, "studies show", an agent's or a colleague's report that something works or is fixed; comparing options on evidence; finding the cause of a failure, regression or flaky test; checking your own conclusion before you report it. Use when a number is about to be relied on, a result looks striking or confirms what you hoped, a score rose under optimisation, two explanations or options compete, a fix "seems to work", or you are about to write a verdict. Runs an unordered set of checks for where a claim and what happened come apart, with a budget and a stop rule. Not for generating hypotheses or ideas, statistics or experiment-design tutoring, domain knowledge, ranking values that cannot be priced, or what a design argument owes (that is design-derivation's Layer 0)./design-derivationDerive visual and interface design decisions instead of picking them — for app and web interfaces, screens and flows, dashboards, landing pages, banners and ad creative, identity and logos, presentation and print layouts, and game UI and HUDs. Use when deciding what should stand out, how much hierarchy a screen needs, how to space and group, whether an image or a stylised layer earns its area, whether to duplicate or use a legend, whether an icon can replace text; when a layout "feels off", "looks flat", "everything shouts", or "looks generic"; and when judging, defending, or dismantling a design decision — yours, a client's, or a critic's — including arguments like "it's cleaner", "it's more convenient", or "a big company does it". Runs a gated procedure — what counts as an argument, then frame and value and scenario, then charge and sign together, then surface and accuracy — so every decision is traceable to this brief rather than to a remembered look. Not for writing markup or component code against a settled spec, choosing frameworks or component libraries, copywriting, data-chart and visualisation specification, or accessibility conformance audits.Other plugins' skills for the same job