Agent skill · Design & Presentation

code-pattern-extractor

Analyze codebases to identify reusable code patterns, duplications, and implementation patterns for future development. Use when refactoring code, identifying technical debt, finding opportunities for abstraction, or documenting common patterns in a directory or module. Outputs pattern catalogs, refactoring suggestions, and reusable template code.

majiayu000github.com/majiayu000GitHub ↗
claude-codeMIT
Install
npx skills add majiayu000/claude-skill-registry --skill code-pattern-extractor --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 6 KB
Bundled scripts: none
Path: skills/analysis/code-pattern-extractor/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 534
Language: HTML

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Code Pattern Extractor ## Overview Systematically analyze code in directories or modules to identify recurring patterns, code duplication, and implementation patterns that can be abstracted into reusable components, utilities, or design patterns. ## Workflow ### 1. Define Analysis Scope Identify the code to analyze: - **Directory/module**: Analyze all files in a specific directory - **File set**: Analyze a specific set of related files - **Component**: Analyze files related to a specific feature or component Use Glob to find relevant files: ``` **/*.js, **/*.py, **/*.go, etc. ``` ### 2. Scan for Code Duplication Identify repeated code blocks that appear multiple times: **Look for**: - Similar function implementations with minor variations - Repeated code blocks (>5 lines) across files - Copy-pasted code with slight modifications - Similar class structures or method patterns **Analysis criteria**: - Similarity threshold: >70% code similarity - Minimum size: 5+ lines of code - Frequency: Appears 3+ times ### 3. Identify Implementation Patterns Find recurring implementation approaches: **Common patterns**: - **API call patterns**: Similar fetch/request handling - **Error handling**:

What's inside
Steps it walks through
  1. Overview
  2. Workflow
  3. 1. Define Analysis Scope
  4. 2. Scan for Code Duplication
  5. 3. Identify Implementation Patterns
  6. 4. Categorize Patterns
  7. 5. Generate Pattern Catalog
  8. 6. Generate Refactoring Suggestions
  9. 7. Generate Template Code
  10. Output Structure
  11. Pattern Detection Heuristics
  12. Tips
Ships with 1 file
  • metadata.json
More from claude-skill-registry
All skills →
About this skill
What does the code-pattern-extractor skill do?

Analyze codebases to identify reusable code patterns, duplications, and implementation patterns for future development. Use when refactoring code, identifying technical debt, finding opportunities for abstraction, or documenting common patterns in a directory or module. Outputs pattern catalogs, refactoring suggestions, and reusable template code.

How do I install it?

Run `npx skills add majiayu000/claude-skill-registry --skill code-pattern-extractor --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going