AgentSkillsCN

aico-backend-init

以详细的实施步骤,创建或优化后端任务。本指南支持两种模式: 模式A:优化现有任务(在文件中为任务添加详细步骤); 模式B:创建全新的独立任务文件(可包含单个任务,也可包含多个任务)。 重要提示:本指南聚焦于微观层面的原子级步骤,而非宏观层面的架构规划。 若需进行架构规划或功能范围界定,请改用EnterPlanMode。 适用场景: - 当您运行/backend.plan命令时; - 当用户提出“原子级步骤”、“带验证的逐步计划”时; - 当您已有具体任务,亟需实施步骤时; - 当用户希望创建独立任务文件(而非基于故事的任务)时; - 当您需要精细的步骤划分:类型 → 数据库 → 仓储 → 服务 → API → 测试。 以下情况请勿使用本指南: - 架构规划(请使用EnterPlanMode); - 通用开发规划; - 功能范围界定或估算。 输出: - 模式A:在文件中更新特定任务部分,补充实施步骤; - 模式B:创建新的standalone-{name}.md文件,其中可包含单个或多个任务。

SKILL.md
--- frontmatter
name: aico-backend-init
description: |
  Initialize backend environment by creating constraints document from template.

  Use this skill when:
  - Running /backend.init command
  - User asks to "initialize backend", "setup backend environment"
  - Starting backend work and need to establish tech stack and conventions
  - Need to create docs/reference/backend/constraints.md

Backend Init

Initialize backend development environment by creating the constraints file.

Language Configuration

Before generating any content, check aico.json in project root for language field to determine the output language. If not set, default to English.

Process

  1. Check existing: Look for docs/reference/backend/constraints.md
  2. If exists: Ask user if they want to overwrite or skip
  3. Create directory structure:
    code
    docs/reference/backend/
    ├── constraints.md
    └── tasks/
    
  4. Generate constraints file:
    • Read template from references/constraints.template.md
    • Guide user through key decisions
  5. Save output: Write to docs/reference/backend/constraints.md

Document Header Format

All generated documents MUST use this unified header format:

markdown
# [Document Title]

> Project: [project-name]
> Created: YYYY-MM-DD
> Last Updated: YYYY-MM-DD

Guided Questions

CategoryQuestions
Language/RuntimeNode.js, Python, Go, Rust?
FrameworkExpress, Fastify, FastAPI, Gin?
DatabasePostgreSQL, MySQL, MongoDB?
ORM/QueryPrisma, Drizzle, SQLAlchemy, GORM?
TestingVitest, Jest, Pytest, Go test?
API StyleREST, GraphQL, gRPC?

Template

See references/constraints.template.md for the full constraints template.

Update Instructions File

After creating constraint files, update the project's AI instructions file to reference them:

  1. Check for existing instructions file:

    • Look for CLAUDE.md (Claude Code) or AGENTS.md (Codex) in project root
    • If neither exists, create CLAUDE.md
  2. Add reference section at the end of the file:

    markdown
    ## Reference Documents
    
    The following constraint documents should be read before starting work:
    
    - `docs/reference/backend/constraints.md` - Tech stack and coding conventions
    
  3. If file already has Reference Documents section: Append the new reference if not already present

Output

code
✓ Created docs/reference/backend/constraints.md
✓ Created docs/reference/backend/tasks/
✓ Updated CLAUDE.md with reference to constraint files
✓ Backend environment initialized

Key Rules

  • ALWAYS use the unified header format
  • MUST guide user through tech stack questions
  • ALWAYS create tasks/ directory
  • ALWAYS save to docs/reference/backend/constraints.md
  • MUST update CLAUDE.md or AGENTS.md with reference to constraint files