Skill: zhelunsun/skillfactory (version 2.4.0)

--- name: skill-factory version: "2.4.0" description: > Turn any idea into a polished, versioned, publishable OpenClaw skill — no scaffolding, no guesswork. Just say "新 skill" or "build a skill" and Skill Factory handles the rest: captures the spec, collects sources, distills knowledge, and packages it into a GitHub-ready repo. Also supports upgrading existing skills with "升级 skill" or "upgrade skill". Built for makers who want quality without reinventing the process. Triggers: "新 skill", "做一个skill", "build a skill", "create skill", "skill制作", "把这个做成skill", "帮我把...打包成skill", "skill升级", "skill发行", "skill factory", "制造skill", "skill工厂", "skill from scratch", "我有个skill想法", "skill迭代", "skill打磨", "做一个关于...的skill", "skill版本管理", "skill如何发行", "skill如何升级", "skill生产", "skill自动化", "更新skill", "升级skill", "维护skill", "升级已有skill", "upgrade skill", "update skill", "维护现有skill", "skill版本升级", "skill生命周期". --- # Skill Factory — The Meta-Skill for Making Skills > "The first industrial revolution was marked by using machines to make machines. > Skill Factory is the machine that makes skills." ## Purpose Skill Factory provides a **repeatable, human-AI collaborative SOP** for going from a raw idea to a polished, publishable OpenClaw skill. It handles: - **0→1**: Rapid capture of fuzzy ideas → structured BRIEF → distilled skill - **1→N**: Iterating an existing skill with new sources or structural improvements - **N→∞**: Publishing, versioning, ClawHub distribution, and ongoing maintenance The key insight: **this is not about capability, it's about workflow.** Any Claw instance with this skill loaded can build production-quality skills — the process is the product. --- ## How to Trigger This Skill Just say something like: > `New skill: [name], [1-2 sentences], [source URL (optional)]` > `Upgrade skill: [skill name/path], [change request], [new source URL (optional)]` ### New skill examples: - `New skill: prompt-engineering, best practices from Anthropic and OpenAI` - `New skill: git-workflow, standardize my branching and PR flow, https://...` - `新 skill：简历筛选，用关键词匹配和语义分析筛选简历` ### Upgrade skill examples: - `Upgrade skill: nova-reader, add Semantic Scholar data source` - `Upgrade skill: harness, strengthen governance rules from Phase 3.5 lessons` - `升级 skill：skill-factory，增加显式升级模式` Claw will enter **Phase 0** for new skills or the **Upgrade Workflow** for existing skills — no more information needed to start. **中文用户**: `新 skill：[名字]，[1-2句说明]，[来源URL（可选）]` for new; `升级 skill：[skill名字/路径]，[变更要求]，[新来源URL（可选）]` for upgrades. --- ## Four-Phase SOP ### Phase 0 · Capture（≤5 min） **Goal**: Lock down the spec before any work begins. 1. Save raw idea to `inbox/<skill-name>.md` (防止遗失) 2. Ask exactly **3 questions** — no more: - What is the target scenario / user? - Are there reference sources? (If not, Claw will search) - Publish scope: local-only / GitHub / ClawHub distribution? 3. Generate `wip/<skill-name>/BRIEF.md` **Key principle**: Phase 0 prevents over-engineering (LRN-003). Don't start building until the 3 questions are answered. --- ### Phase 1 · Collect（automated） **Goal**: Gather raw material without processing. 1. `web_fetch` each source → save to `wip/<skill-name>/raw/` 2. If no sources provided, `web_search` for 2–3 high-quality references 3. Prioritize: official docs > primary blog posts > secondary analysis **Rule**: At least 1 first-party source (official docs / original author's post). Raw content is saved as-is — no processing yet. --- ### Phase 2 · Distill（core work） **Goal**: Extract signal, discard noise. 1. Read all `raw/` files 2. Write per skill-creator spec: - `SKILL.md` — triggers + workflow (≤200 lines) - `references/` — detailed knowledge, split by topic - `scripts/` — reusable code, only if needed 3. **Mandatory verification** (LRN-001): Re-fetch original source, diff against draft, check for gaps **Quality checklist**: - [ ] Trigger words are broad enough to cover all user phrasings - [ ] SKILL.md has a clear "when to use" section - [ ] Detail lives in `references/`, not bloating `SKILL.md` - [ ] At least one mandatory re-read of primary source after distillation --- ### Phase 3 · Publish **Goal**: Clean, versioned, standalone repo ready for GitHub/ClawHub. #### Repo Structure (Minimal) ``` <skill-name>/ ├── SKILL.md # Entry point (triggers + workflow) ├── README.md # Human-facing intro — bilingual (EN + ZH) ├── CHANGELOG.md # Version history ├── LICENSE # MIT recommended ├── .gitignore └── references/ # Knowledge base └── *.md ``` For script-heavy skills, add: ``` └── scripts/ └── *.py ``` #### README Spec A skill README must answer 3 questions in ≤60 seconds of reading: 1. **What problem does it solve?** (1-2 sentences, no jargon) 2. **What makes it better than asking without it?** (key differentiator) 3. **How do I use it?** (one concrete example) **Bilingual (EN + ZH)**: Use two separate files for maximum clarity. ``` README.md # English only — no Chinese text anywhere README_zh.md # Chinese only — full detail, selling points, usage ``` Each file includes a badge linking to the other version. This allows GitHub to render clean language-specific views and enables future ClawHub to surface the right version per locale. #### ClawHub Distribution When the user wants to publish to ClawHub: 1. Ensure `SKILL.md` frontmatter has: `name`, `version`, `description` 2. `description` must contain broad trigger phrases covering multiple phrasings 3. `LICENSE` file present (MIT recommended) 4. Tag the release: `git tag v1.0.0 && git push --tags` #### ClawHub CLI Publishing (实操工作流) When the skill is already published and needs a version update on ClawHub, use the `clawhub` CLI: **Prerequisites:** - Node.js environment with clawhub package installed: ``` npm install clawhub ``` - ClawHub account with device flow login (headless-friendly): ``` clawhub login --device # Visit the provided URL, enter the code, authorize in browser # Note: login process must stay running in background while user authorizes ``` **Publish update workflow:** ```bash # 1. Push latest commit to GitHub first git push origin main # 2. Tag the release git tag v<new-version> git push --tags # 3. Publish to ClawHub clawhub skill publish <repo-path> --slug <slug> --version <new-version> --changelog "<summary>" # 4. Verify clawhub inspect <slug> # 5. Sync to local workspace Copy-Item -Recurse -Force "D:\Agent\WorkBuddy\skills\<skill-name>\*" "$env:USERPROFILE\.workbuddy\skills\<skill-name>\" ``` **Protocol: GitHub first, ClawHub second.** Always push to GitHub before publishing to ClawHub. This ensures the source code is available for moderation review and users can link back to the repo. **Windows + Proxy note:** Use HTTPS remote (not SSH) on Windows environments with proxy/VPN. SSH port 22 may be intercepted by proxy tools (Clash/V2Ray). Configure: ``` git remote set-url origin https://github.com/<owner>/<repo>.git ``` **Limitation:** ClawHub Summary is derived from SKILL.md frontmatter `description` field. To update the summary, edit `description` in SKILL.md and republish. #### Auto-Sync Automation (Optional) A local workbuddy automation can periodically check and sync all skills: ```yaml # One-time manual: for each repo, push + publish + sync # Or set a weekly cron via workbuddy automation ``` See `automation` system in WorkBuddy for setting up recurring sync tasks. #### Sync to Local Workspace After publishing, sync to `~/.workbuddy/skills/<skill-name>/` so Claw can use it immediately: ```powershell Copy-Item -Recurse -Force "D:\Agent\WorkBuddy\skills\<skill-name>\*" "$env:USERPROFILE\.workbuddy\skills\<skill-name>\" ``` --- ## Upgrade Workflow (1→N Maintenance) **Goal**: Update an existing skill without starting from scratch. This is a **first-class workflow**, distinct from creating a new skill. When the user invokes `Upgrade skill:`, follow these steps: ### Step 1 · Inspect (read existing state) 1. Read the existing skill repo: - `SKILL.md` — current version, triggers, workflow - `CHANGELOG.md` — version history (especially recent entries) - `README.md` — public description - `references/` — existing knowledge base - Git log — recent changes and commit history 2. Identify the current version (from `SKILL.md` frontmatter or git tag) ### Step 2 · Classify the change Compare the requested change against the skill's **public API** — its documented behavior: | Public API element | Examples | |-------------------|----------| | Use cases | What scenarios the skill serves | | Input format | What the user says to trigger the skill | | Output format | What files/code the skill produces | | Workflow phases | The SOP structure | | Safety boundaries | What the agent must not do | | File structure | Repo layout conventions | | Publishing behavior | How the skill is distributed | Determine the version bump: | Bump | When | Examples | |------|------|----------| | **PATCH** `x.x.1` | Fixes that don't change behavior | Typo fix, clarification, trigger word tweak | | **MINOR** `x.1.0` | Backward-compatible additions | New workflow mode, new reference source, optional publishing path | | **MAJOR** `x.0.0` | Breaking changes | Changed triggering format, restructured SOP, removed phase, changed safety assumptions | ### Step 3 · Propose (generate upgrade plan) Before making any changes, produce an upgrade plan: ```markdown ## Upgrade Plan Current version: <version from SKILL.md> Proposed version: <computed bump> Change type: PATCH / MINOR / MAJOR Reason: <why this change belongs in this category> Files to modify: <list of files that need changes> Risk level: low / medium / high Backward compatibility: yes / no Proposed changelog entry: ### Added - <new features> ### Changed - <behavior changes> ### Fixed - <bug fixes> Suggested commit message: <semantic commit message> Suggested tag: v<new version> ``` Present this plan to the user. Do not apply changes until the user confirms. ### Step 4 · Apply After user confirmation: 1. Update files (SKILL.md, README, CHANGELOG, references) 2. Bump version in SKILL.md frontmatter and README badges 3. Update `CHANGELOG.md` with proper format (see below) 4. Commit with semantic message 5. Tag the release: `git tag v<new-version> && git push --tags` 6. Re-sync to local workspace ### Step 5 · Upgrade Summary After applying, produce a summary: ``` ## Upgrade Complete <old version> → <new version> Files changed: <list> Changelog: <link or excerpt> Next steps: <optional> ``` --- ## Version Management Version semantics follow **Semantic Versioning** adapted for skills: ``` MAJOR.MINOR.PATCH ``` | Version bump | When | Example trigger | |---|---|---| | **PATCH** `x.x.1` | Typo fix, trigger word tweak, minor clarification | "修复了一个例子描述不准" | | **MINOR** `x.1.0` | New reference source, new phase step, extended trigger coverage | "加入 Anthropic 最新文档" | | **MAJOR** `2.0.0` | Scope change, structural refactor, paradigm shift | "从单文档改为多 reference 结构" | ### What warrants a MAJOR bump? A MAJOR version (e.g. 1.x → 2.0) signals a **breaking change in the skill's mental model**: - The core SOP phases are restructured - The skill's scope is fundamentally redefined - Files are reorganized in ways that break the previous structure - The activation paradigm changes (e.g. from "ask anything" to "four-phase SOP") **MAJOR ≠ more content**. A skill that doubles its references but keeps the same structure is still a MINOR bump. ### What warrants a MINOR bump? A MINOR version (e.g. 1.0 → 1.1 → 1.2) signals **additive improvements** that don't break the existing pattern: - New knowledge source added to `references/` - New trigger words added to frontmatter - New section added to SOP without restructuring existing phases - README improvements, badge updates ### Commit message convention ``` feat: add [source] to references → MINOR fix: correct [description] → PATCH refactor: restructure [component] → could be MAJOR release: v2.0.0 - [summary] → tag release commits ``` ### Changelog discipline Format: [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) Every release must update `CHANGELOG.md` with: - `[Unreleased]` section at the top (collects next-version changes) - Version section for each release: `[X.Y.Z] — YYYY-MM-DD` - Grouped changes under: **Added**, **Changed**, **Fixed**, **Deprecated**, **Removed**, **Security** - User-readable summaries, not raw git diffs - A single-line **Summary** at the top of each version The `[Unreleased]` section captures changes that will go into the next release. Before cutting a new version, review `[Unreleased]`, classify entries, and move them into the version section. **Distinction**: git history = developer log; CHANGELOG = user-facing narrative. Do not substitute one for the other. --- ## Skill Iteration (Legacy — use Upgrade Workflow above) The legacy iteration path is preserved for quick edits. For structured upgrades, use the **Upgrade Workflow** (produces planned changes and version bump). When doing a quick upgrade: 1. Create a new branch or directly update `D:/Agent/WorkBuddy/skills/<skill-name>/` 2. Add new source to `references/` with dated filename (`source-YYYYMMDD.md`) 3. Update `SKILL.md` version field and trigger words if needed 4. Update `CHANGELOG.md` 5. Bump version (MAJOR / MINOR / PATCH per rules above) 6. Commit with semantic message 7. Re-sync to local workspace **Upgrade triggers**: User sends new URL, user says "skill has a gap", Claw detects missing knowledge during a task execution. --- ## Workspace Layout ``` D:/WorkBuddy/ └── .workspace-index.md # Master skill status board D:/Agent/WorkBuddy/skills/ ├── skill-factory/ # This meta-skill repo │ ├── SKILL.md # This file │ ├── README.md │ ├── CHANGELOG.md │ ├── LICENSE │ ├── .gitignore │ ├── CLAWHUB.md │ ├── inbox/ # Raw ideas drop zone │ └── wip/ # Active work-in-progress │ └── <skill-name>/ │ ├── BRIEF.md │ ├── raw/ │ └── draft/ │ ├── harness/ # ✅ v1.2.0 — ready for GitHub ├── nova-reader/ # ✅ v1.1.0 — ready for GitHub └── <future-skills>/ ``` --- ## Lessons Learned (from .learnings) | ID | Lesson | Fix in SOP | |----|--------|-----------| | LRN-001 | Missed content after distillation without re-reading source | Phase 2 mandatory re-fetch | | LRN-002 | Skill evolved in workspace, hard to publish as standalone | Phase 3 independent repo | | LRN-003 | Over-engineered before confirming real need | Phase 0 three-question lock | | LRN-004 | Research notes mixed with skill docs | `raw/` vs `references/` separation | | LRN-005 | ClawHub login needs background process to wait for user auth | Device Flow requires staying alive | | LRN-006 | Git push blocked by proxy/VPN (SSH 22) on Windows | Use HTTPS + PAT, configure remote | | LRN-007 | Requirement creep during simple tasks | Core first, periphery later |

