extract

A command that reviews a conversation and turns reusable patterns into Claude Code skill, command, or agent files.

In plain words
What is it for?
Use it to extract repeatable workflows, instructions, or agent behaviors from a conversation, with optional settings for the output folder and component type.
Why use it?
It saves you from manually finding useful procedures in a long conversation and rewriting them as reusable files.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/dropfan/claude-code-plugins/extract
Clone the repo
git clone --depth 1 https://github.com/DropFan/claude-code-plugins
Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,293 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00012 $0.02293
Opus 5 $0.00006 $0.01146
Sonnet 5 $0.00002 $0.00459
Haiku 4.5 $0.00001 $0.00229

Measured yesterday against content hash 1bc228d70645, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

extract scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/skill-extractor/commands/extract.md · 272 lines

How it starts

The opening of the file, as written. The whole thing — 272 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Context

  • Working directory: !pwd
  • Current date: !date '+%Y-%m-%d %H:%M'

Task

Analyze the current conversation history and extract reusable patterns into Claude Code component files (Skill, Command, or Agent).

User arguments: $ARGUMENTS

Step 0: Load Configuration

  1. Use the Read tool to check if .claude/skill-extractor.local.md exists in the project root
  2. If it exists, parse the YAML frontmatter between --- markers to extract:
    • default_output_dir — default save directory (default: ~/.claude/skills/)
    • default_type — default component type: auto, skill, command, or agent (default: auto)
  3. If the file does not exist, silently use built-in defaults (no error)
  4. Settings are overridden by explicit command arguments

Step 1: Analyze Conversation History

Scan the conversation history and identify extractable patterns.

For long conversations: If the conversation history exceeds the available context window, focus on the most recent exchanges first, as they are most likely to contain the pattern the user wants to extract. If early parts of the conversation were truncated or not analyzed, inform the user: "Note: Only the most recent portion of the conversation was analyzed. If the pattern you want to extract is from earlier in the conversation, please describe it."

Look for:

Potential Skills (methodology / technique):

  • A debugging approach that involved multiple analysis steps
  • A review or evaluation methodology with specific criteria
  • A problem-solving strategy with decision points
  • Domain-specific knowledge applied to solve a problem
  • A multi-step reasoning process that could be reused

Potential Commands (executable operation sequence):

  • A repeated sequence of tool calls or shell commands
  • A data processing or transformation pipeline
  • A build, test, or deployment workflow
  • A file generation or scaffolding process with clear parameters

Potential Agents (autonomous decision workflow):

  • A complex analysis that required branching decisions
  • A multi-file investigation with dynamic scope
  • A code generation task requiring context-aware decisions
  • A review or audit workflow with autonomous judgment

Read the full file on GitHub · 272 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 272 lines · 12 tokens per session scan A 1bc228d70645

Subscribe to this mod's changes

extract is a command published in the GitHub repository DropFan/claude-code-plugins (7 stars, last pushed 26d ago), licensed MIT. It adds 12 tokens to every session and 2,293 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.