mcpField
E
extract-pattern

extract-pattern

github.com/sharpdeveyeAgent workflows592334 installsUpdated 26w ago
Repository

About extract-pattern

A skill for turning reliable workflows into reusable, documented patterns. It guides agents through generalization, reuse testing, and recording when a pattern should or should not be applied.

Key features

  1. 01Identify effective workflow components
  2. 02Create reusable pattern templates
  3. 03Document use and non-use conditions
  4. 04Test patterns in analogous tasks

Use cases

  1. 01Capture a solution that took substantial iteration
  2. 02Reuse an effective prompt or tool pipeline
  3. 03Document workflow error handling for other projects

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/sharpdeveye/maestro --skill extract-pattern

After installing, type/extract-patternin Claude Code to confirm it loaded.

Details

From the project README

MANDATORY PREPARATION

Invoke /agent-workflow — it contains workflow principles, anti-patterns, and the Context Gathering Protocol. Follow the protocol before proceeding — if no workflow context exists yet, you MUST run /teach-maestro first.


Turn working solutions into reusable patterns. Every successful workflow contains patterns that are applicable beyond their original context.

Step 1: Identify What Worked

Review the workflow and identify components that:

  • Solved a common problem in a particularly effective way
  • Would be useful in other workflows or projects
  • Required significant iteration to get right
  • Represent a non-obvious solution
Step 2: Generalize the Pattern

Transform the specific solution into a reusable template:

From specific → To general pattern:

## Pattern: [Name]
**Problem**: What recurring problem does this solve?
**When to use**: When is this pattern appropriate?
**When NOT to use**: When is this pattern inappropriate?
**Template**: Copy-pastable starting point with customization markers.
**Variants**: Common variations for different contexts.
**Pitfalls**: What went wrong during development and how it was fixed.
**Examples**: 1-2 concrete examples.
Step 3: Test Reusability
  • Apply the template to a different but analogous problem
  • Confirm the customization points are sufficient
  • Verify the documentation is clear enough for someone unfamiliar with the original
Workflow ElementExtract As
Effective prompt structurePrompt template with customization points
Tool chain that works wellPipeline pattern with data flow diagram
Error handling strategyResilience pattern with implementation guide
Evaluation approachQuality assurance pattern with scoring rubric
Context management techniqueContext pattern with budget guidance
Agent coordination protocolOrchestration pattern with handoff templates
Recommended Next Step

After extracting patterns, run /calibrate to ensure the new patterns are consistent with existing project conventions.

NEVER:

  • Extract patterns from workflows that don't work reliably
  • Over-generalize (if it only applies to one case, document it as a solution, not a pattern)
  • Skip the "when NOT to use" section
  • Extract without testing reusability

Comments

Markdown supported