Agent skill

Apply Pattern

by adamthewilliam in adamthewilliam/grepika

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…

MITAuto-check: notesDevelopment

Install Apply Pattern

skills CLI
$ npx skills add adamthewilliam/grepika --skill apply-pattern -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install adamthewilliam/grepika apply-pattern --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/adamthewilliam/grepika.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/grepika/skills/apply-pattern .claude/skills/apply-pattern && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
apply-pattern
GitHub stars
138
Token cost
~1.4k tokens
SKILL.md length
398 words
Files
1
Skills in repo
9
Repo updated
First seen
Licence
MIT

At a glance

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…

  • Works in 4 steps: Read the Pattern → Understand the Current Project → Adapt the Pattern → …
  • Asks to apply a pattern
  • SKILL.md covers Input, Argument Parsing, Pre-check and Action: List Blueprints (--list), plus 4 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Apply Pattern is an agent skill from adamthewilliam/grepika. 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.

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts. Compatibility notes: Requires grepika MCP server.

It sits in Development. It works with Model Context Protocol. The licence is MIT.

When your agent uses it

  • Asks to apply a pattern
  • Use a blueprint
  • Implement [pattern] from [source]
  • What blueprints do I have

Example prompts

  • “apply a pattern”
  • “use a blueprint”
  • “implement [pattern] from [source]”
  • “/apply-pattern”

Requirements

  • Node.js
  • Compatibility (from SKILL.md): Requires grepika MCP server.
  • Pre-approved tools (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

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Read the Pattern
  2. Understand the Current Project
  3. Adapt the Pattern
  4. Provide Implementation Guidance

What it can do on your machine

Read from SKILL.md and the folder at commit f035a18. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • 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

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are bash).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Requires grepika MCP server.

    From compatibility in the SKILL.md frontmatter.

Context cost

Apply Pattern loads about 1.4k tokens when it runs. Until then it costs about 79 tokens; SKILL.md has 398 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~79
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: mcp__grepika__search, mcp__grepika__refs, mcp__grepika__outline, mcp__grepika__toc, mcp__grepika__ge

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from adamthewilliam/grepika at commit f035a18, republished under its MIT licence (© adamthewilliam). 398 words, ~1,416 tokens.

