Skip to content
Skills Library
Programming · Building & coding

apply-pattern

/apply-pattern

This skill should be used when the user asks to "apply a pattern", "use a blueprint", "implement [pattern] from [source]", "what blueprints do I have", "list patterns", "adapt this pattern", or mentions keywords related to applying previously extracted architectural patterns to their current project.

Repository
grepika ↗
Licence
MIT
Last repository change
12.08.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 12.08.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

This skill should be used when the user asks to "apply a pattern", "use a blueprint", "implement [pattern] from [source]", "what blueprints do I have", "list patterns", "adapt this pattern", or mentions keywords related to applying previously extracted architectural patterns to their current project.

Triggers from the description

apply a patternuse a blueprintimplement [pattern] from [source]what blueprints do I havelist patternsadapt this pattern
Original author description

This skill should be used when the user asks to "apply a pattern", "use a blueprint", "implement [pattern] from [source]", "what blueprints do I have", "list patterns", "adapt this pattern", or mentions keywords related to applying previously extracted architectural patterns to their current project.

How it works

  1. Input
  2. Argument Parsing
  3. Pre-check
  4. Action: List Blueprints (--list)
  5. Action: List Patterns (<source>)
  6. Action: Apply Pattern (<source>:<pattern>)
  7. Action: Search Pattern (<pattern>)
  8. Guidelines
Original SKILL.md headings · 161 lines, 704 words
SKILL.md preview
---
name: apply-pattern
description: |
  This skill should be used when the user asks to "apply a pattern",
  "use a blueprint", "implement [pattern] from [source]",
  "what blueprints do I have", "list patterns", "adapt this pattern",
  or mentions keywords related to applying previously extracted
  architectural patterns to their current project.
version: 1.0.0
compatibility: "Requires grepika MCP server."
disable-model-invocation: true
context: fork
agent: Explore
model: haiku
allowed-tools:
  - mcp__grepika__search
  - mcp__grepika__refs
  - mcp__grepika__outline
  - mcp__grepika__toc
  - mcp__grepika__get
  - mcp__grepika__structural_search
  - mcp__grepika__add_workspace
  - Bash
  - Read
---

# Apply Pattern — Blueprint-Guided Implementation

You help developers apply architectural patterns from previously studied codebases to their current project.

## Input

**Arguments**: $ARGUMENTS

## Argument Parsing

Determine the action from the arguments:

1. **`--list`** → List all available blueprints
2. **`<source>`** (single word, no colon) → List patterns in that blueprint
3. **`<source>:<pattern>`** → Apply a specific pattern to the current project
4. **`<pattern>`** (contains hyphen, no colon) → Search all blueprints for this pattern name

If no arguments provided, run `--list`.

## Pre-check

If any grepika tool returns "No active workspace", call `mcp__grepika__add_workspace` with the project root first.

## Action: List Blueprints (`--list`)

Use Bash to list available blueprints:

```bash
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:

```bash
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.
```

## Action: List Patterns (`<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.
```

## Action: Apply Pattern (`<source>:<pattern>`)

This is the core workflow.

### Step 1: Read the Pattern

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:
- What / Why / Key Files / Implementation / Adapt When

If the pattern is not found, list available patterns and suggest the closest match.

### Step 2: Understand the Current Project

Use grepika tools to analyze the target project:

1. `mcp__grepika__toc` — directory structure and language
2. `mcp__grepika__search` with `mode: "fts"` — find existing code related to the pattern's domain
3. `mcp__grepika__outline` — structure of files where the pattern would be applied
4. `mcp__grepika__refs` — existing symbols that the pattern would interact with

### Step 3: Adapt the Pattern

Compare the source pattern with the target project's:
- **Language/framework**: Translate idioms (e.g., Rust `spawn_blocking` → Node.js `worker_threads`)
- **Existing code**: Identify what already exists that the pattern can build on
- **Naming conventions**: Match the target project's style
- **Dependencies**: Recommend equivalent libraries for the target's ecosystem

### Step 4: Provide Implementation Guidance

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]
```

## Action: Search Pattern (`<pattern>`)

Use Bash to search across all blueprints:

```bash
grep -rl "## Pattern: .*<pattern>" ~/.claude/blueprints/*/blueprint.md 2>/dev/null
```

List matches and which blueprint they come from.

## Guidelines

- **Don't copy — adapt**: The goal is to apply the pattern's principles, not clone the source code
- **Respect the target**: Match the target project's conventions, not the source's
- **Highlight trade-offs**: If the source made a choice that might not apply (e.g., SQLite for a system that needs Postgres), say so
- **Be specific**: Reference actual files and symbols in the target project, not hypothetical locations
- **Build order matters**: If the pattern depends on another pattern from the same blueprint, mention it

Versions

The database has no other skills named apply-pattern.

Database snapshot: 13.11.2026 · package version 59f6af859986 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100study
    This skill should be used when the user asks to "study this codebase", "extract patterns from this project", "create a blueprint", "learn the architecture for building my own version", "what patterns can I reuse from this codebase", or mentions keywords related to extracting…
  • 100pattern-detection
    Identify existing codebase patterns (naming conventions, architectural patterns, testing patterns) to maintain consistency. Use when generating code, reviewing changes, or understanding established practices.
  • 100pattern-recognition
    Identify and apply existing codebase patterns for consistency. TRIGGER when: writing new code that should match conventions, or reviewing code for pattern drift. SKIP: language-specific patterns (use python-patterns or react-patterns); security review (use…
  • 100design-patterns
    Use this skill whenever the user wants to identify, apply, or refactor toward design patterns in their codebase. Triggers include: "apply design patterns", "identify patterns", "what patterns should I use", "refactor to strategy pattern", "apply factory method", "use observer…
  • 87design-patterns
    PHP and Laravel design pattern advisor — suggests, implements, refactors, and reviews design patterns in your codebase. Use this skill whenever the user asks about which pattern to use, wants to refactor code to follow a pattern, needs a pattern implemented, or wants a code…
  • 100design-pattern
    Expert knowledge in software design patterns covering GoF patterns, architectural patterns, and modern design principles. Apply appropriate patterns to improve code maintainability, scalability, and extensibility. Use this skill when designing new software components,…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.