Fabric Patterns - Intelligent Pattern Selection
When to Activate This Skill
- User mentions "fabric" or "fabric pattern"
- "What fabric pattern should I use for..."
- "Help me analyze/summarize/extract..."
- Processing content (articles, videos, podcasts, code)
- Creating structured outputs (summaries, reports, analyses)
- Transforming text between formats
- Security analysis, threat modeling, code review
- Any text-based workflow that could benefit from AI processing
What is Fabric?
Fabric is an open-source framework for augmenting human capabilities with AI. It organizes 242+ specialized AI prompts (called "Patterns") into task-based categories, making it easy to apply the right AI solution for any workflow.
Common usage: fabric --pattern <pattern_name>
Core Workflow: Pattern Selection
When user asks for help with Fabric:
1. Understand the Intent
Ask yourself:
- What is the user's primary goal? (extract, analyze, summarize, create, transform)
- What type of content? (text, code, video transcript, data)
- What output format? (summary, report, visualization, structured data)
- Is this a single step or multi-step workflow?
2. Match to Categories
EXTRACT - Pull specific information from content
extract_wisdom- Insights, ideas, quotes, habits from any contentextract_article_wisdom- Wisdom from articles specificallyextract_ideas- Novel concepts and applicationsextract_recommendations- Actionable advice and guidanceextract_questions- Q&A extractionextract_references- Citations and sources
SUMMARIZE - Condense content at various levels
summarize- General-purpose summarizationcreate_micro_summary- Concise one-sentence + key pointscreate_5_sentence_summary- Progressive detail levelsyoutube_summary- YouTube videos with timestampssummarize_paper- Academic papers with findings
ANALYSIS - Evaluate, assess, compare
analyze_claims- Truth evaluation with evidenceanalyze_paper- Scientific paper analysisanalyze_prose- Writing quality evaluationcompare_and_contrast- Side-by-side comparison tablesfind_logical_fallacies- Argument validity checkrate_content- Multi-dimensional quality scoring
DEVELOPMENT - Code and software workflows
explain_code- Code explanation and analysisreview_code- Comprehensive code reviewcreate_git_diff_commit- Smart commit messagessummarize_git_changes- Change summariescreate_coding_project- Project design with architecturewrite_pull-request- PR descriptions
SECURITY - Cybersecurity and threat analysis
create_stride_threat_model- STRIDE threat modelinganalyze_malware- Malware behavior analysisanalyze_threat_report- Threat intelligence extractioncreate_sigma_rules- Detection rule creationwrite_hackerone_report- Vulnerability reports
WRITING - Content creation and improvement
improve_writing- Enhance clarity and styleclean_text- Fix formatting and structuretweet- Convert to social media postscreate_formal_email- Professional email compositionwrite_essay- Essay creation in specific styles
VISUALIZE - Create diagrams and visual content
create_mermaid_visualization- Mermaid diagramscreate_markmap_visualization- Mind mapscreate_conceptmap- Interactive concept mapscreate_visualization- ASCII art with explanations
AI & PATTERNS - Meta-patterns for working with AI
suggest_pattern- Get pattern recommendations from Fabric itselfcreate_pattern- Design new custom patternsimprove_prompt- Enhance AI prompts
3. Provide Output
Format your response with:
🎯 Recommended Patterns
Primary Pattern: pattern_name
- Why: [Explanation of why this pattern fits]
- Command:
fabric --pattern pattern_name
- With input file:
fabric --pattern pattern_name < input.txt
- From clipboard (macOS):
pbpaste | fabric --pattern pattern_name
- From URL:
fabric -u https://example.com/article --pattern pattern_name
- From YouTube:
fabric -y "https://youtube.com/watch?v=VIDEO_ID" --pattern pattern_name
Alternative Patterns:
alt_pattern_1- [When to use this instead]alt_pattern_2- [Another approach]
🔗 Multi-Pattern Workflows
For complex tasks, suggest chaining patterns:
# Example: Deep content analysis pipeline
fabric --pattern extract_wisdom < article.txt > step1_wisdom.md
fabric --pattern capture_thinkers_work < step1_wisdom.md > step2_concepts.md
fabric --pattern label_and_rate < step2_concepts.md > final_categorized.md
📋 Ready-to-Use Scripts
Point to provided scripts in scripts/ directory:
fabric_run_pattern.sh- Run single pattern on file/directoryfabric_pipeline.sh- Chain multiple patterns together- Custom scripts for common workflows
4. Pattern Categories Reference
Quick category lookup (20+ categories):
- AI: ai, create_pattern, improve_prompt, suggest_pattern
- ANALYSIS: analyze_claims, analyze_paper, compare_and_contrast
- BUSINESS: create_prd, check_agreement, create_loe_document
- CONVERSION: convert_to_markdown, export_data_as_csv, translate
- DEVELOPMENT: explain_code, review_code, create_git_diff_commit
- EXTRACT: extract_wisdom, extract_ideas, extract_recommendations
- SECURITY: create_stride_threat_model, analyze_malware, analyze_threat_report
- SUMMARIZE: summarize, create_micro_summary, youtube_summary
- WRITING: improve_writing, clean_text, create_formal_email
- VISUALIZE: create_mermaid_visualization, create_markmap_visualization
Full pattern database available in skill frontmatter and reference files.
Common Usage Patterns
Basic Usage
# List all available patterns
fabric --list
# Update patterns to latest version
fabric --updatepatterns
# Stream results in real-time
fabric --stream --pattern pattern_name
# Save output to file
fabric --pattern pattern_name < input.txt > output.md
# Use with specific model
fabric --model gpt-4 --pattern pattern_name
Advanced Usage
# With context file for additional background
fabric --pattern pattern_name --context background.md < input.txt
# Multiple inputs from directory
cat articles/*.md | fabric --pattern extract_wisdom > all_wisdom.md
# Chain with other tools
curl -s https://api.example.com/data | jq '.content' | fabric --pattern analyze_claims
Custom Patterns
Users can create custom patterns in ~/.config/fabric/patterns/pattern-name/system.md
Suggest using create_pattern pattern to design new ones:
echo "I need a pattern that does X" | fabric --pattern create_pattern
Scripts Provided
fabric_run_pattern.sh
Run any pattern on a file or directory:
./scripts/fabric_run_pattern.sh extract_wisdom ./articles/
./scripts/fabric_run_pattern.sh summarize ./transcript.txt output.md
fabric_pipeline.sh
Chain patterns in sequence:
# Default pipeline: extract_wisdom → capture_thinkers_work → label_and_rate
./scripts/fabric_pipeline.sh ./articles/
# Edit script to customize pipeline patterns
Key Commands Quick Reference
# Pattern selection help
fabric --pattern suggest_pattern
# List patterns
fabric -l
# Update patterns
fabric -u
# Stream output
fabric -s --pattern <name>
# From clipboard
pbpaste | fabric -p <name>
# From URL
fabric -u <url> -p <name>
# From YouTube
fabric -y <url> -p <name>
# Save output
fabric -p <name> -o output.md
Best Practices
Start with
suggest_pattern- Let Fabric recommend patterns:echo "I want to extract key insights from research papers" | fabric --pattern suggest_patternUse streaming for long content - Get results faster:
fabric -s --pattern extract_wisdomChain patterns for deep analysis - Each pattern refines the previous output
Create custom patterns - For repeated specialized tasks
Keep patterns updated - Run
fabric --updatepatternsregularly
Examples
Example 1: Analyze Blog Post
# Copy blog post to clipboard, then:
pbpaste | fabric --stream --pattern analyze_claims
Example 2: Extract Wisdom from YouTube
fabric -y "https://youtube.com/watch?v=dQw4w9WgXcQ" --pattern extract_wisdom
Example 3: Code Review
git diff main | fabric --pattern review_code
Example 4: Create Threat Model
fabric --pattern create_stride_threat_model < system_design.md
Example 5: Multi-Step Research Analysis
# Pipeline approach
fabric -u https://research-paper-url.com --pattern summarize_paper > summary.md
fabric --pattern extract_wisdom < summary.md > wisdom.md
fabric --pattern create_markmap_visualization < wisdom.md > mindmap.md
Troubleshooting
Pattern not found: Run fabric --updatepatterns
No output: Check if fabric is configured with fabric --setup
Model errors: Verify API keys are set in ~/.config/fabric/.env
Want different model: Use --model flag or change default with fabric --changeDefaultModel
Reference Files
This skill includes:
- Complete pattern database with descriptions (
references/pattern-database.md) - Example scripts (
scripts/) - Fabric official documentation (
references/fabric-readme.md)
Pattern Database
For the complete categorized list of all 242+ patterns with descriptions, see:
$HOME/.claude/skills/productivity/fabric-patterns/references/pattern-database.md
Next Steps After Pattern Selection
- ✅ Run the suggested command
- 📄 Review the output
- 🔄 Chain with another pattern if needed
- 💾 Save results to appropriate location
- 🎨 Customize pattern or create new one if necessary