Analyze conversation to identify and capture reusable patterns as skills, commands, agents, or hooks. Use when spotting repeatable workflows, orchestration sequences, or decision heuristics worth codifying. Triggers on pattern(s), capture, codify, reusable, workflow, or `--patternify`.
Analyzes conversation to identify repeatable workflows, then codifies them into reusable skills, commands, agents, or hooks. Triggers when spotting 3+ similar behaviors, orchestration sequences, or when user requests pattern capture.
/plugin marketplace add outfitter-dev/agents/plugin install baselayer@outfitterThis skill inherits all available tools. When active, it can use any tool Claude has access to.
examples/heuristic-pattern.mdexamples/orchestration-pattern.mdexamples/workflow-pattern.mdreferences/component-mapping.mdreferences/pattern-types.mdConversation analysis → reusable pattern → correct component.
<when_to_use>
NOT for: one-off tasks, simple questions, well-documented existing patterns
</when_to_use>
<pattern_types>
| Type | Purpose | Example |
|---|---|---|
| Workflow | Multi-step sequences | Debug → Test → Fix → Verify |
| Orchestration | Tool coordination | Git + Linear + PR automation |
| Heuristic | Decision rules | "When X, do Y because Z" |
Workflows: Step-by-step processes with defined phases and transitions. Orchestration: Tool combinations that work together for a goal. Heuristics: Conditional logic and decision trees for common situations.
</pattern_types>
<component_mapping>
Match pattern type to implementation:
Is it a multi-step process with phases?
├─ Yes → Does it need tool restrictions?
│ ├─ Yes → Skill (with allowed_tools)
│ └─ No → Skill
└─ No → Is it a simple entry point?
├─ Yes → Command (thin wrapper → Skill)
└─ No → Is it autonomous/long-running?
├─ Yes → Agent
└─ No → Is it reactive to events?
├─ Yes → Hook
└─ No → Probably doesn't need codifying
Composites:
</component_mapping>
<specification>Pattern spec format (YAML):
name: pattern-name
type: workflow | orchestration | heuristic
trigger: when to apply
phases: # workflow
- name: phase-name
actions: [...]
exit_criteria: condition
tools: # orchestration
- tool: name
role: purpose
sequence: order
rules: # heuristic
- condition: when
action: what
rationale: why
quality:
specific: true | false
repeatable: true | false
valuable: true | false
documented: true | false
scoped: true | false
All five quality checks must pass before codifying.
</specification> <workflow>TodoWrite phases:
- Identify { pattern description }
- Classify { pattern type }
- Map { component decision }
- Specify { pattern name }
- Implement { component type }
</workflow>
<quality>
SRVDS criteria — all must pass:
| Check | Question | Red Flag |
|---|---|---|
| Specific | Clear trigger + scope? | "Sometimes useful" |
| Repeatable | Works across contexts? | One-off solution |
| Valuable | Worth the overhead? | Saves < 5 minutes |
| Documented | Can others understand? | Tribal knowledge |
| Scoped | Single responsibility? | Kitchen sink |
Skip if: < 3 occurrences, context-dependent, simpler inline
</quality><anti_patterns>
</anti_patterns>
<rules>ALWAYS:
NEVER:
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.