AGENT SKILL

功能知识文档创建与更新

knowledge-management

为某个功能领域创建或更新知识文件。当用户说「update knowledge」「为 X 创建知识文件」「记录这个功能」,或在完成一个需要知识文档记录的功能之后使用。

License 许可
MIT
最近更新
2026-10-24
Stars
★ 0
Forks
0

01 前言 Front Matter

name
knowledge-management
description
Create or update knowledge files for a feature area. Use when the user says "update knowledge", "create knowledge file for X", "document this feature", or after completing a feature that needs knowledge documentation.

03 SKILL.md 正文

Knowledge Management

This skill guides you through creating or updating files in the knowledge/ directory. Follow the conventions defined in .cursor/rules/knowledge.mdc.

Step 1: Determine the Action

Use AskQuestion:

prompt: "What would you like to do?"
options:
  - Create a new knowledge file for a feature area
  - Update an existing knowledge file
  - Review all knowledge files for staleness

Creating a New Knowledge File

Step 2a: Identify the Feature Area

Ask the user which feature area to document, or infer it from the conversation context. The file should be named after the feature area in lowercase with underscores (e.g., knowledge/billing.md, knowledge/auth.md).

Step 3a: Explore the Codebase

Read the source code for the feature area thoroughly:

  1. Identify the key modules, classes, and functions
  2. Trace the main code paths and data flow
  3. Note design decisions that are not obvious from the code alone
  4. Look for edge cases, gotchas, and non-obvious behaviors

Also read knowledge/architecture.md to understand how this area fits into the overall system.

Step 4a: Draft the Knowledge File

Write the file following this structure:

# <Feature Area Name>

<One or two sentences describing what this area does.>

## Design Decisions

<Why it works the way it does. Trade-offs, constraints, alternatives considered. Use a heading per decision if there are several.>

## API Surface

<Key classes, functions, types, and their relationships. Focus on what another developer (or the AI) needs to know to work in this area correctly.>

## Key Learnings / Gotchas

<Non-obvious behaviors, edge cases, things that broke before, common mistakes to avoid.>

Step 5a: Write and Confirm

Write the file to knowledge/<feature-area>.md. Tell the user what was created and suggest they review it.


Updating an Existing Knowledge File

Step 2b: Identify What Changed

Determine which knowledge file needs updating. This can come from:

  • The user specifying a file directly
  • A feature that was just implemented or modified
  • A bug fix that revealed a non-obvious behavior

Step 3b: Read Current State

Read the existing knowledge file and the relevant source code. Identify which sections are stale or incomplete.

Step 4b: Rewrite Affected Sections

Update only the sections that need changes. Knowledge files describe the present state — rewrite sections entirely rather than appending notes or changelogs. Keep the same structure (Design Decisions, API Surface, Key Learnings / Gotchas).

Step 5b: Write and Confirm

Write the updated file. Tell the user what was changed and why.


Reviewing All Knowledge Files

Step 2c: Scan for Staleness

For each file in knowledge/:

  1. Read the knowledge file
  2. Check if the source code it describes has changed significantly since the file was last written
  3. Flag files that appear outdated

Step 3c: Report

Present a summary listing each knowledge file with its status:

  • Current — the file accurately reflects the source code
  • Needs update — the source code has diverged; explain what looks stale
  • Missing — a significant feature area has source code but no knowledge file

Use AskQuestion with allow_multiple: true to let the user pick which files to update, then follow the update flow above for each.

04 同仓库更多 Skills

cartaorobbin
cartaorobbin/pyramid-temporal

pytest 测试编写

write-pytest

为任何 Python 代码库编写 pytest 测试。当用户要求编写测试、创建测试、添加测试,或测试某个模块/服务/端点/函数时使用。与框架无关;当检测到相关信号时会路由到框架专用的辅助工具。遵循“先研究—再讨论—后编写”的流程。

测试工程师测试与质量保障
★ 0
cartaorobbin
cartaorobbin/pyramid-temporal

会话质量保障检查

quality-assurance

对当前聊天会话执行质量保障检查——任务前验证、任务后清单和代码审查。在完成任务时、提交前或用户要求进行 QA 审查时使用。

测试工程师测试与质量保障
★ 0
cartaorobbin
cartaorobbin/pyramid-temporal

Python 开发规范配置

python-developer

Python 开发者总括技能——一次性安装 Python 编码约定,并捆绑配套技能(最佳实践、测试、依赖管理)完成统一配置。当用户要求建立 Python 开发规范、安装 Python 技能,或说“搭建 Python 开发环境”时使用。

软件开发工程师开发参考
★ 0
cartaorobbin
cartaorobbin/pyramid-temporal

Python 编码最佳实践

python-best-practices

全面的 Python 编码约定与最佳实践。当用户询问 Python 约定、编码模式、最佳实践、代码风格、反模式,或“这段 Python 代码应该怎么写”时使用。

软件开发工程师开发参考
★ 0
cartaorobbin
cartaorobbin/pyramid-temporal

Pyramid 扩展库开发

pyramid-library

库开发者角色:开发独立的 Pyramid 扩展(拥有自己的仓库与包),并向外部使用者暴露 includeme。当用户构建可复用的 Pyramid 库、为使用者设计 includeme、注册自定义指令/tween/请求方法,或使用规范的应用程序测试库时使用。

软件开发工程师开发参考
★ 0
cartaorobbin
cartaorobbin/pyramid-temporal

Pyramid 框架开发规范

pyramid-developer

Pyramid 框架开发约定——配置/注册表、基于 includeme 的模块系统、pyramid_services、模型、Cornice REST、ACL 授权以及事务处理。在为一个项目建立 Pyramid 开发规范时使用。

软件开发工程师开发参考
★ 0