path: CHANGELOG.md
content: # Changelog — skill-factory

All notable changes to skill-factory will be documented in this file.

Format: [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)

---

## [Unreleased]

No unreleased changes yet.

---

## [2.4.0] — 2026-05-13

### Summary

**End-to-end ClawHub CLI publishing workflow.** Phase 3 now includes a full, battle-tested SOP for publishing skill updates to ClawHub via CLI — covering login, publish, verify, and local sync. Lessons from earlier failures (proxy issues, requirement creep, device flow) are captured.

### Added
- Phase 3 → ClawHub CLI Publishing: device flow login, publish command, verify, local sync steps
- Phase 3 → Windows proxy notes: HTTPS vs SSH guidance
- Lessons Learned table: LRN-005 (ClawHub device flow background), LRN-006 (SSH/proxy), LRN-007 (requirement creep)

### Changed
- SKILL.md version bumped from v2.3.0 to v2.4.0
- README.md / README_zh.md version badges updated to v2.4.0

### Fixed
- CLAWHUB.md version updated from v2.1.0 to v2.3.0 (was out of sync)
- SKILL.md Workspace Layout: corrected `D:/WorkBuddy/` → `D:/Agent/WorkBuddy/skills/` for skill repo paths
- SKILL.md Legacy section: `D:/WorkBuddy/<skill-name>/` → `D:/Agent/WorkBuddy/skills/<skill-name>/`
- README_zh.md: OpenAI URL changed from Chinese-localized to canonical English URL
- README.md / README_zh.md: manual install path from `~/.claw/skills/` → `~/.workbuddy/skills/`
- .workspace-index.md: directory structure comment updated from v2.2.0 to v2.3.0

