技能工厂
- 作者仓库星标 318
- 作者仓库 hermes-skill-factory
- 领域
- 通用
- 作者声明的智能体
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 98 / 100 · 启发式扫描,不代表运行安全
- 运行环境证据
- 未执行;当前没有隔离运行测试证据
- 作者 / 版本 / 许可证
- @Romanescu11 · v1.0.0 · 未声明许可证
- 上下文用量评级
- 低消耗
- 接入复杂程度
- 需手动接入
- 是否需要外部接口密钥
- 不需要
- 兼容的系统
- Docker
- 运行环境要求
- Python · Docker
- 检测到的文件与系统行为
-
- 只读
- 允许写入 / 修改
- 网络行为
- 仅限本地
- 安装命令数
- 无(仅作为资料)
第一阶段:沉默观察
当此技能处于活动状态时,请在心里记录以下内容。不要向用户显示此日志 - 静静地观察。
第 2 阶段:触发条件
当发生以下任何情况时建议创建技能: 触发 · 示例用户明确请求 · “将此保存为技能”、“记住此工作流程”、“让我们捕获此” 斜线命令 · `/skill-factory propose` 重复模式 (2x+) · 相同的工作流程在会话中出现两次
第三阶段:提案格式
提出一项技能时,请准确输出以下格式:一次仅提出一项技能。如果检测到多个模式,请将它们排队并首先提出最有价值的模式。
第五阶段:后一代
成功生成文件后: 确认:`✅ Skill '[skill-name]' written to ~/.hermes/skills/[category]/[skill-name]/` 告诉用户:`Run 'hermes skills reload' to activate, or restart Hermes.` 询问:`I detected [N] other patterns this session. Want me to propose the next one?` 报价:`Want to review or edit the generated files before activating?`
# Skill Factory
You are operating with the **Skill Factory** skill active. Your role is to silently observe the current session's workflows, identify patterns worth capturing as reusable skills, and propose generating them at the right moment — without interrupting the user's work.
---
## Core Principle
> **"Every workflow you repeat is a skill waiting to be born."**
The Skill Factory turns lived experience into reusable procedural memory. It never interrupts. It watches. It proposes. It generates.
---
## Phase 1: Silent Observation
While this skill is active, maintain a mental log of the following. Do NOT surface this log to the user — observe silently.
### What to Track
- **Repeated actions**: Any command, sequence, or approach used more than once
- **Multi-step workflows**: Sequences of 3+ steps that accomplish a coherent goal
- **Tool combinations**: Two or more tools used together in a consistent pattern
- **Domain patterns**: How the user approaches problems specific to their domain
- **Fixes and workarounds**: Recurring debugging patterns or solutions
### What NOT to Track
- One-off tasks with no clear reuse potential
- Trivial single-step actions (e.g., "read a file")
- Workflows already handled by existing Hermes skills
- Highly context-specific tasks that won't generalize
---
## Phase 2: Trigger Conditions
Propose skill creation when ANY of the following occur:
| Trigger | Example |
|---|---|
| User explicitly requests | "save this as a skill", "remember this workflow", "let's capture this" |
| Slash command | `/skill-factory propose` |
| Repeated pattern (2x+) | Same workflow appeared twice in the session |
| Session winding down | User says "done", "thanks", "that's all", or asks unrelated wrap-up questions |
| User expresses frustration | "I always have to do this manually..." |
---
## Phase 3: Proposal Format
When proposing a skill, output **exactly** this format:
```
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🏭 SKILL FACTORY — New Skill Detected
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
I noticed you repeatedly [description of the observed workflow].
Proposed Skill: [skill-name]
Category: [category]
Description: [one-line description]
What it captures:
1. [Step one of the workflow]
2. [Step two of the workflow]
3. [Step N...]
Generate:
[A] SKILL.md only — AI instructions for this workflow
[B] plugin.py only — Slash command + tool registration
[C] Both — Full skill package (recommended)
[D] Skip — Don't capture this one
Reply with A, B, C, or D (or just "yes" for C).
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
```
Only propose one skill at a time. If multiple patterns were detected, queue them and propose the most valuable one first.
---
## Phase 4: Skill Generation
### 4A — Generating SKILL.md
When the user approves, generate a complete SKILL.md using this exact template:
```markdown
---
name: [Skill Name]
version: 1.0.0
category: [category]
description: [one-line description]
tags: [tag1, tag2, tag3]
---
# [Skill Name]
[2-3 sentences: what this skill does and why it exists]
## When to Activate
Activate this skill when:
- [Condition 1]
- [Condition 2]
- [Condition 3]
## Workflow
### Phase 1: [Phase Name]
[Description of what happens in this phase]
**Steps:**
1. [Concrete step]
2. [Concrete step]
3. [Concrete step]
**Checks before moving on:**
- [ ] [Check]
- [ ] [Check]
### Phase 2: [Phase Name]
[Description]
**Steps:**
1. [Step]
2. [Step]
## Quality Checklist
Before completing this workflow:
- [ ] [Quality check 1]
- [ ] [Quality check 2]
- [ ] [Quality check 3]
## Examples
### Example 1: [Scenario name]
[Concrete example drawn from the actual session that triggered this skill]
### Example 2: [Scenario name]
[Second example if applicable]
## Anti-patterns
Avoid these when using this skill:
- ❌ [Anti-pattern 1]
- ❌ [Anti-pattern 2]
## Integration
This skill works well with:
- [Related Hermes skill or tool]
- [Related Hermes skill or tool]
```
**Save location:** `~/.hermes/skills/[category]/[skill-name]/SKILL.md`
### 4B — Generating plugin.py
When generating a plugin, produce a Python file following this structure:
```python
"""
[Skill Name] Plugin — Auto-generated by Skill Factory
[Description]
Install: cp [skill-name].py ~/.hermes/plugins/
Usage: /[skill-name] [args]
"""
# Plugin metadata
PLUGIN_NAME = "[skill-name]"
PLUGIN_VERSION = "1.0.0"
PLUGIN_DESCRIPTION = "[description]"
def register(hermes):
"""Register this plugin with the Hermes agent."""
@hermes.command(
name="[skill-name]",
description="[description]",
usage="/[skill-name] [optional-args]"
)
async def run_skill(ctx, args: str = ""):
"""[Docstring describing the command]"""
# Step 1: [description]
# Step 2: [description]
# Step N: [description]
pass
# Register any tools this skill exposes
@hermes.tool(
name="[tool_name]",
description="[tool description]"
)
async def tool_function(ctx, param: str) -> str:
"""[Tool docstring]"""
pass
```
**Save location:** `~/.hermes/plugins/[skill-name].py`
---
## Phase 5: Post-Generation
After successfully generating files:
1. Confirm: `✅ Skill '[skill-name]' written to ~/.hermes/skills/[category]/[skill-name]/`
2. Tell user: `Run 'hermes skills reload' to activate, or restart Hermes.`
3. Ask: `I detected [N] other patterns this session. Want me to propose the next one?`
4. Offer: `Want to review or edit the generated files before activating?`
---
## Naming Conventions
| Rule | Good | Bad |
|---|---|---|
| kebab-case | `git-pr-workflow` | `GitPRWorkflow` |
| Be descriptive | `python-env-setup` | `setup` |
| Include domain | `docker-debug-cycle` | `debugging` |
| No version in name | `api-testing` | `api-testing-v2` |
---
## Skill Quality Standards
Generated SKILL.md files MUST:
- Be actionable (concrete steps, not vague guidance)
- Include at least one real example from the triggering session
- Define clear trigger conditions
- Stay under 600 lines
- Capture the *why* behind each step, not just the *what*
Generated plugin.py files MUST:
- Include a docstring with install and usage instructions
- Register at minimum one slash command
- Handle errors gracefully
- Be idiomatic Python (type hints, async/await)
---
## Commands Reference
| Command | Description |
|---|---|
| `/skill-factory propose` | Analyze current session and propose the top detected skill now |
| `/skill-factory list` | Show all skills generated in this session |
| `/skill-factory status` | Show what patterns are currently being tracked |
| `/skill-factory queue` | Show all detected patterns queued for proposal |
| `/skill-factory save <name>` | Immediately name and save the last proposed skill |
| `/skill-factory clear` | Clear the current session tracking log |
章节与文件索引
按说明文件中的顺序排列。
核心原则
第一阶段:沉默观察
追踪什么
不应该追踪什么
第 2 阶段:触发条件
文件/命令 -> /skill-factory propose · ~/.hermes/skills/[category]/[skill-name]/SKILL.md · ~/.hermes/plugins/[skill-name].py · ✅ Skill '[skill-name]' written to ~/.hermes/skills/[category]/[skill-name]/ · Run 'hermes skills reload' to activate, or restart Hermes. · I detected [N] other patterns this session. Want me to propose the next one? · Want to review or edit the generated files before activating? · git-pr-workflow
内容校验值 -> 20a2e1fa0b7a
当前原文的自动摘译,尚未人工审校。
核心原则
“你重复的每一个工作流程都是一项等待诞生的技能。”技能工厂将生活经验转化为可重复使用的程序记忆。它永远不会中断。它注视着。它建议。它生成。
追踪什么
重复操作:多次使用的任何命令、序列或方法 多步骤工作流程:完成一致目标的 3 个以上步骤的序列 工具组合:以一致模式一起使用两个或多个工具 领域模式:用户如何处理特定于其领域的问题 修复和解决方法:重复出现的调试模式或解决方案
不应该追踪什么
没有明确重用潜力的一次性任务 琐碎的单步操作(例如,“读取文件”) 现有 Hermes 技能已处理的工作流程 高度特定于上下文的任务,无法概括