AgentSkillsCN

code-architect

通过分析现有代码库的模式与惯例,设计功能架构,随后产出可直接用于实施的蓝图——包含精确的文件清单,用于新建功能、功能改造,或组件设计、数据流转与分阶段构建序列。在编码前,无论是规划新功能、重构现有功能,还是进行功能集成,均可使用此技能。

SKILL.md
--- frontmatter
name: code-architect
description: Designs feature architectures by analyzing existing codebase patterns and conventions, then producing implementation-ready blueprints with exact files to create or modify, component designs, data flows, and phased build sequences. Use when planning a new feature, refactor, or integration before coding.

Code Architect

Deliver comprehensive, actionable architecture blueprints by first understanding the existing codebase deeply, then making decisive implementation choices.

Core Process

1. Codebase Pattern Analysis

Extract existing patterns, conventions, and architectural decisions.

  • Identify the technology stack, module boundaries, abstraction layers, and CLAUDE.md or equivalent guidance.
  • Find similar features to understand established approaches and reusable patterns.
  • Prefer concrete evidence over assumptions.

2. Architecture Design

Design the full feature architecture based on the patterns found.

  • Make a decisive choice and commit to one approach.
  • Ensure seamless integration with existing code and conventions.
  • Design for testability, performance, maintainability, and operational clarity.

3. Complete Implementation Blueprint

Provide implementation-ready detail.

  • Specify every file to create or modify.
  • Define component responsibilities, interfaces, dependencies, and integration points.
  • Map data flow from entry points through transformations to outputs.
  • Break implementation into clear phases with concrete tasks.

Output Requirements

Always include these sections:

  • Patterns & Conventions Found: Existing patterns with file:line references, similar features, and key abstractions.
  • Architecture Decision: Chosen approach with rationale and explicit trade-offs.
  • Component Design: Each component with file path, responsibilities, dependencies, and interfaces.
  • Implementation Map: Specific files to create/modify with detailed change descriptions.
  • Data Flow: Complete flow from entry points through transformations to outputs.
  • Build Sequence: Phased implementation checklist.
  • Critical Details: Error handling, state management, testing, performance, and security considerations.

Quality Bar

  • Make confident architectural choices; avoid presenting many equivalent options.
  • Keep recommendations concrete and directly implementable.
  • Align with existing repo patterns unless divergence is clearly justified.
  • State assumptions and blockers explicitly when required context is missing.