## [2.3.0] — 2026-05-12

### Summary

**First-class upgrade workflow for existing skills.** Skill Factory now explicitly supports 1→N maintenance alongside 0→1 creation.

### Added
- `Upgrade skill:` as a first-class entry point alongside `New skill:`
- Upgrade Workflow section in SKILL.md: Inspect → Classify → Propose → Apply → Summary
- Version bump decision framework: skill's "public API" defined (use cases, input/output, workflow phases, safety boundaries, file structure)
- Upgrade plan template: current version, proposed version, change type, files to modify, risk level, changelog entry, commit message, tag
- Enhanced trigger words covering upgrade and maintenance scenarios

### Changed
- SKILL.md: `[Unreleased]` section added to CHANGELOG guidance per Keep a Changelog standard
- CHANGELOG discipline: now requires grouped changes (Added / Changed / Fixed / Deprecated / Removed / Security) and user-readable summaries
- README.md: added "Maintaining Existing Skills (1→N)" section
- README_zh.md: updated quick start with skill upgrade example
- Legacy "Skill Iteration" section renamed to "Skill Iteration (Legacy)" with redirect to Upgrade Workflow

### Fixed
- Workspace layout path in SKILL.md now consistent with actual directory structure

---

## [2.2.2] — 2026-04-27

