extract by alirezarezvani/claude-skills
npx skills add https://github.com/alirezarezvani/claude-skills --skill extract将重复出现的模式或调试解决方案转化为独立的、可移植的技能,可安装到任何项目中。
/si:extract <模式描述> # 交互式提取
/si:extract <模式> --name docker-m1-fixes # 指定技能名称
/si:extract <模式> --output ./skills/ # 自定义输出目录
/si:extract <模式> --dry-run # 预览而不创建文件
当满足以下任何条件时,一个学习过程就符合技能提取的资格:
| 标准 | 信号 |
|---|---|
| 重复出现 | 在 2 个或更多项目中遇到相同问题 |
| 非显而易见 | 需要实际调试才能发现 |
| 广泛适用 | 不局限于某个特定代码库 |
| 解决方案复杂 | 多步骤修复,容易忘记 |
| 用户标记 | "保存为技能"、"我想重用这个" |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
阅读用户的描述。在自动记忆中搜索相关条目:
MEMORY_DIR="$HOME/.claude/projects/$(pwd | sed 's|/|%2F|g; s|%2F|/|; s|^/||')/memory"
grep -rni "<关键词>" "$MEMORY_DIR/"
如果在自动记忆中找到,则使用这些条目作为源材料。如果没有,则直接使用用户的描述。
询问(最多 2 个问题):
命名规则:
docker-m1-fixes、api-timeout-patterns、pnpm-workspace-setup启动 skill-extractor 代理 以实际生成文件。
代理创建:
<技能名称>/
├── SKILL.md # 主技能文件,包含 frontmatter
├── README.md # 人类可读的概述
└── reference/ # (可选)支持文档
└── examples.md # 具体示例和边界情况
生成的 SKILL.md 必须遵循以下格式:
---
name: "skill-name"
description: "<单行描述>. 使用时机:<触发条件>."
---
# <技能标题>
> 关于此技能解决了什么问题的单行摘要。
## 快速参考
| 问题 | 解决方案 |
|---------|----------|
| {{问题 1}} | {{解决方案 1}} |
| {{问题 2}} | {{解决方案 2}} |
## 问题描述
{{2-3 句话解释出错原因及其非显而易见性。}}
## 解决方案
### 选项 1:{{名称}}(推荐)
{{分步说明,附带代码示例。}}
### 选项 2:{{替代方案}}
{{适用于选项 1 不适用的情况。}}
## 权衡
| 方法 | 优点 | 缺点 |
|----------|------|------|
| 选项 1 | {{优点}} | {{缺点}} |
| 选项 2 | {{优点}} | {{缺点}} |
## 边界情况
- {{边界情况 1 及其处理方法}}
- {{边界情况 2 及其处理方法}}
在最终确定之前,验证:
name 和 descriptionname 与文件夹名称匹配(小写,连字符)✅ 技能已提取:{{技能名称}}
创建的文件:
{{路径}}/SKILL.md ({{行数}} 行)
{{路径}}/README.md ({{行数}} 行)
{{路径}}/reference/examples.md ({{行数}} 行)
安装:/plugin install (复制到你的技能目录)
发布:clawhub publish {{路径}}
来源:MEMORY.md 条目,行号 {{n, m, ...}}(保留 — 技能是可移植的,记忆是项目特定的)
/si:extract "修复在 Apple Silicon 上因平台不匹配导致 Docker 构建失败的问题"
创建 docker-m1-fixes/SKILL.md,包含:
/si:extract "修改 OpenAPI 规范后始终重新生成 TypeScript API 客户端"
创建 api-client-regen/SKILL.md,包含:
每周安装量
77
代码仓库
GitHub 星标
4.1K
首次出现
7 天前
安全审计
安装于
codex72
kimi-cli71
gemini-cli71
amp71
cline71
cursor71
Transforms a recurring pattern or debugging solution into a standalone, portable skill that can be installed in any project.
/si:extract <pattern description> # Interactive extraction
/si:extract <pattern> --name docker-m1-fixes # Specify skill name
/si:extract <pattern> --output ./skills/ # Custom output directory
/si:extract <pattern> --dry-run # Preview without creating files
A learning qualifies for skill extraction when ANY of these are true:
| Criterion | Signal |
|---|---|
| Recurring | Same issue across 2+ projects |
| Non-obvious | Required real debugging to discover |
| Broadly applicable | Not tied to one specific codebase |
| Complex solution | Multi-step fix that's easy to forget |
| User-flagged | "Save this as a skill", "I want to reuse this" |
Read the user's description. Search auto-memory for related entries:
MEMORY_DIR="$HOME/.claude/projects/$(pwd | sed 's|/|%2F|g; s|%2F|/|; s|^/||')/memory"
grep -rni "<keywords>" "$MEMORY_DIR/"
If found in auto-memory, use those entries as source material. If not, use the user's description directly.
Ask (max 2 questions):
Rules for naming:
docker-m1-fixes, api-timeout-patterns, pnpm-workspace-setupSpawn theskill-extractor agent for the actual file generation.
The agent creates:
<skill-name>/
├── SKILL.md # Main skill file with frontmatter
├── README.md # Human-readable overview
└── reference/ # (optional) Supporting documentation
└── examples.md # Concrete examples and edge cases
The generated SKILL.md must follow this format:
---
name: "skill-name"
description: "<one-line description>. Use when: <trigger conditions>."
---
# <Skill Title>
> One-line summary of what this skill solves.
## Quick Reference
| Problem | Solution |
|---------|----------|
| {{problem 1}} | {{solution 1}} |
| {{problem 2}} | {{solution 2}} |
## The Problem
{{2-3 sentences explaining what goes wrong and why it's non-obvious.}}
## Solutions
### Option 1: {{Name}} (Recommended)
{{Step-by-step with code examples.}}
### Option 2: {{Alternative}}
{{For when Option 1 doesn't apply.}}
## Trade-offs
| Approach | Pros | Cons |
|----------|------|------|
| Option 1 | {{pros}} | {{cons}} |
| Option 2 | {{pros}} | {{cons}} |
## Edge Cases
- {{edge case 1 and how to handle it}}
- {{edge case 2 and how to handle it}}
Before finalizing, verify:
name and descriptionname matches the folder name (lowercase, hyphens)✅ Skill extracted: {{skill-name}}
Files created:
{{path}}/SKILL.md ({{lines}} lines)
{{path}}/README.md ({{lines}} lines)
{{path}}/reference/examples.md ({{lines}} lines)
Install: /plugin install (copy to your skills directory)
Publish: clawhub publish {{path}}
Source: MEMORY.md entries at lines {{n, m, ...}} (retained — the skill is portable, the memory is project-specific)
/si:extract "Fix for Docker builds failing on Apple Silicon with platform mismatch"
Creates docker-m1-fixes/SKILL.md with:
/si:extract "Always regenerate TypeScript API client after modifying OpenAPI spec"
Creates api-client-regen/SKILL.md with:
Weekly Installs
77
Repository
GitHub Stars
4.1K
First Seen
7 days ago
Security Audits
Gen Agent Trust HubWarnSocketPassSnykPass
Installed on
codex72
kimi-cli71
gemini-cli71
amp71
cline71
cursor71
agent-browser 浏览器自动化工具 - Vercel Labs 命令行网页操作与测试
140,500 周安装
竞争对手研究指南:SEO、内容、反向链接与定价分析工具
231 周安装
Azure 工作负载自动升级评估工具 - 支持 Functions、App Service 计划与 SKU 迁移
231 周安装
Kaizen持续改进方法论:软件开发中的渐进式优化与防错设计实践指南
231 周安装
软件UI/UX设计指南:以用户为中心的设计原则、WCAG可访问性与平台规范
231 周安装
Apify 网络爬虫和自动化平台 - 无需编码抓取亚马逊、谷歌、领英等网站数据
231 周安装
llama.cpp 中文指南:纯 C/C++ LLM 推理,CPU/非 NVIDIA 硬件优化部署
231 周安装