create-pattern

1
0
Source

Analyze sources (blog posts, PDFs, YouTube videos, codebases, pasted text) for agentic patterns, match against 105+ existing patterns, create new patterns or update existing with new sources and insights.

Install

mkdir -p .claude/skills/create-pattern && curl -L -o skill.zip "https://mcp.directory/api/skills/download/4074" && unzip -o skill.zip -d .claude/skills/create-pattern && rm skill.zip

Installs to .claude/skills/create-pattern

About this skill

Pattern Ingestion Skill

This skill intelligently analyzes sources for agentic AI patterns, matches them against existing patterns in the repository, and either creates new patterns or updates existing ones with additional sources and insights.

Overview

Input: A source (URL, PDF file, YouTube link, codebase path, or pasted text)

Process:

  1. Ingest and analyze the source
  2. Extract pattern concepts
  3. Match against existing 105+ patterns
  4. Decide: create new OR update existing
  5. Execute and build

Output: New pattern file OR updated existing pattern + build confirmation


Phase 1: Ingest Source

Detect the input type and process accordingly:

URL (blog post, documentation, article)

Use mcp__web_reader__webReader with the URL:

{"url": "USER_PROVIDED_URL", "return_format": "markdown"}

PDF File

Use Read tool with the PDF path.

YouTube Video

Use mcp__web_reader__webReader with the YouTube URL (transcript extraction).

Codebase/Repository