### Summary

**Version sync: local repo aligned with ClawHub v2.2.2 release.**

### Changed
- `SKILL.md`: version field updated to `2.2.2`
- `README.md` / `README_zh.md`: version badges updated to `2.2.2`

### Notes
- ClawHub listing had advanced to v2.2.2; this commit brings the GitHub repo in sync
- Submitted false-positive appeal to openclaw/clawhub for suspicious flag on this skill

---

## [2.2.1] — 2026-04-21

### Summary

**ClawHub distribution ready + clean publish structure.**

### Added
- `README.md`: ClawHub installation instructions (`claw skill install skillfactory`)
- `README_zh.md`: 中文安装说明
- `README.md` & `README_zh.md`: Tags section for discoverability
- `CLAWHUB.md`: Dedicated ClawHub listing page with one-line pitch
- `PUBLISH.md`: Release command reference for future updates

### Changed
- Slug finalized: `skillfactory` (GitHub: PandaBro666/skillfactory)
- `.gitignore` updated: excludes `inbox/`, `wip/`, `promo/` from public repo

### Notes
- Minimum ClawHub requirement: `SKILL.md` only
- Recommended: `SKILL.md` + `README.md` + `LICENSE` for professional presentation
- Clean publish workflow: copy core files to separate directory to avoid uploading WIP content

---

## [2.2.0] — 2026-04-20

### Summary

**Bilingual README split + clean publish structure.**

### Added
- `README_zh.md` — dedicated Chinese README with bilingual badge linking between versions
- `.gitignore` — excludes `inbox/` and `wip/` from public repo (personal work area)

### Changed
- `README.md` (English): completely purged of Chinese text; "Skills Built With This Factory" section replaced with a concrete end-to-end example using the `harness` skill
- `README.md` now includes badge linking to `README_zh.md`
- `README_zh.md` likewise links back to English version via badge

### Fixed
- SKILL.md Phase 3 bilingual spec updated: README is now two separate files, not two sections in one

---

## [2.1.0] — 2026-04-20

### Summary

**GitHub release ready.** Full bilingual README, version management SOP, and LICENSE added.

