← 返回 Skills 市场
wpank

Skill Extraction

作者 wpank · GitHub ↗ · v1.0.0
cross-platform ⚠ suspicious
884
总下载
0
收藏
2
当前安装
1
版本数
在 OpenClaw 中安装
/install extraction
功能描述
Extract design systems, architecture patterns, and methodology from codebases into reusable skills and documentation. Use when analyzing a project to capture patterns, creating skills from existing code, extracting design tokens, or documenting how a project was built. Triggers on "extract patterns", "extract from this repo", "analyze this codebase", "create skills from this project", "extract design system".
使用说明 (SKILL.md)

Pattern Extraction

Extract reusable patterns, skills, and methodology documentation from existing codebases.

Installation

OpenClaw / Moltbot / Clawbot

npx clawhub@latest install extraction

Before Starting

MANDATORY: Read these reference files based on what you're extracting:

Extracting Read First
Any extraction methodology-values.md — priority order and what to look for
Specific categories extraction-categories.md — detailed patterns per category
Generating skills skill-quality-criteria.md — quality checklist

Extraction Process

Phase 1: Discovery

Analyze the project to understand what exists.

Scan for project structure:

- Root directory layout
- Key config files (package.json, tailwind.config.*, etc.)
- Documentation (README, docs/, etc.)
- Source organization (src/, app/, components/, etc.)

Identify tech stack:

Indicator Technology
package.json with react React
tailwind.config.* Tailwind CSS
components.json shadcn/ui
go.mod Go
Dockerfile Docker
k8s/ or .yaml manifests Kubernetes
turbo.json Turborepo
Makefile Make automation

Look for design system signals:

  • Custom Tailwind config (not defaults)
  • CSS variables / custom properties
  • Theme files
  • Design documentation
  • Mood boards or reference lists

Capture key findings:

  • What's the tech stack?
  • What's the folder structure?
  • Is there a documented design direction?
  • What workflows exist (Makefile, scripts)?

Phase 2: Categorization

Map discoveries to extraction categories, prioritized:

Priority order:

  1. Design Systems — Color tokens, typography, spacing, motion, aesthetic documentation
  2. UI Patterns — Component organization, layouts, interactions
  3. Architecture — Folder structure, data flow, API patterns
  4. Workflows — Build, dev, deploy, CI/CD
  5. Domain-Specific — Patterns unique to this application type

For each category found, note:

  • What specific patterns exist?
  • Where are they defined? (file paths)
  • Are they documented? (comments, docs)
  • Are they worth extracting? (used in multiple places, well-designed)

Filter by value:

Extract Skip
Patterns used across multiple components One-off solutions
Customized configs with intention Default configurations
Documented design decisions Arbitrary choices
Reusable infrastructure Project-specific hacks

Phase 3: Extraction

For each valuable pattern, generate outputs.

Design Systems → Design System Doc + Skill

  1. Read the Tailwind config, CSS files, theme files
  2. Extract actual token values (colors, typography, spacing)
  3. Document the aesthetic direction
  4. Create:
    • docs/extracted/[project]-design-system.md using design-system.md template
    • ai/skills/[project]-design-system/SKILL.md if patterns are reusable

Architecture → Methodology Doc

  1. Document folder structure with reasoning
  2. Capture data flow patterns
  3. Note key technical decisions
  4. Create docs/extracted/[project]-summary.md using project-summary.md template

Patterns → Skills

For each pattern worth a skill:

  1. Load skill-quality-criteria.md
  2. Use skill-template.md template
  3. Verify the quality checklist:
    • Description has WHAT, WHEN, KEYWORDS
    • No explanations of basics Claude knows
    • Has specific NEVER list
    • \x3C 300 lines ideal
  4. Create ai/skills/[project]-[pattern]/SKILL.md

Phase 4: Validation

Before writing output, validate extracted content.

For each skill, verify:

  • Description has WHAT, WHEN, and trigger KEYWORDS
  • >70% expert knowledge (not in base Claude model)
  • \x3C300 lines (max 500)
  • Has "When to Use" section with clear triggers
  • Has code examples (if applicable)
  • Has NEVER Do section with anti-patterns
  • Project-agnostic (no hardcoded project names)

