agentleFS
kip-vibecodingkip-vibecoding/code-documents-auto-skill/CLAUDE.md

code-documents-auto-skill

CLAUDE.md1 starsChanged 5 months agoMITView on GitHub

CRITICAL: 以下规则是强制性的,不可跳过。 当 AI 第一次接触项目时,必须自动执行: 用户不需要执行任何手动操作,AI 会自动完成所有初始化。 当用户输入开发任务时,AI 必须: 当用户表示开发完成时,AI 必须:

The file

Files
CLAUDE.md

CLAUDE.md - 工作流规则

核心原则

CRITICAL: 以下规则是强制性的,不可跳过。

自动初始化规则

当 AI 第一次接触项目时,必须自动执行:

  1. 检查项目状态
    • 检查是否存在 .ai-context/ 目录
    • 检查是否存在 CLAUDE.md 文件
  2. 自动设置规则
    • 如果 CLAUDE.md 不存在,创建并追加工作流规则
    • 如果 .ai-context/ 不存在,提示用户运行 /docs-scan

用户不需要执行任何手动操作,AI 会自动完成所有初始化。

Skill 指令驱动工作流

可用指令

指令说明使用场景
/docs <描述>智能助手,自动识别意图任何场景
/docs-scan全量扫描,生成完整文档首次使用、重大重构后
/docs-update增量更新,只更新变更部分日常开发后
/docs-check检测文档结构是否为最新版本升级插件版本后
/docs-prepare <任务>开发前准备,输出开发方案开始新任务前
/docs-archive归档模式,更新文档开发完成后

规则 1:开发前必须读取文档

当用户输入开发任务时,AI 必须:

  1. 检查文档是否存在
    • 检查 .ai-context/ 目录是否存在
    • 如果不存在,提示用户先运行 /docs-scan
  2. 解析任务描述
    • 识别涉及的模块
    • 识别涉及的功能
    • 识别可能涉及的文件
  3. 自动读取相关文档
    • 读取架构文档:.ai-context/architecture.md
    • 读取编码规范:.ai-context/guidelines/coding-style.md
    • 读取模块文档:.ai-context/modules/[模块名].md
    • 读取 API 文档:.ai-context/api/[API名].md
  4. 输出读取摘要
    • 列出已读取的文档
    • 总结关键信息
    • 提示用户可以开始开发

规则 2:开发后必须归档文档

当用户表示开发完成时,AI 必须:

  1. 检测变更
    • 使用 git diff 扫描修改的文件
    • 识别涉及的模块
  2. 生成变更记录
    • 创建 .ai-context/changelog/YYYY-MM-DD-HHMMSS-auto-archive.md
    • 包含变更描述、修改文件列表、影响分析
  3. 更新相关文档
    • 更新模块文档:.ai-context/modules/[模块名].md
    • 更新 API 文档:.ai-context/api/[API名].md
  4. 输出归档摘要
    • 列出已更新的文档
    • 总结变更内容
    • 提示归档完成

规则 3:禁止跳过任何步骤

以下行为是严格禁止的:

  • ❌ 跳过文档读取直接编辑代码
  • ❌ 跳过文档归档直接结束工作
  • ❌ 忽略用户的 /docs-prepare 或 /docs-archive 指令

指令场景示例

示例 1:开发前读取

用户:/docs-prepare 加跨域请求配置

AI 必须执行:
1. 检查 .ai-context/ 是否存在
2. 解析任务 → 识别涉及 "跨域"、"配置"、"请求" 相关模块
3. 查找文档 → .ai-context/modules/config/, .ai-context/api/ 等
4. 读取文档 → 读取所有相关文档
5. 输出摘要 → "已读取以下文档:..."

示例 2:开发后归档

用户:/docs-archive

AI 必须执行:
1. 检测变更 → git diff 扫描修改的文件
2. 生成记录 → 创建 changelog
3. 更新文档 → 更新相关模块文档
4. 输出摘要 → "已归档以下变更:..."

示例 3:多模块变更

用户:/docs-prepare 修改用户登录和权限验证功能

AI 必须执行:
1. 读取相关文档
2. 用户开发
3. /docs-archive 归档变更

文档结构

.ai-context/
├── README.md                    # 项目概览
├── architecture.md              # 系统架构
├── guidelines/                  # 编码规范
│   └── coding-style.md
├── modules/                     # 模块文档
│   ├── {模块1}.md
│   └── {模块2}.md
├── api/                         # API 文档
│   ├── {API1}.md
│   └── {API2}.md
├── changelog/                   # 变更记录
└── decisions/                   # 决策记录

快速参考

读取文档指令

/docs-prepare <任务描述>

示例:

/docs-prepare 加跨域请求配置
/docs-prepare 修改登录功能
/docs-prepare 修复认证 bug

归档指令

/docs-archive

增量更新指令

/docs-update

初始扫描

/docs-scan

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.