### Added
- `LICENSE` (MIT) — required for ClawHub distribution
- Semantic versioning guide in `SKILL.md`: MAJOR / MINOR / PATCH semantics with decision criteria
- Commit message convention (`feat:` / `fix:` / `refactor:` / `release:`)
- Changelog discipline rules (every release must update CHANGELOG)

### Changed
- `README.md` rewritten as bilingual (EN + ZH), "industrial revolution" analogy as lead hook
- `SKILL.md` v2.1: extended version management section, bilingual README spec in Phase 3
- Trigger words expanded: added `skill版本管理`, `skill如何发行`, `skill生产`, `skill自动化`

---

## [2.0.0] — 2026-04-20

### Summary

**From SOP document to meta-skill.**

Skill Factory is now itself a publishable WorkBuddy skill. v2.0 restructures the project so it can be distributed via GitHub/ClawHub and loaded by any Claw instance, just like any other skill.

### Changed
- `SKILL.md` completely rewritten as a proper skill entry point with YAML frontmatter, trigger words, and self-contained SOP
- Added Phase 3 publishing specs: README format, ClawHub distribution checklist, version semantics
- Added skill iteration workflow (1→N upgrades)
- `README.md` rewritten as human-facing project page with selling points

### Added
- `CHANGELOG.md` (this file)
- ClawHub distribution spec in Phase 3
- Skill upgrade triggers and process
- Workspace layout reference

---

## [1.0.0] — 2026-04-18

### Summary

**Initial creation.**

Built during the harness skill development cycle as a response to 4 accumulated learnings (LRN-001 through LRN-004). Established the four-phase SOP and workspace directory structure.

### Added
- `SKILL-SOP.md` — four-phase workflow (Phase 0-3)
- `inbox/` directory — idea drop zone
- `wip/` directory — active skill workspace
- `D:/WorkBuddy/.workspace-index.md` — master skill status board
- 4 lessons from harness creation embedded into SOP


path: CLAWHUB.md
content: # Skill Factory — ClawHub Listing

**Slug:** `skillfactory`  
**Display Name:** Skill Factory  
**Version:** 2.3.0  
**License:** MIT  
**Author:** PandaBro666

---

## One-Line Pitch

The machine that builds skills — because making a skill from scratch shouldn't feel like reinventing the wheel every time.

---

## What It Does

Skill Factory is your skill-making buddy. You bring an idea (or a URL), it handles the rest:

- **Lock the scope** — 3 quick questions to make sure you're building the right thing
- **Gather the goods** — fetches source material automatically
- **Distill the signal** — turns noise into structured SKILL.md + references
- **Ship it** — packages everything into a versioned, GitHub-ready repo
- **Keep it fresh** — structured upgrade workflow so your skills don't rot at v1.0

No boilerplate templates. No "what now?" moments. Just say the word and it works.

---

## When to Use

- You have a skill idea but don't know how to start
- You want to turn scattered notes or bookmarks into a proper skill
- You need to bring an existing skill up to date with new sources
- You're preparing something for GitHub or ClawHub
- You have a skill sitting at v1.0 and want to grow it without messing up

---

## Quick Start

Just tell your Claw:

```
New skill: [name], [1-2 sentences], [source URL (optional)]
```

Example:
```
New skill: prompt-engineering, best practices from Anthropic and OpenAI
```

Or to upgrade an existing one:
```
Upgrade skill: [name], [what to add], [new source URL (optional)]
```

---

## Tags

`meta-skill` `skill-authoring` `openclaw` `agent-engineering` `workflow-automation` `knowledge-distillation`

---

## Links

- **Repository:** https://github.com/zhelunSun/skill-factory
- **English README:** [README.md](README.md)
- **中文说明:** [README_zh.md](README_zh.md)
- **Changelog:** [CHANGELOG.md](CHANGELOG.md)


path: LICENSE
content: MIT License

Copyright (c) 2026 PandaBro666

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


path: README.md
content: # Skill Factory

> **"The first industrial revolution ended when machines began building machines."**
> **Skill Factory is the machine that builds skills.**

A **meta-skill** for OpenClaw that automates the full lifecycle of skill creation — from a fuzzy idea to a polished, versioned, distributable package.

