architecture

GitHub

指导软件架构设计,明确模块边界、所有权及依赖关系。用于功能设计、模块提取和聚焦重构,强调最小化结构决策与复用,避免无关的重新设计。

.agents/skills/architecture/SKILL.md CanyonCodeCoreAI/canyonos

Trigger Scenarios

需要划分模块边界或确定代码所有权 进行跨层变更或聚焦式重构

Install

npx skills add CanyonCodeCoreAI/canyonos --skill architecture -g -y
More Options

Non-standard path

npx skills add https://github.com/CanyonCodeCoreAI/canyonos/tree/main/.agents/skills/architecture -g -y

Use without installing

npx skills use CanyonCodeCoreAI/canyonos@architecture

指定 Agent (Claude Code)

npx skills add CanyonCodeCoreAI/canyonos --skill architecture -a claude-code -g -y

安装 repo 全部 skill

npx skills add CanyonCodeCoreAI/canyonos --all -g -y

预览 repo 内 skill

npx skills add CanyonCodeCoreAI/canyonos --list

SKILL.md

Frontmatter
{
    "name": "architecture",
    "description": "Shape or review software boundaries, ownership, dependencies, and reuse. Use for feature design, module extraction, cross-layer changes, and focused refactors; not for unrelated redesigns."
}

Architecture

Make the smallest structural decision that gives one clear owner to meaningful behavior. Favor an existing extension point when it fits; add a boundary only when it isolates real behavior, a stable contract, or useful reuse.

Find the owner

  • Trace the request from its public boundary to the state and side effects it changes. Put rules, contracts, persistence, rendering, and lifecycle behavior with their responsible layer.
  • Let a platform, protocol, database, or installed library own behavior it already guarantees. Do not create a wrapper that only forwards calls or a second source of state to compensate for an unclear boundary.
  • Keep shared contracts in their owning domain. Consumers import, extend, or derive them rather than recreating matching types or schemas.

Extract only a real boundary

  • Reuse existing adjacent patterns when their behavior and constraints match. Similar syntax alone does not justify an abstraction.
  • A reusable package should not depend on one application's routing, branding, or startup wiring. Give it a small explicit API and inject application-specific behavior at the edge.
  • Prefer a focused refactor that makes the current change simpler over a broad framework for hypothetical future cases.
  • State the concrete ownership problem, dependency direction, and consumer that the boundary improves. If those are unclear, keep the design local.

Verify the boundary

Check changed callers, public exports, failure ownership, and the real behavior across the new or adjusted seam. Preserve unrelated architecture; a design task does not authorize a migration or cleanup outside its scope.

Version History

  • 49e9bd0 Current 2026-11-13 18:19

Same Skill Collection

.agents/skills/api-dev/SKILL.md
.agents/skills/cc-pr-review/SKILL.md
.agents/skills/code-review/SKILL.md
.agents/skills/diagnosing-bugs/SKILL.md
.agents/skills/python-systems/SKILL.md
.agents/skills/testing/SKILL.md
.agents/skills/ui-dev/SKILL.md
skills/converting-to-canyonos/SKILL.md
skills/prompt-management/SKILL.md
skills/scaling-agents/SKILL.md

Metadata

Files
0
Version
49e9bd0
Hash
491c7e50
Indexed
2026-11-13 18:19

ホーム - Wiki
Copyright © 2011-2026 iteam. Current version is 2.156.0. UTC+08:00, 2026-11-13 19:15
浙ICP备14020137号-1