Langsung ke konten
Skillpedia
Agen29k ยท #9482

extract

Fungsinya

Skill ini membuat agent mengemas solusi yang sudah dipelajarinya menjadi skill yang dapat dipakai ulang, dengan file instruksi utama dan catatan referensi. Skill ini untuk orang yang terus memecahkan masalah yang sama dan ingin menyimpan jawabannya.

Kapan dipakai

  • โœ“Saat Anda memecahkan bug yang rumit dan ingin memakai ulang perbaikannya di proyek lain.
  • โœ“Saat masalah yang sama muncul di dua proyek atau lebih.
  • โœ“Saat Anda ingin menyimpan perbaikan beberapa langkah agar tidak terlupa.

Link skill

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

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/alirezarezvani/claude-skills/blob/main/engineering-team/self-improving-agent/skills/extract/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit โ†’

Contoh permintaan ke AI

โ€œUbah perbaikan Docker yang baru saja kita temukan menjadi skill yang dapat dipakai ulang di proyek lain.โ€

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Agent mencari catatan terkait yang tersimpan, mengajukan beberapa pertanyaan tentang lingkup, lalu menulis folder skill. Opsi dry-run menampilkan pratinjau hasilnya sebelum file apa pun dibuat.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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
Pertanyaan umum

Di mana skill baru disimpan?

Secara default di folder output yang Anda pilih, dan Anda dapat memberi nama skill sendiri.

Bisakah saya melihat apa yang akan dibuat terlebih dahulu?

Bisa. Opsi dry-run menampilkan hasilnya tanpa membuat file apa pun.

Kapan pola sebaiknya tidak diekstrak?

Skill ini menyarankan untuk tidak mengekstrak ide yang terikat pada satu codebase tertentu, karena ide itu tidak akan berguna secara luas.

Detail

Deskripsi asli dari pembuat

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

Popularitas

Bintang GitHub
29k
Peringkat
#9482
Lisensi
MIT
Diperbarui
2/11/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • โ€ฆ

Skill lain dari repositori ini

Skill serupa