agentleFS
kip-vibecodingkip-vibecoding/code-documents-auto-skill/skills/docs/SKILL.md

docs

Skill1 starsChanged 5 months agoMITView on GitHub

智能文档助手。根据用户输入自动判断意图:开发前准备、找Bug、归档变更、全量扫描、增量更新。

165 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use import-memory, perf and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • amirbironSkill

    import-memory

    Import a memory export from another AI assistant into Claude's memory — conversationally, additively, and with the content treated as data.

    Also in 3 projects that use this

  • MicrosoftSkill

    perf

    Speed and memory performance rules for Rust crates, the Node addon, webui-framework, and webui-delivery.

    Also in 4 projects that use this

  • diego-tobalinaSkill

    build-fix

    Fix build and compilation errors systematically. Run when build fails.

    Also in 3 projects that use this

  • JkudjoSkill

    incident

    Production incident response — structured triage, hypothesis tree, safe remediation, incident record

    Also in 4 projects that use this

  • vbrevikSkill

    work

    Use when the user says 'plan', 'todo', 'copy plan', 'append plan', 'resume plan', 'priorities', or 'what's next'.

    Also in 7 projects that use this

  • mbwsimsSkill

    impact

    This skill should be used when the user asks to "check the impact", "what will break if I change this", "blast radius", "impact analysis", "what depends on this", "who imports this", "is it safe to change this", mentions "/impact", or wants to understand the consequences of modifying a specific file or function before making changes.

    Also in 3 projects that use this

The file

Files
SKILL.md

/docs — 智能文档助手

当用户输入 /docs <描述> 时,执行以下流程:

步骤 1:意图识别

分析用户输入,判断意图:

意图触发词/模式执行流程
开发前准备"开发"、"添加"、"实现"、"修改"、"新增"、"功能"、"需求"执行步骤 2A
找 Bug"找bug"、"检查"、"修复"、"问题"、"调试"、"错误"、"异常"执行步骤 2B
归档变更"完成"、"归档"、"提交"、"结束"、"搞定"、"做完"执行步骤 2C
全量扫描"扫描"、"初始化"、"生成文档"、"第一次"执行步骤 2D
增量更新"更新"、"同步"、"增量"执行步骤 2E
检测+迁移"检测文档"、"检查文档"、"旧格式"、"升级文档"、"迁移"、"转换"、"结构是否最新"、"文档是否过时"、"升级到最新"执行步骤 2F(自动迁移)

步骤 2A:开发前准备

触发词:开发XX功能、添加XX、实现XX、修改XX、新增XX

执行流程:

  1. 检查文档是否存在
    • 检查 .ai-context/ 目录是否存在
    • 如果不存在,提示用户先运行 /docs-scan 或 /docs 扫描
  2. 解析任务描述
    • 识别涉及的模块
    • 识别涉及的功能
    • 识别可能涉及的文件
  3. 读取相关文档
    • 读取架构文档:.ai-context/architecture.md
    • 读取编码规范:.ai-context/guidelines/coding-style.md
    • 读取模块文档:.ai-context/modules/[模块名].md
    • 读取 API 文档:.ai-context/api/[API名].md
  4. 输出开发方案
    • 列出已读取的文档
    • 输出完整的开发方案(任务理解、涉及模块、修改文件清单、实现步骤、影响范围、风险点)
    • 提示用户可以开始开发

步骤 2B:找 Bug

触发词:找bug、检查问题、修复XX、调试、异常

