first commit
This commit is contained in:
44
skills/self-improving-agent-3.0.5/assets/LEARNINGS.md
Normal file
44
skills/self-improving-agent-3.0.5/assets/LEARNINGS.md
Normal file
@@ -0,0 +1,44 @@
|
||||
# Learnings
|
||||
|
||||
用于记录开发过程中的 corrections、insights 和 knowledge gaps。
|
||||
|
||||
**Categories**: correction | insight | knowledge_gap | best_practice
|
||||
**Areas**: frontend | backend | infra | tests | docs | config
|
||||
**Statuses**: pending | in_progress | resolved | wont_fix | promoted | promoted_to_skill
|
||||
|
||||
## Status Definitions
|
||||
|
||||
| Status | Meaning |
|
||||
|--------|---------|
|
||||
| `pending` | 尚未处理 |
|
||||
| `in_progress` | 正在处理 |
|
||||
| `resolved` | 问题已修复或知识已吸收 |
|
||||
| `wont_fix` | 决定不处理(原因写在 Resolution 中) |
|
||||
| `promoted` | 已提升到 CLAUDE.md、AGENTS.md 或 copilot-instructions.md |
|
||||
| `promoted_to_skill` | 已提炼为可复用的 skill |
|
||||
|
||||
## Skill Extraction Fields
|
||||
|
||||
当一条 learning 被提升为 skill 时,添加以下字段:
|
||||
|
||||
```markdown
|
||||
**Status**: promoted_to_skill
|
||||
**Skill-Path**: skills/skill-name
|
||||
```
|
||||
|
||||
示例:
|
||||
```markdown
|
||||
## [LRN-20250115-001] best_practice
|
||||
|
||||
**Logged**: 2025-01-15T10:00:00Z
|
||||
**Priority**: high
|
||||
**Status**: promoted_to_skill
|
||||
**Skill-Path**: skills/docker-m1-fixes
|
||||
**Area**: infra
|
||||
|
||||
### Summary
|
||||
Docker build fails on Apple Silicon due to platform mismatch
|
||||
...
|
||||
```
|
||||
|
||||
---
|
||||
177
skills/self-improving-agent-3.0.5/assets/SKILL-TEMPLATE.md
Normal file
177
skills/self-improving-agent-3.0.5/assets/SKILL-TEMPLATE.md
Normal file
@@ -0,0 +1,177 @@
|
||||
# Skill Template
|
||||
|
||||
用于从 learnings 中提炼 skill 的模板。复制后按需定制。
|
||||
|
||||
---
|
||||
|
||||
## SKILL.md Template
|
||||
|
||||
```markdown
|
||||
---
|
||||
name: skill-name-here
|
||||
description: "简洁说明这个 skill 在什么场景下使用、为什么要使用。包含 trigger conditions。"
|
||||
---
|
||||
|
||||
# Skill Name
|
||||
|
||||
简要介绍这个 skill 解决的问题,以及它的来源。
|
||||
|
||||
## Quick Reference
|
||||
|
||||
| Situation | Action |
|
||||
|-----------|--------|
|
||||
| [Trigger 1] | [Action 1] |
|
||||
| [Trigger 2] | [Action 2] |
|
||||
|
||||
## Background
|
||||
|
||||
说明这类知识为什么重要、能避免什么问题,以及原始 learning 提供的上下文。
|
||||
|
||||
## Solution
|
||||
|
||||
### Step-by-Step
|
||||
|
||||
1. 第一步,附上 code 或 command
|
||||
2. 第二步
|
||||
3. 验证步骤
|
||||
|
||||
### Code Example
|
||||
|
||||
\`\`\`language
|
||||
// 展示解决方案的示例代码
|
||||
\`\`\`
|
||||
|
||||
## Common Variations
|
||||
|
||||
- **Variation A**: 说明这种变体以及如何处理
|
||||
- **Variation B**: 说明这种变体以及如何处理
|
||||
|
||||
## Gotchas
|
||||
|
||||
- 常见警告或错误 #1
|
||||
- 常见警告或错误 #2
|
||||
|
||||
## Related
|
||||
|
||||
- 指向相关文档
|
||||
- 指向相关 skill
|
||||
|
||||
## Source
|
||||
|
||||
Extracted from learning entry.
|
||||
- **Learning ID**: LRN-YYYYMMDD-XXX
|
||||
- **Original Category**: correction | insight | knowledge_gap | best_practice
|
||||
- **Extraction Date**: YYYY-MM-DD
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Minimal Template
|
||||
|
||||
适用于不需要太多 section 的简单 skill:
|
||||
|
||||
```markdown
|
||||
---
|
||||
name: skill-name-here
|
||||
description: "这个 skill 做什么,以及在什么场景下使用。"
|
||||
---
|
||||
|
||||
# Skill Name
|
||||
|
||||
[用一句话说明问题]
|
||||
|
||||
## Solution
|
||||
|
||||
[直接给出解决方案与 code/commands]
|
||||
|
||||
## Source
|
||||
|
||||
- Learning ID: LRN-YYYYMMDD-XXX
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Template with Scripts
|
||||
|
||||
适用于包含可执行 helper 的 skill:
|
||||
|
||||
```markdown
|
||||
---
|
||||
name: skill-name-here
|
||||
description: "这个 skill 做什么,以及在什么场景下使用。"
|
||||
---
|
||||
|
||||
# Skill Name
|
||||
|
||||
[简介]
|
||||
|
||||
## Quick Reference
|
||||
|
||||
| Command | Purpose |
|
||||
|---------|---------|
|
||||
| `./scripts/helper.sh` | [它的作用] |
|
||||
| `./scripts/validate.sh` | [它的作用] |
|
||||
|
||||
## Usage
|
||||
|
||||
### Automated (Recommended)
|
||||
|
||||
\`\`\`bash
|
||||
./skills/skill-name/scripts/helper.sh [args]
|
||||
\`\`\`
|
||||
|
||||
### Manual Steps
|
||||
|
||||
1. 第一步
|
||||
2. 第二步
|
||||
|
||||
## Scripts
|
||||
|
||||
| Script | Description |
|
||||
|--------|-------------|
|
||||
| `scripts/helper.sh` | 主工具 |
|
||||
| `scripts/validate.sh` | 校验工具 |
|
||||
|
||||
## Source
|
||||
|
||||
- Learning ID: LRN-YYYYMMDD-XXX
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Naming Conventions
|
||||
|
||||
- **Skill name**: 使用 lowercase,空格用 hyphens
|
||||
- Good: `docker-m1-fixes`, `api-timeout-patterns`
|
||||
- Bad: `Docker_M1_Fixes`, `APITimeoutPatterns`
|
||||
|
||||
- **Description**: 以动作开头,并说明 trigger
|
||||
- Good: "Handles Docker build failures on Apple Silicon. Use when builds fail with platform mismatch."
|
||||
- Bad: "Docker stuff"
|
||||
|
||||
- **Files**:
|
||||
- `SKILL.md` - 必需,主文档
|
||||
- `scripts/` - 可选,可执行代码
|
||||
- `references/` - 可选,详细文档
|
||||
- `assets/` - 可选,模板
|
||||
|
||||
---
|
||||
|
||||
## Extraction Checklist
|
||||
|
||||
在从 learning 创建 skill 之前:
|
||||
|
||||
- [ ] Learning 已验证(status: resolved)
|
||||
- [ ] 解决方案具有广泛适用性(不是一次性问题)
|
||||
- [ ] 内容完整(包含必要上下文)
|
||||
- [ ] 名称符合 conventions
|
||||
- [ ] Description 简洁但信息充分
|
||||
- [ ] Quick Reference table 可直接执行
|
||||
- [ ] Code examples 已测试
|
||||
- [ ] 已记录 source learning ID
|
||||
|
||||
创建之后:
|
||||
|
||||
- [ ] 将原 learning 更新为 `promoted_to_skill`
|
||||
- [ ] 在 learning metadata 中添加 `Skill-Path: skills/skill-name`
|
||||
- [ ] 在新的 session 中读取该 skill,确认可用
|
||||
Reference in New Issue
Block a user