[![Version](https://img.shields.io/badge/version-2.4.0-blue.svg)](CHANGELOG.md)
[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
[![中文说明](https://img.shields.io/badge/README-中文版-orange.svg)](README_zh.md)

---

## What Problem Does It Solve?

Creating an OpenClaw skill without a workflow leads to: fuzzy specs, missed knowledge during distillation, scattered files impossible to publish, and skills that stagnate at v1.0 with no clear upgrade path.

**Skill Factory solves all of this** by treating skill creation as a repeatable, improvable process — not a one-off creative act.

## What Makes It Different?

Most skill-making is ad hoc. Skill Factory is an **end-to-end automated SOP** that any Claw instance can follow:

**Foundation** — lock scope before work begins:
- **Phase 0 three-question lock** — prevents scope creep and over-engineering

**Quality** — ensure nothing is missed:
- **Mandatory source re-verification** — catches missed content after distillation

**Structure** — ship-ready from day one:
- **Independent repo per skill** — every skill is GitHub/ClawHub-ready from day one
- **Semantic versioning for skills** — clear rules for MAJOR vs MINOR vs PATCH

**Evolution** — not just 0→1, but 1→N:
- **Human-AI collaborative iteration** — ongoing improvement with versioned upgrades

It is not about what Claw *can* do — it is about turning an unbounded capability into a **reliable, high-quality pipeline**. The process is the product.

---

## Quick Start

Just send Claw an idea:

```
New skill: [name], [1-2 sentences], [source URL (optional)]
```

Claw enters **Phase 0** immediately — no setup required.

---

## Example: Building the `harness` Skill

Here is how Skill Factory handled a real request end-to-end:

**Input** (30 seconds):
```
New skill: harness, distill OpenAI's agent engineering article,
https://openai.com/index/harness-engineering/
```

**Phase 0** — Three questions answered in one message:
- Target: any Claw working on agent-first engineering
- Source: OpenAI Harness Engineering blog post
- Scope: GitHub + local workspace

**Phase 1** — `web_fetch` the source, saved to `wip/harness/raw/`

**Phase 2** — Distilled into `SKILL.md` (10 principles) + `references/` (two documents). Mandatory re-read caught 4 missed concepts including the "Ralph Wiggum loop".

**Phase 3** — Independent repo, MIT license, bilingual README, git-tagged `v1.2.0`, synced to workspace.

**Total time**: ~10 minutes. Without the factory, the same work took a full day of iteration and still had gaps.

---

## Four-Phase SOP Overview

| Phase | Name | Output |
|-------|------|--------|
| 0 | Capture | `BRIEF.md` — locked spec |
| 1 | Collect | `raw/` — raw source material |
| 2 | Distill | `SKILL.md` + `references/` |
| 3 | Publish | versioned repo, synced to workspace |

Full SOP details are in [SKILL.md](SKILL.md).

---

## Version Management

Skills use **Semantic Versioning** adapted for this format:

| Bump | When |
|------|------|
| `PATCH` (x.x.1) | Typo fix, trigger word tweak |
| `MINOR` (x.1.0) | New source, new section, extended triggers |
| `MAJOR` (2.0.0) | Paradigm shift, structural refactor |

**MAJOR does not mean more content** — a skill that doubles its references but keeps the same structure is still MINOR.

---

## Maintaining Existing Skills (1→N)

Skill Factory is not only a 0→1 generator. It also supports **structured upgrades** to existing skills:

```
Upgrade skill: [skill name/path], [change request], [new source URL (optional)]
```

The upgrade workflow:
1. **Inspect** — reads the existing repo state
2. **Classify** — determines a PATCH/MINOR/MAJOR bump
3. **Propose** — generates an upgrade plan before making changes
4. **Apply** — updates files, CHANGELOG, version
5. **Summary** — reports what changed

This ensures v2, v3, and v4 are as disciplined as v1. Git versioning, semantic versioning, CHANGELOG discipline, and the upgrade plan work together to prevent skill degradation over time.

---

## Repo Structure

```
skill-factory/
├── SKILL.md         # Full SOP — four phases, version management, publishing spec
├── README.md        # This file (English)
├── README_zh.md     # Chinese version
├── CHANGELOG.md     # Version history
├── LICENSE          # MIT
├── inbox/           # Drop zone for raw ideas
└── wip/             # Active work-in-progress
    └── <skill>/
        ├── BRIEF.md
        ├── raw/
        └── draft/
```

---

## Installation

### From ClawHub (Recommended)

```bash
claw skill install skillfactory
```

Or use the full identifier:

```bash
claw skill install github.com/zhelunSun/skill-factory
```

### Manual Installation

1. Clone this repo to your skills directory:
```bash
git clone https://github.com/zhelunSun/skill-factory.git ~/.workbuddy/skills/skillfactory
```

2. Restart your Claw session — the skill will auto-load.

---

## License

MIT — fork it, adapt it, build your own factory.


path: README_zh.md
content: # Skill Factory

> **"第一次工业革命结束的标志，是用机器来制造机器。**
> **Skill Factory，就是那台制造skill的机器。"**

这是一个用于 OpenClaw 的**元技能（meta-skill）**，将 skill 的创作过程——从一句模糊的想法，到打磨完毕、版本清晰、可直接发行的成品——变成一套可重复执行的标准化流程。

[![Version](https://img.shields.io/badge/version-2.4.0-blue.svg)](CHANGELOG.md)
[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
[![English README](https://img.shields.io/badge/README-English-blue.svg)](README.md)

---

## 它解决什么问题？

没有工作流直接上手制作 skill，常见结局：

- 需求没说清楚就开始干，做到一半发现方向不对
- 蒸馏完文章，发现漏了关键内容，还得回头重看
- 文件散落各处，想发布到 GitHub 才发现结构一团糟
- v1.0 做完了，不知道什么时候该升级、如何管理版本

Skill Factory 用**四阶段 SOP** 系统性地解决以上全部问题。

---

## 核心差异化

市面上的 skill 制作多是随兴而为。Skill Factory 的不同之处：

**基础层** — 开工前锁定范围：
- **Phase 0 三问锁定**：三个问题锁死需求，防止过度工程化

**质量层** — 确保知识完整：
- **强制原文二次核对**：蒸馏完必须回到原始来源比对，防止知识遗漏

**结构层** — 发行级从第一天开始：
- **每个 skill 独立 repo**：从第一天起就是发行级结构，随时可 push 到 GitHub
- **语义化版本管理**：清楚区分 MAJOR（范式重构）/ MINOR（增量添加）/ PATCH（修小问题）

**演进层** — 不只是 0→1，更是 1→N：
- **持续迭代机制**：有明确的升级路径和人机协作改进流程

关键在于：**这不是关于 Claw 能做什么，而是关于如何把无边界的能力，变成高质量、可重复的流水线。流程本身就是产品。**

---

## 快速上手

发给 Claw 一个想法即可：

```
新 skill：[名字]，[1-2句描述]，[来源链接（可选）]
```

或升级已有 skill：

```
skill升级：[名字]，[要加什么]，[新来源链接（可选）]
```

Claw 会立刻进入 Phase 0，回答 3 个问题后，流水线自动运转。

---

## 实际案例：制作 `harness` skill

以下是 Skill Factory 处理一次真实需求的完整过程：

**用户输入**（30秒）：
```
新 skill：harness，蒸馏 OpenAI 的智能体工程文章，
https://openai.com/index/harness-engineering/
```

**Phase 0** — 三问一轮解决：
- 目标用户：任何在做智能体工程的 Claw 实例
- 来源：OpenAI Harness Engineering 博客
- 发行形式：GitHub + 本地 workspace 同步

**Phase 1** — `web_fetch` 抓取原文，存入 `wip/harness/raw/`

**Phase 2** — 蒸馏为 `SKILL.md`（10 大原则）+ `references/`（两份文档）。强制二次核对步骤发现了 4 处遗漏，包括"Ralph Wiggum 自我审查循环"。

**Phase 3** — 独立 repo，MIT 协议，双语 README，git 打标签 `v1.2.0`，同步到 workspace。

**耗时**：约 10 分钟。没有这套工厂，同样的工作之前需要一整天迭代，且仍有知识盲区。

---

## 四阶段 SOP 概览

| 阶段 | 名称 | 产出 |
|------|------|------|
| 0 | 快速摄入 | `BRIEF.md`：锁定需求 |
| 1 | 资料收集 | `raw/`：原始资料 |
| 2 | 蒸馏 | `SKILL.md` + `references/` |
| 3 | 封装发行 | 带版本标签的独立 repo |

完整 SOP 见 [SKILL.md](SKILL.md)。

---

## 版本管理逻辑

借用软件工程的语义化版本，专为 skill 定制：

| 版本变动 | 何时触发 |
|----------|---------|
| `PATCH`（x.x.1）| 修错别字、调整触发词描述 |
| `MINOR`（x.1.0）| 新增来源、补充章节、扩展触发词 |
| `MAJOR`（2.0.0）| 核心结构重构、范式转变、激活方式改变 |

**MAJOR 不等于内容更多**——如果翻倍了 references 但结构不变，仍然是 MINOR。

---

## 目录结构

```
skill-factory/
├── SKILL.md         # 完整 SOP 文档（触发词 + 四阶段 + 版本管理 + 发行规范）
├── README.md        # 英文版说明
├── README_zh.md     # 本文件（中文说明）
├── CHANGELOG.md     # 版本历史
├── LICENSE          # MIT 开源协议
├── inbox/           # 想法投递区（随时丢，不会丢）
└── wip/             # 进行中的 skill 工作区
    └── <skill名>/
        ├── BRIEF.md
        ├── raw/
        └── draft/
```

---

## 安装方法

### 通过 ClawHub 安装（推荐）

```bash
claw skill install skillfactory
```

或使用完整标识符：

```bash
claw skill install github.com/zhelunSun/skill-factory
```

### 手动安装

1. 克隆仓库到技能目录：
```bash
git clone https://github.com/zhelunSun/skill-factory.git ~/.workbuddy/skills/skillfactory
```

2. 重启 Claw 会话 —— 技能将自动加载。

---

## 开源协议

MIT — 欢迎 fork、改造，用这个工厂造你自己的工厂。


path: SKILL-SOP.md
content: # Skill 快速创建 SOP

> 这是 Claw 和用户协作制造 skill 的标准操作程序。
> 每次创建新 skill 时，直接按阶段执行。
>
> **版本**：v1.0  
> **维护人**：Claw（AI）  
> **最后更新**：2026-04-18

---

## 工作目录结构

```
D:/WorkBuddy/
├── skill-factory/           # ← 你现在在这里
│   ├── SKILL-SOP.md         # 本文件：标准操作程序
│   ├── inbox/               # 用户丢想法的地方（任何形式：URL/关键词/草稿）
│   └── wip/                 # Work-in-progress：每个 skill 一个子目录
│       └── <skill-name>/
│           ├── BRIEF.md     # 需求简报（Phase 0 产出）
│           ├── raw/         # 收集的原始资料（web_fetch 抓取结果、PDF等）
│           └── draft/       # 蒸馏草稿
│
├── harness/                 # 已完成的 skill repo（独立发行）
├── <skill-name>/            # 其他已完成的 skill repo
│   ├── SKILL.md
│   ├── README.md
│   └── references/
│
└── .workspace-index.md      # 所有 skill 状态总览（Claw 自我管理用）
```

---

## 四阶段工作流

### Phase 0：快速摄入（≤5分钟）

**触发方式**：用户随时丢来想法，格式不限：
- 一句话：`做一个 X 的 skill`
- URL：`https://...`
- 关键词：`X + Y + Z`

**Claw 的工作**：
1. 在 `inbox/` 记录原始想法（防止丢失）
2. **立刻**提出 3 个快速确认问题（不超过 3 个）：
   - 目标用户/场景是什么？
   - 有没有参考资料来源？（如果没有，Claw 自行搜索）
   - 发行形式：仅本地用 / 发布 GitHub / 分享给他人？
3. 生成 `wip/<skill-name>/BRIEF.md`（标准格式，见下）

**BRIEF.md 模板**：
```markdown
# BRIEF: <skill-name>

**状态**: Phase 0 - 需求确认
**创建时间**: YYYY-MM-DD

## 用户原始想法
（原话或摘要）

## 确认结果
- 目标场景：
- 参考来源：
- 发行形式：local / github / distribute
- 特殊要求：

## 初步规划
- 知识核心：
- 预计文件结构：
- 参考优先级：
```

---

### Phase 1：资料收集（自动执行）

**Claw 的工作**：
1. 对每个来源执行 `web_fetch`，结果存入 `wip/<skill-name>/raw/`
2. 如无来源，使用 `web_search` 找 2-3 个高质量来源
3. 记录来源 URL、获取时间、可信度评估

**原则**：
- 宁可多收不漏，Phase 2 再筛
- 必须包含至少 1 个一手来源（官方文档/原文博客）
- 原始内容不做处理，直接保存

---

### Phase 2：蒸馏（核心工作）

**Claw 的工作**：
1. 读取 `raw/` 中所有资料
2. 按 skill-creator 规范提取：
   - **SKILL.md**：触发词 + 核心流程（≤200行）
   - **references/**：详细知识（按主题拆分）
   - **scripts/**（如需）：可复用脚本
3. **原文二次核对**（LRN-001 教训）：蒸馏完成后，再 `web_fetch` 原文对比，检查遗漏

**质量检查清单**：
- [ ] 触发词够宽，覆盖所有可能的用户问法
- [ ] SKILL.md 有清晰的"何时用"说明
- [ ] references/ 包含足够的背景知识
- [ ] 不在 SKILL.md 里塞太多细节（≤200行）
- [ ] 至少做了一次原文二次核对

---

### Phase 3：封装发行

**Claw 的工作**：
1. 在 `D:/WorkBuddy/<skill-name>/` 创建独立 repo
2. 最小化文件结构：
   ```
   <skill-name>/
   ├── SKILL.md
   ├── README.md       # 包含卖点、用法、安装方式
   ├── .gitignore
   └── references/
   ```
3. `git init` + 初始 commit
4. 同步到 `~/.workbuddy/skills/<skill-name>/`（本地立即可用）
5. 更新 `.workspace-index.md` 状态

**发行版本规范**：
- `v1.0.0`：初始可用版本
- `v1.x.0`：新增来源或内容补充
- `v2.0.0`：结构重构或方向调整

---

## 用户传达想法的最快方式

直接说：
> `新 skill：[名字或主题]，[1-2句说明]，[来源URL（可选）]`

示例：
- `新 skill：arxiv-reader，帮我快速读论文，https://arxiv.org/...`
- `新 skill：prompt-engineering，整合 Anthropic 和 OpenAI 的提示词最佳实践`
- `新 skill：git-workflow，规范我的 git commit 和 PR 流程`

Claw 接到后，进入 Phase 0，直接开始，不需要更多信息就能启动。

---

## 当前 Skill 状态总览

详见 `.workspace-index.md`

---

## 已沉淀的经验（来自 .learnings）

| ID | 教训 | 应对方式 |
|----|------|---------|
| LRN-001 | 蒸馏后未原文核对，遗漏关键内容 | Phase 2 强制二次核对步骤 |
| LRN-002 | skill 应在独立 repo 迭代，成熟再同步 | Phase 3 标准流程 |
| LRN-003 | 过度工程化，偏离用户真实需求 | Phase 0 3问确认，先问再建 |
| LRN-004 | research 资料与 skill 文档混在一起 | raw/ 和 references/ 分离 |


Security scan verdicts — ClawScan: suspicious | static analysis: clean | VirusTotal: clean | SkillSpector: suspicious (CRITICAL)