For documentation, verify:

  • Actual values extracted (not placeholders)
  • Templates fully filled out
  • Aesthetic direction documented (for design systems)
  • File paths are correct

Conflict detection: Before creating a new skill, check if similar skills exist:

# Check existing skills in the target repo
ls ai/skills/*/
Situation Action
Similar skill exists Enhance existing skill instead
Overlapping patterns Note overlap, may merge in refinement
Unique pattern Proceed with new skill

Phase 5: Output

Write extracted content to target locations.

Methodology Documentation:

docs/extracted/
├── [project]-summary.md       # Overall methodology
├── [project]-design-system.md # Design tokens and aesthetic
└── [project]-architecture.md  # Code patterns (if complex)

Skills:

ai/skills/
└── [project]-[category]/
    ├── SKILL.md
    └── references/  # (if needed for detailed content)

Create docs/extracted/ directory if it doesn't exist.


Extraction Focus Areas

Design System Extraction (Highest Priority)

When a project has intentional design work, extract thoroughly:

Must capture:

  • Color palette (primary, secondary, accent, semantic)
  • Typography (fonts, scale, weights)
  • Spacing scale
  • Motion/animation patterns
  • The "vibe" or aesthetic direction

Look in:

  • tailwind.config.js / tailwind.config.ts
  • globals.css / app.css / root CSS files
  • theme.ts / theme.js
  • Any design documentation

Generate:

  1. Design system documentation with actual values
  2. Skill capturing the aesthetic philosophy (if distinctive)

Workflow Extraction

Look for:

  • Makefile targets
  • package.json scripts
  • Docker configurations
  • CI/CD workflows

Extract:

  • Dev setup commands
  • Build processes
  • Deployment patterns

Error Handling

Situation Resolution
No patterns found Create project summary only; document why extraction failed
Pattern too project-specific Skip or generalize by removing project names
Incomplete pattern Extract what exists, note gaps in skill
Quality criteria not met Revise skill or skip pattern
Similar skill already exists Update existing skill instead of creating new
Can't find source files Note in extraction log, skip that category

When extraction fails partially:

  1. Complete what can be extracted
  2. Document gaps in the project summary
  3. Note "Incomplete extraction" in output
  4. Suggest what additional information would be needed

NEVER Do

  • NEVER extract default configurations — Only extract customized, intentional patterns
  • NEVER create skills for basic concepts — Claude already knows React, Tailwind basics
  • NEVER skip the aesthetic — Design philosophy is highest priority
  • NEVER generate skills > 500 lines — Use references/ for detailed content
  • NEVER create skills without good descriptions — Description determines if skill activates
  • NEVER extract one-off solutions — Focus on patterns used in multiple places
  • NEVER skip validation phase — Quality check before writing output
  • NEVER leave project names in skills — Make patterns project-agnostic
  • NEVER create duplicate skills — Check for existing similar skills first

Quality Check Before Finishing

  • Design system captured (if one exists)?
  • Methodology summary created?
  • Skills have proper descriptions (WHAT, WHEN, KEYWORDS)?
  • Skills pass the expert knowledge test?
  • Anti-patterns documented in skills?
  • Output files created in correct locations?

After Extraction: Staging for Refinement

If you're extracting to later consolidate patterns across multiple projects:

Copy results to the skills toolkit repo for staging:

# From this project, copy to the skills repo staging area
cp -r ai/skills/[project]-* /path/to/skills-repo/ai/staging/skills/
cp -r docs/extracted/* /path/to/skills-repo/ai/staging/docs/

Staging folder structure:

ai/staging/
├── skills/           # Extracted skills from multiple projects
│   ├── project-a-design-system/
│   ├── project-b-ui-patterns/
│   └── ...
└── docs/             # Extracted methodology docs
    ├── project-a-summary.md
    ├── project-b-design-system.md
    └── ...

After staging content from multiple projects:

  • Say "refine staged content" or "consolidate staged skills"
  • The refinement process will:
    • Identify patterns across projects
    • Consolidate into project-agnostic skills
    • Update methodology docs with insights
    • Promote refined skills to active locations

Related Skills

安全使用建议
This skill is coherent for extracting design and architecture patterns: it will scan your repository (configs, CSS, source files) and write generated docs and SKILL.md files into ai/skills/ and docs/extracted/. It does not request credentials or download remote code, but because it reads many files and writes outputs, you should: (1) run it only on codebases you trust, (2) back up or branch the repo before running so you can review and revert generated files, (3) inspect generated SKILL.md and docs before committing (to avoid accidentally capturing secrets or project-specific private data), and (4) be aware that the agent may autonomously invoke the skill if enabled — disable autonomous invocation if you want manual control. If you want a higher-assurance review, provide the specific repo or sample outputs so you can verify what the skill would extract.
功能分析
Type: OpenClaw Skill Name: extraction Version: 1.0.0 The skill bundle is classified as suspicious due to its instruction for the AI agent to execute shell commands, particularly the `cp -r` command. While the stated purpose is to copy extracted content to a 'staging area' within a 'skills repo', the use of a placeholder path (`/path/to/skills-repo/`) for this operation presents a significant vulnerability. If the agent's environment or prompt resolution is compromised, this capability could be exploited for unauthorized data movement or file system manipulation. Other shell commands like `ls`, `wc`, and `grep` are also executed, highlighting the agent's ability to run arbitrary commands, which is a general risk, though these specific commands are used for benign introspection and validation.
能力评估
Purpose & Capability
Name and description match the runtime instructions. The SKILL.md explicitly directs the agent to discover, categorize, extract, validate, and write design/architecture patterns; all required actions (scanning repo files, reading config files like package.json/tailwind.config, producing docs and SKILL.md outputs) are consistent with the stated purpose.
Instruction Scope
Instructions tell the agent to read many project files (configs, CSS, tailwind, src/, docs) and run lightweight shell checks (wc, grep, ls) and then write outputs into ai/skills/ and docs/extracted/. This is expected for a codebase-extraction skill, but it does grant the skill broad read/write access within the repository. Review outputs before committing; avoid running on repos containing secrets you don't want duplicated.
Install Mechanism
No install spec or binary downloads are declared; the skill is instruction-only. README shows example npx commands for adding/installing, but the skill package itself doesn't embed any external install actions. This minimizes install-time risk.
Credentials
The skill requests no environment variables, credentials, or config paths. It also does not reference external endpoints or require unrelated service tokens. The requested scope (reading project files, writing docs/skills) is proportional to its purpose.
Persistence & Privilege
The skill is user-invocable and not always-enabled. disable-model-invocation is false (normal), so it can be invoked autonomously if the agent decides; however, there is no 'always: true' and it does not request system-wide config changes. The skill's ability to write into the repository is inherent to its function but should be reviewed by the user.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install extraction
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /extraction 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of the pattern-extraction skill. - Extracts design systems, architecture patterns, and methodologies from codebases into reusable skills and documentation. - Guides users through discovery, categorization, extraction, validation, and output phases with clear checklists. - Prioritizes extracting intentional, reusable patterns—especially custom design systems and aesthetic directions. - Includes error handling guidelines and strict criteria to ensure high-quality, project-agnostic outputs. - Provides installation instructions and references for required reading before extraction.
元数据
Slug extraction
版本 1.0.0
许可证
累计安装 2
当前安装数 2
历史版本数 1
常见问题

Skill Extraction 是什么?

Extract design systems, architecture patterns, and methodology from codebases into reusable skills and documentation. Use when analyzing a project to capture patterns, creating skills from existing code, extracting design tokens, or documenting how a project was built. Triggers on "extract patterns", "extract from this repo", "analyze this codebase", "create skills from this project", "extract design system". 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 884 次。

如何安装 Skill Extraction?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install extraction」即可一键安装,无需额外配置。

Skill Extraction 是免费的吗?

是的,Skill Extraction 完全免费(开源免费),可自由下载、安装和使用。

Skill Extraction 支持哪些平台?

Skill Extraction 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Skill Extraction?

由 wpank(@wpank)开发并维护,当前版本 v1.0.0。

💬 留言讨论