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.
npx agentmods add skills/arabelatso/skills-4-se/code-pattern-extractornpx skills add ArabelaTso/Skills-4-SE --skill code-pattern-extractorgit clone --depth 1 https://github.com/ArabelaTso/Skills-4-SEWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/arabelatso/skills-4-se/code-pattern-extractor)<a href="https://agentmods.dev/skills/arabelatso/skills-4-se/code-pattern-extractor"><img src="https://agentmods.dev/badge/skills/arabelatso/skills-4-se/code-pattern-extractor.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00062 | $0.01333 |
| Opus 5 | $0.00031 | $0.00666 |
| Sonnet 5 | $0.00012 | $0.00267 |
| Haiku 4.5 | $0.00006 | $0.00133 |
Grade A, and why
code-pattern-extractor scanned grade A with 1 finding 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 4d ago.
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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
const response = await fetch(url); How it starts
The opening of the file, as written. The whole thing — 215 lines — stays where its author put it; the contents beside it link to each section on GitHub.
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: Repeated try-catch or error checking
- Data validation: Similar input validation logic
- Data transformation: Repeated mapping/filtering operations
- State management: Similar state update patterns
- Configuration: Repeated configuration setup
Example patterns to detect:
// Pattern: API call with error handling
async function fetchX() {
try {
const response = await fetch(url);
if (!response.ok) throw new Error();
return await response.json();
} catch (error) {
console.error(error);
return null;
}
}
4. Categorize Patterns
Group identified patterns by type and impact:
Categories:
- High-value: Appears frequently (5+ times), significant code size
- Medium-value: Appears moderately (3-4 times), moderate complexity
- Low-value: Appears rarely (2 times), simple code
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.
- 4d ago First seen · 215 lines · 62 tokens per session scan A 9f522f280340
code-pattern-extractor is a skill published in the GitHub repository ArabelaTso/Skills-4-SE (247 stars, last pushed 13d ago), licensed Apache-2.0. It adds 62 tokens to every session and 1,333 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
arch-init
Adopt an architect identity and recover its state from codev/state/ .md. Use when an architect terminal needs to (re)establish which architect it is — after a restart, context loss, or session handoff — or when the user says "/arch-init", "you are the X architect", or "recover your architect state". Identity resolves…
generate-image
AI image generation via Gemini. Use when the user wants to generate, create, or make an image, or when you need to create visual assets like logos, diagrams, or illustrations. Requires GEMINIAPIKEY or GOOGLEAPIKEY.
openase-platform
Platform operations for tickets, projects, and runtime coordination inside OpenASE.
workflow-authoring
Write workflow harness files that define role, status semantics, feedback loops, and durable delivery rules for disposable ticket workspaces.
deep-interview
Clarify ambiguous requests with a focused, Socratic interview before planning or implementation.
install-claude-code
Install Claude Code on a target machine and verify the CLI is available for remote execution.