Agent skill

Architecture Foundation

by majiayu000 in majiayu000/spellbook

Design architecture foundations before implementation. An agent skill from majiayu000/spellbook.

MITAuto-check passedBackend & APIs

Install Architecture Foundation

skills CLI
$ npx skills add majiayu000/spellbook --skill architecture-foundation -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install majiayu000/spellbook architecture-foundation --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/majiayu000/spellbook.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/architecture-foundation .claude/skills/architecture-foundation && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
architecture-foundation
GitHub stars
287
Token cost
~2.3k tokens
SKILL.md length
1,065 words
Files
5 (incl. references)
Skills in repo
97
Repo updated
First seen
Licence
MIT

At a glance

Design architecture foundations before implementation. An agent skill from majiayu000/spellbook.

  • Asked to design
  • SKILL.md covers Overview, When To Use, Workflow and Decision Rules, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Refactor architecture

What it does

Architecture Foundation is an agent skill from majiayu000/spellbook. 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.

Its SKILL.md is about 2.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including reference files (for example `agents/openai.yaml`, `references/go-architecture-patterns.md` and `references/rust-architecture-patterns.md`).

It sits in Backend & APIs, covering Microservices. It works with Rust. The repository describes itself as: Cross-runtime skills for Claude Code, Codex, and multi-agent workflows. The licence is MIT.

When your agent uses it

  • Asked to design
  • Refactor architecture
  • Choose Rust/Go crate
  • Service boundaries

Example prompts

  • “/architecture-foundation”

What it can do on your machine

Read from SKILL.md and the folder at commit ed52af7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Architecture Foundation loads about 2.3k tokens when it runs, and up to ~13k if it reads all its reference files. Until then it costs about 87 tokens; SKILL.md has 1,065 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~87
When it runs · the whole SKILL.md, loaded when a task matches
~2.3k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~13k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from majiayu000/spellbook at commit ed52af7, republished under its MIT licence (© majiayu000). 1,065 words, ~2,268 tokens.

Download SKILL.mdSave it as .claude/skills/architecture-foundation/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
architecture-foundation
description
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.

Architecture Foundation

Overview

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.

When To Use

  • The user asks "what architecture should this use?", "is this stacked work?", "make a complete spec", "design the runtime", or "compare good libraries".
  • The change touches runtime, state ownership, adapters, plugins, event loops, rendering, schedulers, persistence, or cross-module contracts.
  • A repo has many issues/PRs that look individually valid but may not converge on one architecture.
  • A mature repo has duplicated paths, compatibility shims, generated configs, workflow definitions, or docs that may disagree about the source of truth.
  • A new skill, framework, library, or large feature needs a foundation guide before implementation.

Do not use this for small, local fixes where the existing architecture is obvious and no boundary decision is needed.

Workflow

  1. Search first.
  • Inspect existing architecture docs, entrypoints, manifests, module trees, public APIs, open issues/PRs, and tests before proposing new structure.
  • If the user names a reference project, verify current source or official docs before treating it as evidence.
  • For existing repos, also inspect generated/config artifacts, migration files, background workers, cron jobs, adapters, and the largest files/tests.
  1. Classify the project shape.
  • Simple library: stable API plus internal implementation.
  • CLI or developer tool: command layer, core operations, IO adapters, reporter.
  • API gateway or model router: transport, auth/accounting, routing policy, provider adapters, billing/settlement, observability.
  • Long-running runtime: state root, scheduler, drivers, observability, shutdown.
  • Lifecycle/composition framework: dependency graph, construction phase, runtime hooks, rollback, shutdown, and test harness.
  • Event/cache/reconcile controller: watch/list input, cache/projection, queue/backpressure, worker/reconciler, retry, and drain.
  • Config/module platform: canonical config, adapters, module lifecycle, reload order, rollback, cleanup, and plugin host interfaces.
  • UI or app shell: state ownership, event protocol, renderer/platform boundary, headless tests.
  • Service framework: domain core, application services, transport, storage, middleware, error-to-response boundary.
  • Agent or workflow system: task model, scheduler, provider adapters, event log, replay/test harness.
  1. Choose one primary state ownership model.
  • App-owned entities and handles for native UI/editor runtimes.
  • State plus typed message for enumerated UI/application workflows.
  • Virtual DOM/signals when renderer portability and declarative UI dominate.
  • Typed state or service-instance state for services and middleware.
  • Event log plus projection/outbox for workflows, billing, async jobs, and reconciliation systems.
  • World/resource/system model only when data-parallel ECS is a product fit.
  • Snapshot database or input facts for incremental analysis tools.
  • Streaming pipeline for one-shot CLI tools and batch processors.
  1. Draw the foundation boundaries.
  • 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.
  1. Audit existing boundary health before adding tasks.
  • Name the current source of truth for each contract: code, database table, SQL seed, JSON/YAML config, generated docs, or external provider contract.
  • Mark duplicated paths as intentional bridge, legacy compatibility, or accidental fork; require an exit condition for compatibility paths.
  • Prefer a convergence/deletion plan over a new abstraction when the existing architecture is directionally correct but half migrated.
  • Treat generated files and docs as consumers unless the repo explicitly makes them authoritative.
  1. Write the contracts before tasks.
  • Ownership: who owns state, handles, resources, caches, and mutation rights.
  • Lifecycle: init, ready, run/tick/frame/request, shutdown, cleanup.
  • Effect contract: which layer may persist, call providers, bill, publish messages, mutate projections, or only emit effects for another layer.
  • Event/action: how external events become typed commands/messages/actions.
  • Effects: which layer may touch IO, processes, network, OS handles, GPU, DOM, databases, or providers.
  • Error policy: what is recoverable, user-visible, fatal, diagnostic-only, or converted at a boundary.
  • Config/resources: build-time, startup-time, runtime; owner and invalidation.
  • Observability: logs, metrics, traces, queue depth, frame/runtime telemetry.
  • Tests: unit, contract, headless, fake adapter, integration, platform/E2E.
  1. Produce a spec, not just a diagram.
  • Use references/spec-template.md when the user needs a durable artifact.
  • Include non-goals and "do not copy" notes from reference projects.
  • For every reference project, separate borrow from do_not_copy; borrow boundary contracts, not scale artifacts, global registries, generated machinery, historical migrations, or domain-specific complexity.
  • Convert the spec into P0/P1/P2 work where each task maps to one contract.
  • If issues/PRs already exist, map them to the contracts and identify gaps.
