Fabric

From Microck/ordinary-claude-skills · View interactive version

Fabric is an AI agent skill from the GitHub repository Microck/ordinary-claude-skills. Intelligent pattern selection for Fabric CLI. Automatically selects the right pattern from 242+ specialized prompts based on your intent - threat modeling, analysis, summarization, content creation, extraction, and more. USE WHEN processing content, analyzing data, creating summaries, threat modelin

How to use this skill

Skill file

Fabric Skill

Setup Check - Fabric Repository

IMPORTANT: Before using this skill, verify the Fabric repository is available:

# Check if Fabric repo exists
if [ ! -d "$HOME/.claude/skills/fabric/fabric-repo" ]; then
  echo "Fabric repository not found. Cloning..."
  cd "$HOME/.claude/skills/fabric"
  git clone https://github.com/danielmiessler/fabric.git fabric-repo
  echo "Fabric repository cloned successfully."
else
  echo "Fabric repository found at $HOME/.claude/skills/fabric/fabric-repo"
fi

If the repo doesn't exist, clone it immediately before proceeding with any pattern selection.

When to Activate This Skill

Primary Use Cases:

The Goal: Select the RIGHT pattern from 242+ available patterns based on what you're trying to accomplish.

🎯 Pattern Selection Strategy

When a user requests Fabric processing, follow this decision tree:

1. Identify Intent Category

Threat Modeling & Security:

Summarization:

Wisdom Extraction:

Analysis:

Content Creation:

Improvement:

Rating/Evaluation:

2. Execute Pattern

# Basic format
fabric [input] -p [selected_pattern]

# From URL
fabric -u "URL" -p [pattern]

# From YouTube
fabric -y "YOUTUBE_URL" -p [pattern]

# From file
cat file.txt | fabric -p [pattern]

# Direct text
fabric "your text here" -p [pattern]

📚 Pattern Categories (242 Total)

Threat Modeling & Security (15 patterns)

Summarization (20 patterns)

Extraction (30+ patterns)

Analysis (35+ patterns)

Creation (50+ patterns)

Improvement (10 patterns)

Rating/Judgment (8 patterns)

🔄 Updating Patterns

The Fabric repository is included as a snapshot in ${PAI_DIR}/skills/fabric/fabric-repo/.

To update to latest patterns:

# Clone fresh Fabric repo
cd /tmp
git clone --depth 1 https://github.com/danielmiessler/fabric.git

# Copy new patterns to PAI
rm -rf ${PAI_DIR}/skills/fabric/fabric-repo
cp -r fabric ${PAI_DIR}/skills/fabric/fabric-repo

# Cleanup
rm -rf /tmp/fabric

Or install Fabric separately and use local patterns:

# If you have Fabric installed locally
go install github.com/danielmiessler/fabric@latest
fabric --updatepatterns
# Patterns will be in ~/.config/fabric/patterns/

To see all available patterns:

ls ${PAI_DIR}/skills/fabric/fabric-repo/data/patterns/
# OR from your local Fabric install:
ls ~/.config/fabric/patterns/

💡 Usage Examples

Threat Modeling:

# User: "Create a threat model for our new API"
fabric "API that handles user authentication and payment processing" -p create_threat_model

Summarization:

# User: "Summarize this blog post"
fabric -u "https://example.com/blog-post" -p summarize

# User: "Give me a 5-sentence summary"
fabric -u "https://example.com/article" -p create_5_sentence_summary

Wisdom Extraction:

# User: "Extract wisdom from this video"
fabric -y "https://youtube.com/watch?v=..." -p extract_wisdom

# User: "What are the main ideas?"
fabric -u "URL" -p extract_main_idea

Analysis:

# User: "Analyze this code for issues"
fabric "$(cat code.py)" -p analyze_code

# User: "Analyze these security claims"
fabric "security claims text" -p analyze_claims

🎯 Pattern Selection Decision Matrix

| User Request Contains | Likely Intent | Recommended Patterns |

|----------------------|---------------|----------------------|

| "threat model" | Security modeling | create_threat_model, create_stride_threat_model |

| "summarize", "summary" | Summarization | summarize, create_5_sentence_summary |

| "extract wisdom", "insights" | Wisdom extraction | extract_wisdom, extract_insights |

| "analyze [X]" | Analysis | analyze_[X] (match X to pattern) |

| "improve", "enhance" | Improvement | improve_writing, improve_prompt |

| "create [visualization]" | Visualization | create_mermaid_visualization, create_markmap_visualization |

| "rate", "judge", "evaluate" | Rating | rate_content, judge_output |

| "main idea", "core message" | Core extraction | extract_main_idea, extract_core_message |

🚀 Advanced Usage

Pipe content through Fabric:

cat article.txt | fabric -p extract_wisdom
pbpaste | fabric -p summarize
curl -s "https://..." | fabric -p analyze_claims

Process YouTube videos:

# Fabric handles download + transcription + processing
fabric -y "https://youtube.com/watch?v=..." -p youtube_summary

Chain patterns (manual):

# Extract then summarize
fabric -u "URL" -p extract_wisdom > wisdom.txt
cat wisdom.txt | fabric -p create_5_sentence_summary

📖 Supplementary Resources

Full Pattern List: ls ${PAI_DIR}/skills/fabric/fabric-repo/data/patterns/

Fabric Repo: ${PAI_DIR}/skills/fabric/fabric-repo/

Fabric Documentation: https://github.com/danielmiessler/fabric

Pattern Templates: See ${PAI_DIR}/skills/fabric/fabric-repo/data/patterns/official_pattern_template/

🔑 Key Insight

The skill's value is in selecting the RIGHT pattern for the task.

When user says "Create a threat model using Fabric", your job is to:

  1. Recognize "threat model" intent
  2. Know available options: create_threat_model, create_stride_threat_model, create_threat_scenarios
  3. Select the best match (usually create_threat_model unless STRIDE specified)
  4. Execute: fabric "[content]" -p create_threat_model

Not: "Here are the patterns, pick one"

Instead: "I'll use create_threat_model for this" → execute immediately

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.