Use Glob to find key files, then Read to analyze:

  • **/*.md - Documentation
  • **/*.py - Python implementation
  • **/*.ts - TypeScript implementation
  • README files

Pasted Text

Analyze directly (no tool needed).


Phase 2: Analyze & Extract

From the source content, extract:

  1. Pattern Title - What is this pattern called?
  2. Problem Statement - What challenge does it solve?
  3. Solution - What's the core approach/mechanism?
  4. Category - Which of 8 categories fits best?
  5. Source URL - The original source
  6. Author/Originator - Who created/originated this?
  7. Tags - 3+ relevant keywords
  8. Key Insights - Any novel techniques, constraints, trade-offs

Generate candidate metadata:

  • Title: descriptive, concise
  • Category: select from allowed categories (see reference below)
  • Tags: generate 5-10 relevant tags
  • Status: default to "emerging" unless evidence suggests otherwise

Phase 3: Match Against Existing Patterns

Search for similar patterns in patterns/ directory:

Step 3a: Read All Pattern Frontmatter

Use Glob to find all .md files in patterns/, then Grep with output_mode content to extract frontmatter from each:

grep -A 10 "^title:" patterns/*.md

Or read multiple pattern files in parallel to compare:

  • Problem statements
  • Solution approaches
  • Categories
  • Tags
  • Sources

Step 3b: Semantic Comparison

For each existing pattern, assess similarity using these signals:

Primary Signals (weight: 30% each)

  1. Problem Statement - Same fundamental challenge?
  2. Solution Mechanism - Same core approach/technique?
  3. Category - Same category?

Secondary Signals (weight: 10% each) 4. Tag Overlap - Shared keywords? 5. Source/Author - Same contributor's follow-up work? 6. Title - Similar naming/description?

Step 3c: Calculate Confidence Score

Score = Σ(matching_signals × weights)
  • All 3 primary match → 90%+ confidence
  • 2 primary + 1+ secondary → 70-90% confidence
  • 1 primary + 2+ secondary → 50-70% confidence
  • 0-1 primary only → <50% confidence

Step 3d: Identify Top Matches

List top 3 matching patterns with:

  • Pattern title and file path
  • Confidence score
  • Matching rationale (which signals matched)

Phase 4: Decision

Based on confidence score:

High Confidence (>80%) → Update Existing

Update the top-matching existing pattern with new source.

Low Confidence (<50%) → Create New

Create a brand new pattern file.

Medium Confidence (50-80%) → Ask User

Present the top match and ask:

This source seems related to:
- [Match Pattern] (X% confidence)
  - Similar problem: [problem summary]
  - Similar solution: [solution summary]

Should I:
1. Create a new pattern
2. Update the existing pattern with this new source

Phase 5a: Create New Pattern

Step 5a-1: Generate Metadata

---
title: "Extracted Title"
status: emerging
authors: ["Your Name (@yourusername)"]
based_on: ["Originator Name (Source/Context)"]
category: "Selected Category"
source: "SOURCE_URL"
tags: [tag1, tag2, tag3, ...]
---

Step 5a-2: Generate Slug

Convert title to kebab-case:

  • Lowercase
  • Spaces → hyphens
  • Remove special characters
  • Example: "Tree of Thought Reasoning" → tree-of-thought-reasoning

Step 5a-3: Write Pattern File

Create patterns/{slug}.md with structure:

---
title: "Title"
status: emerging
authors: ["Your Name (@yourusername)"]
based_on: ["Originator (Source)"]
category: "Category"
source: "URL"
tags: [tag1, tag2, tag3]
---

## Problem
[Extracted problem statement]

## Solution
[Extracted solution description]

- Key components: [list]
- Mechanism: [describe]

```pseudo
[Optional: pseudocode if helpful]

How to use it

[Extracted usage guidance]

Trade-offs

[Extracted pros and cons]

  • Pros: [benefits]
  • Cons: [drawbacks]

References


---

## Phase 5b: Update Existing Pattern

### Step 5b-1: Read Existing Pattern
Read the matched pattern file at `patterns/{existing-slug}.md`

### Step 5b-2: Update Frontmatter

**Add to `based_on` array:**
```yaml
based_on:
  - "Existing Source (Existing Context)"
  - "New Originator (New Source/Context)"  # Add this

Add new tags (if not duplicates):

tags:
  - existing-tag
  - new-tag-from-source  # Add unique new tags

Step 5b-3: Add to References Section

Append to the ## References section:

## References
* [Existing Source](existing-url)
* [New Source Title](new-url)  # Add this

Step 5b-4: Auto-Expand Content (If Applicable)

IF the new source adds substantial new insights (not just a citation):

To Solution section:

## Solution
[existing content...]

**Additional insights from [New Source]:**
[Extracted new insights with attribution]

To How to use it section:

## How to use it
[existing content...]

**According to [New Source]:**
[New usage guidance or implementation details]

To Trade-offs section:

## Trade-offs
* **Pros:** [existing..., new pros from source]
* **Cons:** [existing..., new cons from source]

Step 5b-5: Write Updated File

Write the updated content back to patterns/{existing-slug}.md


Phase 6: Build

Step 6-1: Run Build Script

cd apps/web && bun run build-data

Step 6-2: Verify Success

Check for:

  • Pattern JSON files updated in apps/web/public/patterns/
  • No error messages

Reference: Allowed Values

Categories (8 options)

  • Orchestration & Control
  • Context & Memory
  • Feedback Loops
  • Learning & Adaptation
  • Reliability & Eval
  • Security & Safety
  • Tool Use & Environment
  • UX & Collaboration
  • Uncategorized

Status Values (7 options)

  • proposed - Initial concept
  • emerging - Early adoption
  • established - Proven approach
  • validated-in-production - Production-tested
  • best-practice - Industry standard
  • experimental-but-awesome - Novel but effective
  • rapidly-improving - Fast-evolving

Front-matter Template

---
title: "Pattern Title"
status: emerging
authors: ["Contributor Name (@username)"]
based_on: ["Originator Name (Source Context)"]
category: "Category Name"
source: "https://example.com/source"
tags: [tag1, tag2, tag3]
---

Output Summary

After completion, provide:

For New Pattern:

✅ Created new pattern: patterns/{slug}.md
- Title: [title]
- Category: [category]
- Tags: [tags]

Next steps:
1. Review and edit the pattern file for completeness
2. Run: cd apps/web && bun run dev
3. Commit: git add patterns/{slug}.md

For Updated Pattern:

✅ Updated existing pattern: patterns/{slug}.md
- Added source to based_on: [source]
- Added [N] new tags
- [Expanded Solution/How-to sections]

Next steps:
1. Review the updated pattern file
2. Run: cd apps/web && bun run dev
3. Commit: git add patterns/{slug}.md

Tips

  • When in doubt, ask the user - Pattern matching can be nuanced
  • Preserve existing content - When updating, don't remove or overwrite existing insights
  • Clear attribution - Always cite sources when adding new content
  • Tag thoughtfully - Tags help with future matching
  • Check for duplicates - If based_on already includes the source, just inform the user

You might also like

flutter-development

aj-geddes

Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.

643969

drawio-diagrams-enhanced

jgtolentino

Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.

591705

ui-ux-pro-max

nextlevelbuilder

"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."

318399

godot

bfollington

This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.

340397

nano-banana-pro

garg-aayush

Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.

452339

fastapi-templates

wshobson

Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.

304231

Stay ahead of the MCP ecosystem

Get weekly updates on new skills and servers.