Show full SKILL.md (318 more words)Show less

Decision Rules

  • Prefer a thin adapter around a mature runtime when the product does not need to own that runtime.
  • Split crates/modules only for stable API boundaries, side-effect isolation, compile-time isolation, independent tests, or real reuse.
  • In existing repos, do not split crates/packages first when the real problem is duplicated source-of-truth, an unfinished migration, or missing closed-loop tests.
  • Keep core free of platform handles, event loops, renderer handles, webviews, database clients, HTTP requests, process spawning, and environment reads.
  • Make hidden global state illegal unless it is deliberately modeled as typed runtime state or a scoped resource.
  • Do not let plugins become architecture escape hatches. Each plugin needs API, config/permissions when relevant, lifecycle, errors, and tests.
  • Do not accept silent degradation. Missing capability must be an explicit unsupported error, diagnostic, or blank result according to the contract.

Output Shape

For quick answers, return:

text
verdict:
chosen_shape:
state_owner:
boundaries:
contracts:
migration_debt:
validation:
risks:
next_steps:

For durable planning, create or update an architecture spec with:

text
objective
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

Red Flags

  • A proposed module cannot say which boundary it belongs to.
  • The design names a trait/config/cache/plugin but does not wire it into startup, lifecycle, or tests.
  • Two state ownership models are mixed without an explicit bridge.
  • Two files, configs, SQL seeds, or docs claim to be the source of truth for the same product contract.
  • A compatibility shim or legacy path has no owner, test, telemetry, or removal condition.
  • Platform callbacks directly mutate core state.
  • Errors become warnings plus fallback for user-visible behavior.
  • Tests only cover the final UI/CLI and cannot drive the runtime headlessly.
  • The plan says "match X project" but cannot state what not to copy.

References

  • Read references/rust-architecture-patterns.md when designing Rust crates, runtimes, UI frameworks, app shells, schedulers, services, or developer tools.
  • Read references/go-architecture-patterns.md when designing Go modules, packages, services, ports/adapters, context-aware APIs, or concurrency flows.
  • Read references/spec-template.md when producing a repo-facing spec.
  • Use agents/openai.yaml only when a separate architecture review agent is needed for cross-checking the chosen boundaries or migration plan.

© majiayu000, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 4 other files (references) in skills/architecture-foundation of majiayu000/spellbook.

  • SKILL.md
  • agents/openai.yaml
  • references/go-architecture-patterns.md
  • references/rust-architecture-patterns.md
  • references/spec-template.md

Open the folder on GitHubat commit ed52af7

Compare with similar skills

Architecture Foundation next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Architecture Foundation compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Architecture Foundation this skillmajiayu000/spellbook287—~2.3kAutomated safety check: PassMIT
Temporal Developertemporalio/skill-temporal-developer230—~2.5kAutomated safety check: PassMIT
Golem Add Transactions Rustgolemcloud/golem1.5k—~865Automated safety check: PassCustom licence
Golang Proantoniopaya22/go-rest-template1723 repos~1.2kAutomated safety check: PassMIT
NestJS Modular Monolith Architecttech-leads-club/agent-skills7k—~3.9kAutomated safety check: PassCC-BY-4.0
Dev Rulesrust-dd/tako162—~810Automated safety check: PassMIT

