Skip to content
aictxt-manager logo

AI Context - [项目名] [GOAL ID]

aictxt-manager

生成、维护、修剪AICTXT文档,保持在CRAFT大小限制内。当AICTXT创建和更新时使用。

SKILL.md

Full skill instructions

aictxt-manager: AI上下文管理

描述

生成、维护、修剪AICTXT(AI Context Text)文档,确保AI代码生成的上下文大小在CRAFT标准限制内。

适用场景

  • WORKFLOW_STEP_5 Task S5-2: AICTXT创建初期,生成初始内容
  • WORKFLOW_STEP_5 Task S5-3: Self-Reflection中定期审视和修剪
  • 实施过程中: 当AICTXT增长过大时,需要修剪

输入

  • spec/​implementation/​ai_context.md(当前AICTXT)
  • goal_breakdown.md(GOAL清单)
  • scenarios/​bdd_test_scenarios.md(关键SC)
  • design/(架构和设计约束)
  • 当前级别(L1/​L2/​L3)

输出

  • AICTXT审视报告(markdown)
  • 当前大小分析(行数/​Token数)
  • 对标标准:
    • L1: ≤5000字/≤1000行
    • L2: ≤8000字/≤1500行
    • L3: ≤12000字/≤2000行
  • 修剪建议(删除/压缩/分离的内容)
  • 优化后的AICTXT片段

AICTXT内容结构

标准AICTXT结构(按优先级):

# AI Context - [项目名] [GOAL ID]

## 业务背景 (A级-关键)
- 用户故事: [US简述]
- 业务价值: [为什么重要]
- 成功标准: [AC清单]

## 技术约束 (A级-关键)
- 技术栈: [框架/库/版本]
- 关键依赖: [外部服务/​API]
- 性能要求: [响应时间/并发等]

## 实现目标 (A级-关键)
- GOAL: [G-NNN 描述]
- 关联SC: [SC-NNN, SC-NNN]
- 模块: [module_name]

## 架构概览 (B级-重要)
- 系统设计: [简要架构]
- 关键接口: [API/方法签名]
- 数据流: [输入→处理→输出]

## 已知约束 (B级-重要)
- 不能修改: [列表]
- 必须遵循: [规范/模式]
- 边界条件: [特殊情况]

## 参考链接 (C级-可选)
- 详细设计: [链接]
- 相关GOAL: [链接]
- 测试场景: [链接]

执行策略

第1步: 读取和分析

  • 读取当前ai_context.md
  • 计算大小(字数/行数/​Token数)
  • 对标CRAFT标准

第2步: 关键性分析

  • A级(关键): GOAL/​SC/业务背景/技术约束
  • B级(重要): 架构概览/关键接口/已知约束
  • C级(可选): 详细实现/背景知识/参考链接

第3步: 修剪方案

  • 删除C级非关键内容
  • 压缩B级冗余表达(用表格替代长段落)
  • 链接到外部文档而非嵌入
  • 删除过期或已完成的信息

第4步: 大小优化

优化技巧效果
用表格替代列表节省20-30%
删除示例代码节省30-40%
链接替代嵌入节省40-50%
缩写术语节省10-15%

第5步: L1/​L2/​L3分级

  • L1: 仅A级内容,≤1000行
  • L2: A级+B级核心,≤1500行
  • L3: 完整A级+B级,≤2000行

第6步: 生成优化版本

  • 保留关键信息完整
  • 删除冗余表达
  • 添加清晰的链接

价值

  • AI Pair/​Devs: AICTXT大小管理,提升AI代码生成效率
  • Tech Lead: 清晰的上下文焦点,避免AI分散注意力
  • 成本: 减少Token消耗,降低AI调用成本

验收标准

  • AICTXT大小在CRAFT限制内
  • 关键信息完整(GOAL/​SC/约束)
  • 冗余信息已删除
  • 链接清晰可追溯

More skills from majiayu000

xiaohongshu logo
majiayu000/claude-arsenal

xiaohongshu

xiaohongshu

286 148
View
agent-task-conductor logo
majiayu000/claude-skill-registry

agent-task-conductor

Conduct multi-agent task orchestration and workflow coordination.

663 1
View
conductor-setup logo
majiayu000/claude-skill-registry

conductor-setup

Initialize project with Conductor artifacts (product definition,

663 1
View
animation-designer logo
majiayu000/claude-skill-registry

animation-designer

Expert in web animations, transitions, and motion design using Framer Motion and CSS

663 1
View
diagramming logo
majiayu000/claude-skill-registry

diagramming

Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...

663 1
View
h3-pg logo
majiayu000/claude-skill-registry-data

h3-pg

PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.

23 1
View
conductor-development logo
majiayu000/claude-skill-registry

conductor-development

Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...

663 1
View
conductor-status logo
majiayu000/claude-skill-registry

conductor-status

Display project status, active tracks, and next actions

663 1
View
dockerization logo
majiayu000/claude-skill-registry

dockerization

Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.

663 1
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View