Download SKILL.mdSave it as .claude/skills/apply-pattern/SKILL.md (or your agent's skills folder).
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.
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
compatibility
Requires grepika MCP server.
version
1.0.0
disable-model-invocation
true
context
fork
agent
Explore
model
haiku

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
Show full SKILL.md (153 more words)Show less
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

© adamthewilliam, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in plugins/grepika/skills/apply-pattern of adamthewilliam/grepika.

Open the folder on GitHubat commit f035a18

Compare with similar skills

Apply Pattern next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Apply Pattern compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Apply Pattern this skilladamthewilliam/grepika138—~1.4kAutomated safety check: NotesMIT
Debugging Executionsn8n-io/n8n207k—~2.6kAutomated safety check: PassCustom licence
Analyze Logsactivepieces/activepieces25k1 repos~1.6kAutomated safety check: PassMIT
ReleasePrefectHQ/fastmcp28k—~2.9kAutomated safety check: PassApache-2.0
Claude Code Skillcodeaashu/claude-code3.4k1 repos~2.7kAutomated safety check: PassProprietary
Run Nx Generatornrwl/nx29k2 repos~592Automated safety check: NotesMIT

Similar skills

  • Official

    Debug failed or wrong-output workflow executions using executions tools.

    207k GitHub stars~2.6k tokensUpdated today
    DevelopmentAuto-check passed
  • Analyze Logs

    activepieces/activepieces

    Analyze application logs from the .evlog/logs/ directory. An agent skill from activepieces/activepieces.

    25k GitHub starsUsed in 1 repo~1.6k tokens
    DevelopmentAuto-check passed
  • Release

    PrefectHQ/fastmcp

    Cut a FastMCP release end to end. An agent skill from PrefectHQ/fastmcp.

    28k GitHub stars~2.9k tokensUpdated today
    DevelopmentAuto-check passed
  • Claude Code Skill

    codeaashu/claude-code

    Development conventions and architecture guide for the Claude Code CLI repository.

    3.4k GitHub starsUsed in 1 repo~2.7k tokens
    DevelopmentAuto-check passed
  • Run Nx generators with prioritization for workspace-plugin generators.

    29k GitHub starsUsed in 2 repos~592 tokens
    DevelopmentAuto-check: notes
  • LangBot Plugin Development

    langbot-app/LangBot

    Guides building, debugging and testing LangBot plugins: components, SDK calls, README and locale rules, SDK pitfalls and WebSocket-based testing.

    18k GitHub stars~3.9k tokensUpdated today
    DevelopmentAuto-check passed

More from adamthewilliam/grepika

All 9 skills in this repo
  • Impact

    adamthewilliam/grepika

    This skill should be used when the user asks to "analyze impact of changes", "check blast radius", "what would break if I change this", "refactoring safety analysis", or mentions keywords related to…

    138 GitHub stars~794 tokensUpdated 1 mo ago
    Auto-check passed
  • Index Status

    adamthewilliam/grepika

    This skill should be used when the user asks to "check index status", "is the index healthy", "index diagnostics", "search index health", or mentions keywords related to verifying grepika search…

    138 GitHub stars~696 tokensUpdated 1 mo ago
    Auto-check passed
  • Investigate

    adamthewilliam/grepika

    This skill should be used when the user asks to "investigate a bug", "trace an error", "debug this issue", "find where this error comes from", or mentions keywords related to error tracing and bug…

    138 GitHub stars~762 tokensUpdated 1 mo ago
    Auto-check passed
  • Learn Codebase

    adamthewilliam/grepika

    This skill should be used when the user asks to "learn this codebase", "give me a codebase overview", "onboard me to this project", "explain the architecture", or mentions keywords related to…

    138 GitHub stars~922 tokensUpdated 1 mo ago
    Auto-check passed
  • Architecture

    adamthewilliam/grepika

    This 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…

    138 GitHub stars~1.1k tokensUpdated 1 mo ago
    Auto-check passed
  • Diff Files

    adamthewilliam/grepika

    This 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…

    138 GitHub stars~819 tokensUpdated 1 mo ago
    Auto-check passed

Categories

Questions about Apply Pattern

What does Apply Pattern do?

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…. Apply Pattern is an agent skill from adamthewilliam/grepika. 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.

When should I use Apply Pattern?

Apply Pattern fits situations like: asks to apply a pattern; use a blueprint; implement [pattern] from [source]; what blueprints do I have.

How do I install Apply Pattern in Claude Code?

Run `npx skills add adamthewilliam/grepika --skill apply-pattern -a claude-code`. Or copy the skill folder (plugins/grepika/skills/apply-pattern in adamthewilliam/grepika) into .claude/skills/apply-pattern in your project. Claude Code loads it when a task matches its description.

How do I install Apply Pattern in Codex?

Run `npx skills add adamthewilliam/grepika --skill apply-pattern -a codex`. Or copy the skill folder (plugins/grepika/skills/apply-pattern in adamthewilliam/grepika) into .agents/skills/apply-pattern in your project. Codex loads it when a task matches its description.

Can I use Apply Pattern in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add adamthewilliam/grepika --skill apply-pattern -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/apply-pattern, .gemini/skills/apply-pattern, .github/skills/apply-pattern and .opencode/skills/apply-pattern in your project.

What does Apply Pattern need to run?

SKILL.md names no scripts, command-line tools or credentials: Apply Pattern is instructions for the agent only. Our summary lists: Node.js. Its frontmatter pre-approves these 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. Compatibility (from SKILL.md): Requires grepika MCP server..

Does Apply Pattern access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Apply Pattern safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Apply Pattern use?

Apply Pattern is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Apply Pattern use?

About 1.4k tokens (SKILL.md is roughly 5.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Apply Pattern?

Skills that share tags, products or a category with Apply Pattern: Debugging Executions (n8n-io/n8n, 207k stars), Analyze Logs (activepieces/activepieces, 25k stars), Release (PrefectHQ/fastmcp, 28k stars) and Claude Code Skill (codeaashu/claude-code, 3.4k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Apply Pattern?

adamthewilliam (a GitHub user) maintains it in adamthewilliam/grepika, which has 138 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on August 12, 2026.

Source: adamthewilliam/grepika on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.