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.
npx skills add https://github.com/majiayu000/spellbook --skill architecture-foundation
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:
verdict:
chosen_shape:
state_owner:
boundaries:
contracts:
migration_debt:
validation:
risks:
next_steps:
For durable planning, create or update an architecture spec with:
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
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.
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
Automatically creates user-facing changelogs from git commits by analyzing commit history, categorizing changes, and transforming technical commits into clear, customer-friendly release notes. Turns hours of manual changelog writing into minutes of automated generation.
Use when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for merge, PR, or cleanup
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
Next.js best practices - file conventions, RSC boundaries, data patterns, async APIs, metadata, error handling, route handlers, image/font optimization, bundling
Use when starting feature work that needs isolation from current workspace or before executing implementation plans - creates isolated git worktrees with smart directory selection and safety verification
Take majiayu000/architecture-foundation from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.