Generate properly-formatted SKILL.md files from extracted architectural patterns. Turns raw pattern descriptions into reusable skills that OpenSpace can discove
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-skill-template-generator-ba6a0343ebd8 ,按照其中的说明把「skill-template-generator」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
Given a structured pattern description (from codebase-pattern-analyzer or manual analysis), generate a valid SKILL.md file that OpenSpace can register, select for tasks, and evolve over time.
Every skill is a directory containing at minimum a SKILL.md file:
my-skill-name/
├── SKILL.md # Required — the skill definition
├── scripts/ # Optional — helper scripts
├── references/ # Optional — reference data files
└── assets/ # Optional — images, templates
The file MUST start with YAML frontmatter containing exactly two fields:
---
name: my-skill-name
description: One-sentence description of what this skill teaches. Must be specific enough for LLM skill selection to match it to relevant tasks.
---
Rules:
name must match the directory name (kebab-case, lowercase)description should be 15-40 words, include key terms an LLM would search forThe markdown body follows this template:
# [Skill Title]
[1-2 sentence summary of what this skill enables]
## When to Use
- [Trigger condition 1]
- [Trigger condition 2]
- [Trigger condition 3]
## [Core Content Sections]
[Step-by-step instructions, code templates, API references, etc.]
## Key Patterns
1. [Convention or best practice 1]
2. [Convention or best practice 2]
...
Match the pattern to one of three OpenSpace categories:
| Category | Use When | Example |
|---|---|---|
tool_guide | The skill teaches how to use a specific tool or technique | "How to analyze a codebase", "How to use Finnhub API" |
workflow | The skill prescribes an end-to-end procedure with ordered steps | "Create a panel component", "Set up API proxy endpoint" |
reference | The skill provides knowledge that informs decisions | "WorldMonitor architecture index", "News API comparison" |
The category affects how OpenSpace judges the skill during execution analysis:
The description field is the most critical line — it determines whether OpenSpace selects this skill for a given task.
Good descriptions (specific, searchable):
Bad descriptions (vague, generic):
Formula: [Action verb] + [specific subject] + [key technology/approach] + [context/project reference]
The body must be concrete enough that an AI agent can follow it without guessing.
Include:
src/components/MyPanel.ts)Use {baseDir} for paths relative to the skill directory:
Read the reference file at {baseDir}/references/example.json
Include:
Include:
If the skill depends on patterns from other skills, mention them explicitly:
## Prerequisites
This skill builds on:
- `panel-component` — for the Panel base class
- `data-service` — for the circuit breaker pattern
- `api-proxy-endpoint` — for server-side API key isolation
This helps OpenSpace understand skill composition when DERIVING new skills.
Before saving, verify:
name: foo-bar lives in foo-bar/SKILL.mdInput (from codebase-pattern-analyzer):
Pattern: Circuit Breaker Data Service
Source: worldmonitor/src/services/*.ts
Category: service
Structure: Module-level CircuitBreaker instance, async fetch functions, typed interfaces
Key code: createCircuitBreaker({ name, cacheTtlMs }), breaker.execute(fn, default)
Output (data-service/SKILL.md):
---
name: data-service
description: Create data fetching services with circuit breaker pattern for API resilience. Services handle fetch, cache, retry, and expose typed data to panel components.
---
# Data Service Pattern
Each panel's data comes from a dedicated service module in `src/services/`. ...
## Circuit Breaker
[Full implementation code]
## Service Module Pattern
[Template with typed interfaces, breaker usage, export functions]
## Key Patterns
1. One circuit breaker per API endpoint
2. Export typed interfaces for data shapes
3. Wrap fetch calls in breaker.execute(fn, defaultValue)
...
Skills generated by this workflow are designed to evolve:
The better the initial skill quality, the better the evolved descendants.