Similar skills

  • Temporal Developer

    temporalio/skill-temporal-developer

    Official

    Develop, debug, and manage Temporal applications across Python, TypeScript, Go, Java, .NET, Ruby, and Rust.

    230 GitHub stars~2.5k tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • Adding saga-pattern transactions with compensation to a Rust Golem agent.

    1.5k GitHub stars~865 tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • Golang Pro

    antoniopaya22/go-rest-template

    Implements concurrent Go patterns using goroutines and channels, designs and builds microservices with gRPC or REST, optimizes Go application performance with pprof, and enforces idiomatic Go with…

    172 GitHub starsUsed in 3 repos~1.2k tokens
    Backend & APIsAuto-check passed
  • NestJS Modular Monolith Architect

    tech-leads-club/agent-skills

    Designs scalable NestJS modular monoliths with domain-driven design, Clean Architecture layers and optional CQRS, defining bounded contexts and strict module boundaries.

    7k GitHub stars~3.9k tokensUpdated 2 days ago
    Backend & APIsAuto-check passed
  • Dev Rules

    rust-dd/tako

    General coding-style rules to apply to every project. An agent skill from rust-dd/tako.

    162 GitHub stars~810 tokensUpdated 10 days ago
    Backend & APIsAuto-check passed
  • Mirrord Up

    metalbear-co/mirrord

    Helps users run multiple concurrent mirrord sessions from a single mirrord-up.yaml (compose-style multi-service local debugging).

    5.4k GitHub starsUsed in 1 repo~4.3k tokens
    Backend & APIsAuto-check passed

More from majiayu000/spellbook

All 97 skills in this repo
  • Skill Ecosystem Doctor

    majiayu000/spellbook

    Audits and repairs how coding-agent Skills are owned, copied and exposed across runtimes, from canonical sources to quarantine and retirement.

    287 GitHub stars~3k tokensUpdated 2 days ago
    Auto-check passed
  • AGENTS.md Scaffold

    majiayu000/spellbook

    Scans a repository for real evidence and proposes, or on request writes, a small stack of root and scoped AGENTS.md files with validation commands and generated-file boundaries.

    287 GitHub stars~1.5k tokensUpdated 2 days ago
    Auto-check passed
  • Product Demo Builder

    majiayu000/spellbook

    Plans, produces or diagnoses evidence-backed product demo videos: script, capture plan, pacing checks and verified final media built on real product behavior.

    287 GitHub stars~3.3k tokensUpdated 2 days ago
    Auto-check passed
  • Flowguard Task Guard

    majiayu000/spellbook

    Single entry point that routes long or ambiguous agent tasks, checks live state, bounds autonomous loops and leaves a resumable handoff.

    287 GitHub stars~2.1k tokensUpdated 2 days ago
    Auto-check passed
  • npm Supply Chain Check

    majiayu000/spellbook

    Scans a repository, its lockfiles and node_modules for known malicious npm package versions and install-time indicators, using a read-only Python scanner.

    287 GitHub stars~1.5k tokensUpdated 2 days ago
    Auto-check passed
  • Product Manager Toolkit

    majiayu000/spellbook

    Product management helpers: a RICE scoring script, an interview transcript analyzer and PRD templates for prioritizing features, synthesizing research and writing requirements.

    287 GitHub stars~2.2k tokensUpdated 2 days ago
    Auto-check passed

Works with

Questions about Architecture Foundation

What does Architecture Foundation do?

Design architecture foundations before implementation. An agent skill from majiayu000/spellbook. Architecture Foundation is an agent skill from majiayu000/spellbook. Design architecture foundations before implementation.

When should I use Architecture Foundation?

Architecture Foundation fits situations like: asked to design; refactor architecture; choose Rust/Go crate; service boundaries.

How do I install Architecture Foundation in Claude Code?

Run `npx skills add majiayu000/spellbook --skill architecture-foundation -a claude-code`. Or copy the skill folder (skills/architecture-foundation in majiayu000/spellbook) into .claude/skills/architecture-foundation in your project. Claude Code loads it when a task matches its description.

How do I install Architecture Foundation in Codex?

Run `npx skills add majiayu000/spellbook --skill architecture-foundation -a codex`. Or copy the skill folder (skills/architecture-foundation in majiayu000/spellbook) into .agents/skills/architecture-foundation in your project. Codex loads it when a task matches its description.

Can I use Architecture Foundation in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add majiayu000/spellbook --skill architecture-foundation -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/architecture-foundation, .gemini/skills/architecture-foundation, .github/skills/architecture-foundation and .opencode/skills/architecture-foundation in your project.

What does Architecture Foundation need to run?

SKILL.md names no scripts, command-line tools or credentials: Architecture Foundation is instructions for the agent only.

Does Architecture Foundation access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Architecture Foundation safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Architecture Foundation use?

Architecture Foundation is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Architecture Foundation use?

About 2.3k tokens (SKILL.md is roughly 9.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 10k tokens, read only when the agent opens those files.

What are the alternatives to Architecture Foundation?

Skills that share tags, products or a category with Architecture Foundation: Temporal Developer (temporalio/skill-temporal-developer, 230 stars), Golem Add Transactions Rust (golemcloud/golem, 1.5k stars), Golang Pro (antoniopaya22/go-rest-template, 172 stars) and NestJS Modular Monolith Architect (tech-leads-club/agent-skills, 7k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Architecture Foundation?

majiayu000 (a GitHub user) maintains it in majiayu000/spellbook, which has 287 GitHub stars. The repository holds 97 skills in this directory. The repository was last updated on October 8, 2026.

Source: majiayu000/spellbook on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.