com um clique
create-pattern
// 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.
// 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.
Review pull requests for the awesome-agentic-patterns repository. Use when asked to validate a PR, assess whether a contribution fits the repo, inspect pattern submissions under patterns/, check merge readiness, repair a small submission issue on top of a contributor branch, draft a polite contributor comment, or apply the repository's pattern-first and non-promotional contribution policy to a GitHub pull request.
Search arXiv for academic papers describing agentic AI patterns. Use when user asks to find new patterns from academic literature, search arXiv, discover patterns from papers, or review academic sources for pattern extraction.
| name | create-pattern |
| description | 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. |
| allowed-tools | ["Read","Write","Glob","Grep","Bash","mcp__web_reader__webReader","mcp__4_5v_mcp__analyze_image"] |
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.
Input: A source (URL, PDF file, YouTube link, codebase path, or pasted text)
Process:
Output: New pattern file OR updated existing pattern + build confirmation
Detect the input type and process accordingly:
Use mcp__web_reader__webReader with the URL:
{"url": "USER_PROVIDED_URL", "return_format": "markdown"}
Use Read tool with the PDF path.
Use mcp__web_reader__webReader with the YouTube URL (transcript extraction).
Use Glob to find key files, then Read to analyze:
**/*.md - Documentation**/*.py - Python implementation**/*.ts - TypeScript implementationAnalyze directly (no tool needed).
From the source content, extract:
Generate candidate metadata:
Search for similar patterns in patterns/ directory:
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:
For each existing pattern, assess similarity using these signals:
Primary Signals (weight: 30% each)
Secondary Signals (weight: 10% each) 4. Tag Overlap - Shared keywords? 5. Source/Author - Same contributor's follow-up work? 6. Title - Similar naming/description?
Score = Σ(matching_signals × weights)
List top 3 matching patterns with:
Based on confidence score:
Update the top-matching existing pattern with new source.
Create a brand new pattern file.
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
---
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, ...]
---
Convert title to kebab-case:
tree-of-thought-reasoningCreate 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]
[Extracted usage guidance]
[Extracted pros and cons]
---
## 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
Append to the ## References section:
## References
* [Existing Source](existing-url)
* [New Source Title](new-url) # Add this
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]
Write the updated content back to patterns/{existing-slug}.md
cd apps/web && bun run build-data
Check for:
apps/web/public/patterns/---
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]
---
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
based_on already includes the source, just inform the user