Skip to content
Skillpedia
Agents29k Β· #9482

extract

What it does

This skill makes the agent package a solution it has learned into a reusable skill, with a main instruction file and reference notes. It is for people who keep solving the same problem and want to save the answer.

When to use it

  • βœ“When you solved a tricky bug and want to reuse the fix in other projects.
  • βœ“When the same problem has come up in two or more projects.
  • βœ“When you want to save a multi-step fix so you do not forget it.

Skill link

https://github.com/alirezarezvani/claude-skills/blob/main/engineering-team/self-improving-agent/skills/extract/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/alirezarezvani/claude-skills/blob/main/engineering-team/self-improving-agent/skills/extract/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute β†’

Example of what to ask your AI

β€œTurn the Docker fix we just worked out into a reusable skill I can use in other projects.”

5 new skills a week. 1 minute to read.

How it works

The agent searches your saved notes for related entries, asks a few questions about scope, and writes a skill folder. A dry-run option previews the result before any files are created.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

/si:extract β€” Create Skills from Patterns

Transforms a recurring pattern or debugging solution into a standalone, portable skill that can be installed in any project.

Usage

/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

When to Extract

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"

Workflow

Step 1: Identify the pattern

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.

Step 2: Determine skill scope

Ask (max 2 questions):

  • "What problem does this solve?" (if not clear)
  • "Should this include code examples?" (if applicable)

Step 3: Generate skill name

Rules for naming:

  • Lowercase, hyphens between words
  • Descriptive but concise (2-4 words)
  • Examples: docker-m1-fixes, api-timeout-patterns, pnpm-workspace-setup

Reserved fragments β€” must NOT appear in the skill name:

  • claude
  • anthropic

For skills about Claude Code itself, use the cc- prefix instead:

  • ❌ claude-code-settings β†’ βœ… cc-settings
  • ❌ claude-code-maintenance β†’ βœ… cc-maintenance
  • ❌ claude-mcp-tools β†’ βœ… cc-mcp-tools
  • ❌ claude-plugin-development β†’ βœ… cc-plugin-development

Before writing the skill directory, check the proposed name against this list. If a reserved fragment is present, transform it (drop the fragment or replace the claude*/anthropic* prefix with cc-) and confirm with the user.

Step 4: Create the skill files

Spawn the skill-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

Step 5: SKILL.md structure

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}}

Step 6: Quality gates

Before finalizing, verify:

  • SKILL.md has valid YAML frontmatter with name and description
  • name matches the folder name (lowercase, hyphens)
  • name does NOT contain reserved fragments claude or anthropic (use cc- prefix for Claude Code skills)
  • Description includes "Use when:" trigger conditions
  • Solutions are self-contained (no external context needed)
  • Code examples are complete and copy-pasteable
  • No project-specific hardcoded values (paths, URLs, credentials)
  • No unnecessary dependencies

Step 7: Report

βœ… 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-s
FAQ

Where does the new skill get saved?

By default it goes to an output folder you choose, and you can name the skill yourself.

Can I see what it will create first?

Yes. The dry-run option shows the result without creating any files.

When should a pattern not be extracted?

The skill advises against extracting ideas tied to one specific codebase, because they will not be broadly useful.

Details

Original description by the author

Turn a proven pattern or debugging solution into a standalone reusable skill with SKILL.md, reference docs, and examples. Use when the user runs /si:extract or asks to package a recurring solution from memory into a skill.

repo: alirezarezvani/claude-skills

Popularity

GitHub stars
29k
Ranking position
#9482
License
MIT
Updated
11/2/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills