Extract Patterns — Development skill for Claude Code
Extract repeated code into reusable components.
How to install Extract Patterns
Installs to ~/.claude/commands/zieka-cpm-public-registry-extract-patterns.md
mkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/zieka/cpm-public-registry/HEAD/.claude/commands/extract-patterns.md -o ~/.claude/commands/zieka-cpm-public-registry-extract-patterns.md Restart Claude Code, or start a new session, for it to be picked up.
What Extract Patterns does
name: extract-patterns description: Extract repeated code into reusable components args: optional
Extract Patterns Command
Analyzes your codebase to identify repeated code patterns and suggests extracting them into reusable functions or components.
Usage
Run this command to analyze files for repeated patterns:
/extract-patterns [path] [--threshold=3] [--min-lines=5]
Parameters
path: File or directory to analyze (defaults to current directory)- `--threshold
Alternatives in Development
- Web Artifacts Builder — Build complex claude.ai HTML artifacts using React, Tailwind CSS, and shadcn/ui 94.1k ★
- Claude Integration Guide — FOR CLAUDE CODE: When a user asks you to integrate components from this showcase repository into their project 9.3k ★
- Stitch React Components — Stitch to React components conversion 2.6k ★
Full documentation available on GitHub
View Source RepositoryRelated Skills
Analyze Patterns
Analyze ~/.claude/tool_logs/operations.jsonl operation logs to identify repeated patterns across sessions and
Shard
Use this prompt to systematically extract reusable components from any artifact, create them as separate files
Skill Knowledge Extractor
从对话、文档和工作经验中提取可复用的知识模式 Extract reusable knowledge patterns from conversations and documents
Lessons
Extract reusable patterns and lessons learned from completed work. Run after phase completion or after signifi
Continuous Learning
Automatically extract reusable patterns from Claude Code sessions and save them as learned skills for future u
Pew
The ultimate starting point for doing anything in any project. Systematically discovers what you want to achie
Related Agents
Session Pattern Analyzer
Analyzes Claude Code session JSONL files to extract execution patterns: plan-ratio, delegation, parallel usage
Tune Analyzer
Analyze evaluation logs to extract reusable patterns for the project knowledge base.
Codebase Explorer Agent
Scans the codebase for reusable components, patterns, hooks, and API client conventions relevant to the task.