Use when organizing a monorepo, splitting a single repo into packages, evaluating an architecture migration, or reviewing structural decisions. Covers the layered apps/packages paradigm (single contract layer, one-way dependency DAG, bottom-up extraction order), ten recurring architecture principles (single data source with no fallback forks, execution-location correctness, cost-vs-pain gating for rewrites), named anti-patterns, and native-module/packaging pitfalls.
Ships in backend-skills. 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.
None: SKILL.md is the whole skill.
跨多个真实项目收敛出的组织范式与决策原则。词汇遵循 deep-module 设计语言(module / interface / depth / seam / adapter / leverage / locality)。
apps/
web # 应用(SPA / 客户端)
api|worker # 服务端(编排与事务边界,不放业务规则)
www|docs # 内容站(SSG,与应用完全解耦)
packages/
contracts|shared-types # ★契约层:唯一被多方共享的最底层,只放数据形状不放逻辑
core|domain # 纯函数业务规则,环境无关,每条配单测
db # 持久化,只被服务端依赖
tsconfig # 共享配置
先抽最底层共享包(纯逻辑/类型/契约 + 单测)→ 再拆应用 → 最后配流水线(Turbo + CI)。每一步可即时修复、可回滚。不要从应用侧开拆。
pnpm-workspace.yaml 显式放行构建,否则 install 失败。__dirname,需构建插件替换 import.meta 并特判 Windows 路径。extraResources 显式 copy + asarUnpack,不手动拼路径。waitUntil(void asyncTask() 本地正常、线上丢失)。What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
/backend-skills:monorepo-architecture-principlesfrom backend-skills
npx claudepluginhub xingkaixin/skills --plugin backend-skills5 skills in this plugin
/agent-friendly-cli-designUse when designing, reviewing, or refactoring a command-line interface that AI agents will invoke — covers non-interactive execution, resource/command layering, unified verbs, output trimming for token budgets, idempotency, and self-correcting error messages. Trigger this when building a new CLI, wrapping an API as a CLI, or auditing an existing CLI for agent usability./coding-agent-session-formatsUse when parsing, exporting, visualizing, or computing token/cost stats from local coding-agent session files (Codex rollout jsonl, Claude Code project jsonl, Kimi context/wire jsonl, OpenCode/zcode SQLite, Pi tree jsonl). Covers storage paths per agent, message schemas, assistant message ordering/dedup rules, a unified export schema, cache-aware cost calculation, and streaming-parse performance rules for 100-400MB files./tech-stack-scaffoldingUse when bootstrapping a new project or aligning an existing one to house conventions — frontend/fullstack (bun+vite+react+tailwind v4+shadcn+oxlint/oxfmt), browser extensions (WXT/MV3), Python CLI (uv+hatchling+Typer+just), Go CLI (mise+golangci-lint+just). Provides drop-in config templates, script naming conventions per stack, icon/zip pipelines, and the concise AGENTS.md format (readable in one minute)./use-modern-goApply modern Go syntax guidelines based on project's Go version. Use when user ask for modern Go code guidelines.