/grepika:apply-patternfrom grepika
Applies architectural patterns from previously studied codebases to the current project via the grepika MCP server. Lists available blueprints and adapts specific patterns.
Ships in grepika. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You help developers apply architectural patterns from previously studied codebases to their current project.
Arguments: $ARGUMENTS
Determine the action from the arguments:
--list → List all available blueprints<source> (single word, no colon) → List patterns in that blueprint<source>:<pattern> → Apply a specific pattern to the current project<pattern> (contains hyphen, no colon) → Search all blueprints for this pattern nameIf no arguments provided, run --list.
If any grepika tool returns "No active workspace", call mcp__grepika__add_workspace with the project root first.
--list)Use Bash to list available blueprints:
ls -1 ~/.claude/blueprints/ 2>/dev/null || echo "No blueprints found. Use /study to extract patterns from a codebase first."
For each blueprint found, use Bash to extract the frontmatter:
head -10 ~/.claude/blueprints/*/blueprint.md
Output:
## Available Blueprints
| Source | Patterns | Studied | Focus |
|--------|----------|---------|-------|
| [name] | [count] | [date] | [focus] |
Use `/apply-pattern <source>` to see patterns, or `/apply-pattern <source>:<pattern>` to apply one.
<source>)Use Read to read ~/.claude/blueprints/<source>/blueprint.md.
Extract all ## Pattern: <name> headings and their Load-bearing and Category fields.
Output:
## Patterns in [source]
| # | Pattern | Load-bearing | Category |
|---|---------|-------------|----------|
| 1 | [name] | yes/no | [category] |
### Build Order
[from the blueprint's Build Order section]
Use `/apply-pattern [source]:[pattern-name]` to apply a pattern.
<source>:<pattern>)This is the core workflow.
Use Read to read ~/.claude/blueprints/<source>/blueprint.md.
Find the section starting with ## Pattern: <pattern> and ending at the next ## Pattern: or end of file. Extract:
If the pattern is not found, list available patterns and suggest the closest match.
Use grepika tools to analyze the target project:
mcp__grepika__toc — directory structure and languagemcp__grepika__search with mode: "fts" — find existing code related to the pattern's domainmcp__grepika__outline — structure of files where the pattern would be appliedmcp__grepika__refs — existing symbols that the pattern would interact withCompare the source pattern with the target project's:
spawn_blocking → Node.js worker_threads)Output:
## Applying Pattern: [pattern-name]
> From blueprint: [source]
### Pattern Summary
[What/Why from the blueprint — brief]
### Your Project Context
- **Language**: [target language/framework]
- **Relevant existing code**: [files/symbols that relate to this pattern]
- **What you already have**: [any partial implementation that exists]
- **What's missing**: [what needs to be built]
### Adaptation Plan
#### Step 1: [first thing to implement]
**Where**: `path/to/file.ext`
**What**: [specific guidance]
**Source reference**: [what the source codebase does at this point]
#### Step 2: [next thing]
...
### Key Differences from Source
| Aspect | Source ([source]) | Your Project |
|--------|-------------------|--------------|
| [aspect] | [source approach] | [recommended approach] |
### Dependencies to Add
| Package | Purpose | Alternative |
|---------|---------|-------------|
| [name] | [why needed] | [alternative if any] |
### What to Watch For
- [pitfall or edge case from the source pattern]
- [adaptation concern specific to the target project]
<pattern>)Use Bash to search across all blueprints:
grep -rl "## Pattern: .*<pattern>" ~/.claude/blueprints/*/blueprint.md 2>/dev/null
List matches and which blueprint they come from.
What SKILL.md sets; muted values are Claude Code's defaults
haikuExplore), in the background9 skills in this plugin
/architectureThis skill should be used when the user asks to "map the architecture",
"show module dependencies", "analyze coupling", "dependency graph",
"how are modules connected", "module boundaries", or mentions keywords
related to architectural analysis and dependency mapping.
/diff-filesThis skill should be used when the user asks to "compare files",
"diff these files", "what changed between", "show differences between",
"compare versions", or mentions keywords related to file comparison
and difference analysis.
/find-usagesThis skill should be used when the user asks to "find usages of",
"where is this used", "what calls this function", "trace symbol usage",
"find all references", "who uses this", or mentions keywords related
to symbol reference tracing and call hierarchy analysis.
npx claudepluginhub adamthewilliam/grepika --plugin grepikaOther plugins' skills for the same job