Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Design architecture foundations before implementation. Use when asked to design or refactor architecture, choose Rust/Go crate, package, module, runtime, workflow, or service boundaries, compare mature project architecture, prevent stacked one-off PRs, audit migration debt in existing repos, or produce a spec before coding.
.claude/skills/majiayu000-architecture-foundation/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-02 | ✗→✓ | ▲ Improved | 32% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 31% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 92% | 0% |
| case-13 | ✗→✓ | ▲ Improved | 76% | 0% |
| case-15 | ✗→✓ | ▲ Improved | 44% | 0% |
Use this skill to turn an architecture discussion into explicit boundaries, contracts, validation gates, and a small execution plan. The goal is not to copy an admired project, but to identify the project's shape and choose the minimum architecture that keeps ownership, effects, errors, and tests clear. For large existing repos, first explain the architecture they already have, then decide whether the work is boundary creation, boundary completion, or boundary deletion.
"make a complete spec", "design the runtime", or "compare good libraries".
rendering, schedulers, persistence, or cross-module contracts.
on one architecture.
workflow definitions, or docs that may disagree about the source of truth.
before implementation.
Do not use this for small, local fixes where the existing architecture is obvious and no boundary decision is needed.
public APIs, open issues/PRs, and tests before proposing new structure.
before treating it as evidence.
background workers, cron jobs, adapters, and the largest files/tests.
provider adapters, billing/settlement, observability.
runtime hooks, rollback, shutdown, and test harness.
queue/backpressure, worker/reconciler, retry, and drain.
reload order, rollback, cleanup, and plugin host interfaces.
headless tests.
middleware, error-to-response boundary.
replay/test harness.
reconciliation systems.
product/app: entrypoints, user workflows, product-specific orchestration.core/domain: pure models, invariants, decisions, typed errors, no IO.runtime/application: lifecycle, scheduling, event dispatch, state mutation.adapters/backends: OS, renderer, provider, filesystem, network, database.plugins/components: optional capabilities behind explicit contracts.testing/headless: deterministic drivers, fake adapters, contract tests.SQL seed, JSON/YAML config, generated docs, or external provider contract.
intentional bridge, legacy compatibility, oraccidental fork; require an exit condition for compatibility paths.
architecture is directionally correct but half migrated.
them authoritative.
messages, mutate projections, or only emit effects for another layer.
databases, or providers.
converted at a boundary.
references/spec-template.md when the user needs a durable artifact.borrow from do_not_copy; borrowboundary contracts, not scale artifacts, global registries, generated machinery, historical migrations, or domain-specific complexity.
to own that runtime.
compile-time isolation, independent tests, or real reuse.
duplicated source-of-truth, an unfinished migration, or missing closed-loop tests.
database clients, HTTP requests, process spawning, and environment reads.
runtime state or a scoped resource.
config/permissions when relevant, lifecycle, errors, and tests.
unsupported error, diagnostic, or blank result according to the contract.
For quick answers, return:
textverdict: chosen_shape: state_owner: boundaries: contracts: migration_debt: validation: risks: next_steps:
For durable planning, create or update an architecture spec with:
textobjective current evidence reference models considered chosen architecture boundary map source-of-truth map contract matrix compatibility/deletion plan issue/PR map validation matrix P0/P1/P2 roadmap open questions
startup, lifecycle, or tests.
same product contract.
condition.
references/rust-architecture-patterns.md when designing Rust crates,runtimes, UI frameworks, app shells, schedulers, services, or developer tools.
references/go-architecture-patterns.md when designing Go modules,packages, services, ports/adapters, context-aware APIs, or concurrency flows.
references/spec-template.md when producing a repo-facing spec.agents/openai.yaml only when a separate architecture review agent isneeded for cross-checking the chosen boundaries or migration plan.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 29,910 | 27,906 | -7% | 1 | 1 | 0% | 4,692 | 4,322 | -8% | 0 | 0 | — |
case-02 | fail→pass | 36,030 | 44,168 | +23% | 1 | 1 | 0% | 6,226 | 8,207 | +32% | 0 | 0 | — |
case-03 | fail→pass | 25,446 | 21,744 | -15% | 1 | 1 | 0% | 4,064 | 5,328 | +31% | 0 | 0 | — |
case-04 | pass→pass | 7,124 | 4,681 | -34% | 1 | 1 | 0% | 1,294 | 2,759 | +113% | 0 | 0 | — |
case-05 | pass→pass | 5,512 | 3,796 | -31% | 1 | 1 | 0% | 893 | 2,537 | +184% | 0 | 0 | — |
case-06 | fail→fail | 1,601 | 3,668 | +129% | 1 | 1 | 0% | 237 | 2,519 | +963% | 0 | 0 | — |
case-07 | pass→pass | 20,867 | 17,861 | -14% | 1 | 1 | 0% | 2,983 | 4,775 | +60% | 0 | 0 | — |
case-08 | fail→pass | 15,006 | 18,377 | +22% | 1 | 1 | 0% | 2,484 | 4,765 | +92% | 0 | 0 | — |
case-09 | pass→pass | 23,781 | 14,418 | -39% | 1 | 1 | 0% | 4,384 | 4,206 | -4% | 0 | 0 | — |
case-10 | pass→pass | 33,201 | 9,442 | -72% | 1 | 1 | 0% | 2,270 | 3,623 | +60% | 0 | 0 | — |
case-11 | pass→pass | 16,391 | 11,283 | -31% | 1 | 1 | 0% | 2,671 | 3,770 | +41% | 0 | 0 | — |
case-12 | pass→pass | 14,438 | 15,542 | +8% | 1 | 1 | 0% | 2,407 | 4,351 | +81% | 0 | 0 | — |
case-13 | fail→pass | 15,157 | 13,243 | -13% | 1 | 1 | 0% | 2,193 | 3,854 | +76% | 0 | 0 | — |
case-14 | pass→pass | 15,673 | 15,740 | +0% | 1 | 1 | 0% | 2,579 | 4,537 | +76% | 0 | 0 | — |
case-15 | fail→pass | 17,957 | 12,942 | -28% | 1 | 1 | 0% | 2,728 | 3,928 | +44% | 0 | 0 | — |
case-16 | fail→pass | 18,485 | 14,874 | -20% | 1 | 1 | 0% | 2,703 | 4,059 | +50% | 0 | 0 | — |
case-17 | pass→pass | 14,074 | 13,180 | -6% | 1 | 1 | 0% | 2,064 | 3,977 | +93% | 0 | 0 | — |
case-18 | fail→pass | 14,925 | 14,065 | -6% | 1 | 1 | 0% | 2,271 | 4,064 | +79% | 0 | 0 | — |
case-19 | pass→pass | 8,143 | 6,704 | -18% | 1 | 1 | 0% | 1,273 | 2,929 | +130% | 0 | 0 | — |
case-20 | pass→pass | 15,359 | 15,054 | -2% | 1 | 1 | 0% | 2,233 | 4,150 | +86% | 0 | 0 | — |
case-21 | fail→pass | 16,292 | 13,550 | -17% | 1 | 1 | 0% | 2,401 | 3,956 | +65% | 0 | 0 | — |
case-22 | pass→pass | 18,636 | 18,471 | -1% | 1 | 1 | 0% | 2,832 | 4,589 | +62% | 0 | 0 | — |
case-23 | fail→pass | 20,792 | 13,830 | -33% | 1 | 1 | 0% | 2,956 | 4,024 | +36% | 0 | 0 | — |
case-24 | fail→pass | 17,691 | 16,413 | -7% | 1 | 1 | 0% | 2,954 | 4,532 | +53% | 0 | 0 | — |
case-25 | pass→pass | 22,537 | 21,456 | -5% | 1 | 1 | 0% | 3,379 | 5,393 | +60% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 25 cases were attempted. The headline lift of +40 percentage points is the difference between those two pass rates over the 25 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.