执行流程:

  1. 分析代码
    • 读取相关模块代码
    • 分析可能的问题点
  2. 检查常见问题
    • 空指针/未定义检查
    • 边界条件处理
    • 异常处理完整性
    • 资源释放(连接、流等)
    • 并发安全
    • SQL注入/XSS等安全问题
  3. 输出分析报告
    🔍 Bug 分析报告
    
    ---
    
    ## 分析范围
    
    - 模块:{分析的模块}
    - 文件:{分析的文件列表}
    
    ---
    
    ## 发现的问题
    
    | # | 文件 | 行号 | 问题 | 严重程度 | 建议修复 |
    |---|------|------|------|----------|----------|
    | 1 | {文件} | {行号} | {问题描述} | 高/中/低 | {修复建议} |
    
    ---
    
    ## 潜在风险
    
    - ⚠️ {风险1}:{说明}
    
    ---
    
    ## 修复建议
    
    1. **{问题1}**
       - 文件:{文件路径}
       - 修改:{修改建议}

步骤 2C:归档变更

触发词:完成、归档、提交、结束、搞定、做完

执行流程:

  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. 输出归档摘要
    • 列出已更新的文档
    • 总结变更内容
    • 提示归档完成

步骤 2D:全量扫描

触发词:扫描、初始化、生成文档、第一次

执行流程:

执行 /docs-scan 的完整流程:

  1. 扫描项目结构
  2. 识别项目类型
  3. 判断项目分类(纯前端/纯后端/全栈/库/桌面移动)
  4. 读取关键文件
  5. 分析代码模块
  6. 分析数据库模块(仅当涉及数据库时)
  7. 分析中间件使用(仅当涉及中间件时)
  8. 分析 API 路由(如有)
  9. 按分类生成文档(纯前端项目跳过 database/ 和 middleware/ 文档)
  10. 输出扫描摘要

步骤 2E:增量更新

触发词:更新、同步、增量

执行流程:

执行 /docs-update 的完整流程:

  1. 检测变更(git diff)
  2. 分析变更影响
  3. 增量更新文档
  4. 创建变更记录
  5. 输出增量更新摘要

步骤 2F:检测文档结构并自动迁移

触发词:检测文档、检查文档、旧格式、升级文档、迁移、转换、结构是否最新、文档是否过时、升级到最新

执行流程:

执行 /docs-check 的完整流程(默认自动迁移):

  1. 检查 .ai-context/ 目录是否存在
  2. 检测 changelog/ 目录结构(单文件 vs 文件夹)
  3. 检测 changelog/README.md 表格格式版本
  4. 检测 docs/ 子目录完整性
  5. 检测标题列填写质量
  6. 自动执行迁移(单文件拆分为文件夹、表格升级为 8 列、补全 docs/ 子目录)
  7. 输出检测+迁移报告

仅检测模式:/docs-check --report(不自动迁移)


步骤 3:输出结果

根据执行的流程,输出对应的结果摘要。


示例

示例 1:开发功能

用户:/docs 开发用户登录功能

AI 执行:
1. 识别意图 → 开发前准备
2. 检查 .ai-context/ 目录
3. 读取相关文档
4. 输出开发方案

示例 2:找 Bug

用户:/docs 检查登录模块的问题

AI 执行:
1. 识别意图 → 找 Bug
2. 分析登录模块代码
3. 输出 Bug 分析报告

示例 3:归档变更

用户:/docs 开发完成了

AI 执行:
1. 识别意图 → 归档变更
2. 检测代码变更
3. 生成变更记录
4. 更新相关文档
5. 输出归档摘要

示例 4:全量扫描

用户:/docs 扫描代码库

AI 执行:
1. 识别意图 → 全量扫描
2. 执行完整扫描流程
3. 生成所有文档

示例 5:增量更新

用户:/docs 更新文档

AI 执行:
1. 识别意图 → 增量更新
2. 检测变更
3. 更新受影响的文档

示例 6:检测文档结构并自动迁移

用户:/docs 我的文档是不是过时了
或 /docs 迁移到新格式
或 /docs 升级文档

AI 执行:
1. 识别意图 → 检测+迁移
2. 扫描 .ai-context/ 目录
3. 检测到 3 个旧格式 changelog
4. 自动拆分为文件夹结构
5. 升级 README.md 表格为 8 列
6. 输出迁移报告

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.