fabric · diff

v1.1.0 to v2.0.0

235 added, 163 removed. Audit B to A.

---
name: fabric
- description: AI prompt orchestration CLI using reusable Patterns. Use for YouTube summarization, document analysis, content extraction, code explanation, writing assistance, and any AI task via stdin/stdout piping across 20+ providers.
+ description: >
+ Pattern-first CLI orchestration with Daniel Miessler's Fabric for turning stdin,
+ files, URLs, transcripts, notes, logs, and scraped text into repeatable AI
+ transforms such as summaries, extraction, rewriting, classification, and custom
+ prompt workflows. Use when the user wants reusable named patterns, shell-pipe
+ composition, custom pattern packs, or Fabric's REST/server mode — not generic
+ one-off chat prompting or repo-editing agents. Triggers on: fabric, pattern
+ library, summarize transcript, extract wisdom, custom pattern, pipe text through
+ AI, stdin prompt workflow, pattern pack, fabric --serve.
+ allowed-tools: Read Write Bash Grep Glob
+ compatibility: >
+ Works on macOS, Linux, and Windows where the Fabric CLI can be installed and
+ configured. Best for CLI-centric users who already have provider keys or local
+ model access and want repeatable prompt transforms rather than ad hoc chat.
license: CC-BY-4.0
- compatibility: All platforms. Requires fabric CLI installed (Go-based binary or Homebrew). Works with OpenAI, Anthropic, Google, Azure, Bedrock, Groq, Ollama, and 20+ other AI providers.
metadata:
- version: 1.1.0
+ version: "2.0.0"
author: supercent-io
keyword: fabric
platforms: All platforms
- tags: fabric, patterns, ai-prompts, youtube, summarize, extract-wisdom, piping, cli, multi-provider, openai, claude, gemini, ollama
- allowed-tools: Read Write Bash Grep Glob
+ tags: fabric, patterns, ai-prompts, prompt-orchestration, content-transforms, cli, piping, summarize, extract, custom-patterns, multi-provider
+ source: Daniel Miessler Fabric README + REST API docs + GitHub issue survey (2026-04-15)
---
# Fabric
- Fabric is an open-source AI prompt orchestration framework by Daniel Miessler. It provides a library of reusable AI prompts called **Patterns** — each designed for a specific real-world task — wired into a simple Unix pipeline with stdin/stdout.
-
- ## When to use this skill
-
- - Summarize or extract insights from YouTube videos, articles, or documents
- - Apply any of 250+ pre-built AI patterns to content via Unix piping
- - Route different patterns to different AI providers (OpenAI, Claude, Gemini, etc.)
- - Create custom patterns for repeatable AI workflows
- - Run Fabric as a REST API server for integration with other tools
- - Process command output, files, or clipboard content through AI patterns
- - Use as an AI agent utility — pipe any tool output through patterns for intelligent summarization
+ Use this skill when the real job is **running a reusable named AI transform over text/content in a CLI workflow**.
- ## Instructions
+ Fabric is not just "another AI terminal client". Its strength is the combination of:
+ 1. a large **pattern library** organized around real jobs,
+ 2. **stdin / file / transcript / URL-adjacent workflows**, and
+ 3. the ability to turn repeated prompt behavior into a **maintained custom pattern pack**.
- ### Step 1: Install Fabric
+ Read these support docs before choosing the workflow:
+ - [references/routing-and-mode-selection.md](references/routing-and-mode-selection.md)
+ - [references/install-and-provider-setup.md](references/install-and-provider-setup.md)
+ - [references/pattern-workflow-recipes.md](references/pattern-workflow-recipes.md)
- ```bash
- # macOS/Linux (one-liner)
- curl -fsSL https://raw.githubusercontent.com/danielmiessler/fabric/main/scripts/installer/install.sh | bash
+ ## When to use this skill
+ - The user explicitly wants **Fabric** or a **pattern-first prompt CLI**.
+ - The job is to run a reusable transform over stdin, files, transcripts, clipboard text, notes, logs, or article text.
+ - The user wants a **named pattern** such as summarize, extract, explain, analyze, or rewrite instead of improvising a new prompt each time.
+ - The user wants to create or curate **custom patterns** for a repeated workflow.
+ - The user wants to run Fabric as a lightweight **REST API/server** for an existing pipeline.
+ - The user needs help deciding **which pattern / mode / provider / shell composition** to use for a repeatable content-transform workflow.
- # macOS via Homebrew
- brew install fabric-ai
+ ## When not to use this skill
+ - **The user only needs a one-off prompt answered in the current agent session** → use the current model directly; Fabric would add unnecessary setup.
+ - **The main job is repo-aware coding, code editing, or git-driven implementation** → use a coding-assistant skill instead of forcing Fabric into repo editing.
+ - **The main job is upstream content acquisition or scraping reliability** → solve the fetch/transcript/extraction layer first, then use Fabric on the clean text.
+ - **The main job is fully deterministic batch automation or application logic** → prefer a script or workflow automation layer with Fabric as one step, not the whole substrate.
+ - **The main job is general model/provider setup without a Fabric-specific workflow** → use the more relevant provider/platform skill first.
- # Windows
- winget install danielmiessler.Fabric
+ ## Core idea
+ Think of Fabric as a **pattern router for text transforms**:
- # After install — configure API keys and default model
- fabric --setup
+ ```text
+ collect text → choose pattern → run transform → post-edit or chain next step
```
- ### Step 2: Learn the core pipeline workflow
+ Typical wins:
+ - transcript → summary
+ - article → extracted insights
+ - log output → issue analysis
+ - rough notes → cleaner outline
+ - source material → custom repeatable workflow
- Fabric works as a Unix pipe. Feed content through stdin and specify a pattern:
+ Typical non-wins:
+ - vague chatting with no repeated workflow
+ - repo editing / autonomous coding
+ - treating Fabric as the best tool for raw scraping, OCR, or deterministic ETL
- ```bash
- # Summarize a file
- cat article.txt | fabric -p summarize
+ ## Instructions
- # Stream output in real time
- cat document.txt | fabric -p extract_wisdom --stream
+ ### Step 1: Classify the job before reaching for a pattern
+ Normalize the request first.
- # Pipe any command output through a pattern
- git log --oneline -20 | fabric -p summarize
+ ```yaml
+ fabric_intake:
+ primary_mode: quick-transform | pattern-selection | custom-pattern | shell-pipeline | serve-api | migration-review
+ input_shape: stdin-text | file | clipboard | transcript | url-derived-text | logs | code-snippet | mixed | unknown
+ output_shape: summary | extraction | rewrite | explanation | classification | structured-markdown | custom
+ repetition_level: one-off | recurring | team-shared | embedded-in-script
+ provider_need: default | specific-provider | local-model | server-mode | unknown
+ reliability_need: low | medium | high
+ ```
- # Process clipboard (macOS)
- pbpaste | fabric -p summarize
+ Choose exactly one primary mode for the run:
+ - `quick-transform` → run or design one Fabric transform over already-available text
+ - `pattern-selection` → decide which existing pattern or family to use
+ - `custom-pattern` → create or tune a reusable pattern for repeated work
+ - `shell-pipeline` → place Fabric cleanly inside a larger terminal workflow
+ - `serve-api` → expose Fabric over HTTP for another tool or local service
+ - `migration-review` → decide whether Fabric is the right tool at all versus a general LLM CLI, script, or coding assistant
- # Pipe from curl
- curl -s https://example.com/article | fabric -p summarize
- ```
+ ### Step 2: Make sure the input layer is honest
+ Before discussing patterns, answer these:
+ 1. **Where does the text actually come from?** clipboard, file, logs, transcript, article text, command output?
+ 2. **Is the text already clean enough to send to Fabric?**
+ 3. **Does the user need one transform or a repeatable workflow?**
+ 4. **Is provider/model setup already available?**
- ### Step 3: Discover patterns
+ If the text is not yet available or still messy HTML/PDF/transcript noise, do not pretend Fabric alone solves that. Describe the upstream clean-text step first.
- ```bash
- # List all available patterns
- fabric -l
+ ### Step 3: Choose the right mode
- # Update patterns from the repository
- fabric -u
+ #### A. Quick-transform
+ Use when the user already has text and needs one strong transform.
- # Search patterns by keyword
- fabric -l | grep summary
- fabric -l | grep code
- fabric -l | grep security
- ```
+ Good deliverables:
+ - exact Fabric command
+ - recommended pattern
+ - minimal pre-clean step if needed
+ - expected output shape
+ - one follow-up chain if useful
- Key patterns:
+ Examples:
+ - `cat transcript.txt | fabric -p summarize`
+ - `pbpaste | fabric -p extract_wisdom`
+ - `git diff HEAD~1 | fabric -p explain_code`
- | Pattern | Purpose |
- |---------|---------|
- | `summarize` | Summarize any content into key points |
- | `extract_wisdom` | Extract insights, quotes, habits, and lessons |
- | `analyze_paper` | Break down academic papers into actionable insights |
- | `explain_code` | Explain code in plain language |
- | `write_essay` | Write essays from a topic or rough notes |
- | `clean_text` | Remove noise and formatting from raw text |
- | `analyze_claims` | Fact-check and assess credibility of claims |
- | `create_summary` | Create a structured, markdown summary |
- | `rate_content` | Rate and score content quality |
- | `label_and_rate` | Categorize and score content |
- | `improve_writing` | Polish and improve text clarity |
- | `create_tags` | Generate relevant tags for content |
- | `ask_secure_by_design` | Review code or systems for security issues |
- | `capture_thinkers_work` | Extract the core ideas of a thinker or author |
- | `create_investigation_visualization` | Create a visual map of complex investigations |
+ #### B. Pattern-selection
+ Use when the user knows the material but not the best pattern.
- ### Step 4: Process YouTube videos
+ Choose by job, not by novelty:
+ - **summarize** → compress source into a readable brief
+ - **extract / wisdom / questions / claims** → pull structured ideas out of the source
+ - **explain / analyze** → clarify code, prose, logs, incidents, or decisions
+ - **rewrite / improve / repurpose** → convert one artifact into another tone or shape
+ - **specialized patterns** → use only when the input and output are clearly domain-matched
- ```bash
- # Summarize a YouTube video
- fabric -y "https://youtube.com/watch?v=VIDEO_ID" -p summarize
+ Do not dump the entire pattern catalog. Return the top 1-3 plausible patterns and why.
- # Extract key insights from a video
- fabric -y "https://youtube.com/watch?v=VIDEO_ID" -p extract_wisdom
+ #### C. Custom-pattern
+ Use when the request will recur.
- # Get transcript only (no pattern applied)
- fabric -y "https://youtube.com/watch?v=VIDEO_ID" --transcript
+ Prefer a custom pattern when:
+ - the user repeats the same workflow often,
+ - stock patterns are close but not precise enough,
+ - tone/output rules matter,
+ - the workflow will be shared across a team.
- # Transcript with timestamps
- fabric -y "https://youtube.com/watch?v=VIDEO_ID" --transcript-with-timestamps
+ Minimum custom-pattern scaffold:
+ ```text
+ IDENTITY AND PURPOSE
+ STEPS
+ OUTPUT INSTRUCTIONS
+ INPUT
```
- ### Step 5: Create custom patterns
-
- Each pattern is a directory with a `system.md` file inside `~/.config/fabric/patterns/`. The body should follow this structure:
+ Good custom-pattern work includes:
+ - pattern name
+ - exact use case
+ - system.md skeleton
+ - example invocation
+ - notes about when to fork versus reuse a stock pattern
- ```bash
- mkdir -p ~/.config/fabric/patterns/my-pattern
- cat > ~/.config/fabric/patterns/my-pattern/system.md << 'EOF'
- # IDENTITY AND PURPOSE
+ #### D. Shell-pipeline
+ Use when Fabric is only one step inside a larger terminal workflow.
- You are an expert at [task]. Your job is to [specific goal].
+ Common pattern:
+ ```text
+ fetch or prepare input → optional cleanup → fabric pattern → save / chain / post-edit
+ ```
- Take a step back and think step by step about how to achieve the best possible results by following the STEPS below.
+ Good operator guidance includes:
+ - what produces the input,
+ - where Fabric sits,
+ - what command or file receives the output,
+ - what still requires a human or another tool.
- # STEPS
+ #### E. Serve-api
+ Use when another local tool or script should call Fabric over HTTP.
- 1. [Step 1]
- 2. [Step 2]
+ Core commands:
+ ```bash
+ fabric --serve
+ curl http://localhost:8080/patterns/names
+ ```
- # OUTPUT INSTRUCTIONS
+ Key decisions:
+ - whether to add `--api-key`
+ - local-only vs shared-machine use
+ - whether the caller needs pattern CRUD, pattern listing, or plain chat completion
+ - whether custom patterns must resolve from the correct directory
- - Only output Markdown.
- - [Format instruction 2]
- - Do not give warnings or notes; only output the requested sections.
+ #### F. Migration-review
+ Use when the user is really deciding among Fabric, a general LLM CLI, or a coding assistant.
- # INPUT
+ Default boundary:
+ - **Fabric** → reusable pattern-driven transforms on external text/content
+ - **general LLM CLI** → flexible ad hoc prompting without a strong pattern library
+ - **coding assistant** → repo-aware editing and implementation work
+ - **script/workflow automation** → deterministic batch logic around multiple steps
- INPUT:
- EOF
- ```
+ ### Step 4: Return an operator packet, not a product brochure
+ Default output should include:
+ - chosen Fabric mode
+ - input source and cleanup assumptions
+ - recommended pattern(s) or custom-pattern path
+ - exact command(s) or file layout
+ - provider/model note if relevant
+ - route-out if Fabric is the wrong tool
- Use it immediately:
+ Use this structure:
- ```bash
- echo "input text" | fabric -p my-pattern
- cat file.txt | fabric -p my-pattern --stream
- ```
+ ```text
+ # Fabric Workflow Packet
- ### Step 6: Multi-provider routing and advanced usage
+ ## Mode
+ - quick-transform | pattern-selection | custom-pattern | shell-pipeline | serve-api | migration-review
- ```bash
- # Run as REST API server (port 8080 by default)
- fabric --serve
+ ## Input
+ - source: ...
+ - cleanup needed: ...
+ - assumptions: ...
- # Use web search capability
- fabric -p analyze_claims --search "claim to verify"
+ ## Recommended Fabric move
+ - pattern / custom pattern / server mode: ...
+ - why this is the right fit: ...
- # Per-pattern model routing in ~/.config/fabric/.env
- FABRIC_MODEL_PATTERN_SUMMARIZE=anthropic|claude-opus-4-5
- FABRIC_MODEL_PATTERN_EXTRACT_WISDOM=openai|gpt-4o
- FABRIC_MODEL_PATTERN_EXPLAIN_CODE=google|gemini-2.0-flash
+ ## Command or artifact
+ - exact command(s) here
- # Create shell aliases for frequently used patterns
- alias summarize="fabric -p summarize"
- alias wisdom="fabric -p extract_wisdom"
- alias explain="fabric -p explain_code"
+ ## Output shape
+ - summary / extraction / rewrite / explanation / structured markdown / custom
- # Chain patterns
- cat paper.txt | fabric -p summarize | fabric -p extract_wisdom
+ ## Risks or friction
+ - provider setup / token limits / messy input / post-editing / custom pattern drift
- # Save output
- cat document.txt | fabric -p extract_wisdom > insights.md
+ ## Route-outs
+ - if Fabric is not the whole answer, name the next tool or workflow layer
```
- ### Step 7: Use in AI agent workflows
+ ### Step 5: Be explicit about the practical friction
+ Call these out when relevant:
+ - provider or vendor configuration tax
+ - pattern discoverability in a large catalog
+ - long-input limits or messy source material
+ - the difference between a helpful first pass and a finished artifact
+ - when a shell wrapper or script is the right next step
- Fabric is a powerful utility for AI agents — pipe any tool output through patterns for intelligent analysis:
+ ### Step 6: Keep the skill centered on repeatability
+ Good Fabric advice should increase **reuse**.
- ```bash
- # Analyze test failures
- npm test 2>&1 | fabric -p analyze_logs
+ Prefer:
+ - a named pattern over a vague instruction
+ - one top recommendation over a laundry list
+ - a reusable custom-pattern scaffold over a one-off clever prompt
+ - shell composition guidance over marketing copy about "AI-powered everything"
- # Summarize git history for a PR description
- git log --oneline origin/main..HEAD | fabric -p create_summary
+ ## Output format
+ Always return a **short operator-style Fabric workflow packet**.
- # Explain a code diff
- git diff HEAD~1 | fabric -p explain_code
+ Required qualities:
+ - one primary mode
+ - a clean boundary between Fabric and adjacent tools
+ - exact invocation or custom-pattern scaffold
+ - explicit assumptions about input quality
+ - realistic notes about setup, provider choice, or post-editing
- # Summarize build errors
- make build 2>&1 | fabric -p summarize
+ ## Examples
- # Analyze security vulnerabilities in code
- cat src/auth.py | fabric -p ask_secure_by_design
+ ### Example 1: Transcript to summary
+ **Input**
+ > I already have a podcast transcript. I want to pipe it through Fabric and get a concise summary plus action items.
- # Process log files
- cat /var/log/app.log | tail -100 | fabric -p analyze_logs
- ```
+ **Output sketch**
+ - Mode: `quick-transform`
+ - Pattern recommendation: `summarize` or an extraction-oriented pattern
+ - Command: `cat transcript.txt | fabric -p summarize`
+ - Output shape: markdown summary + explicit note if a second pass is needed for action items
- #### REST API server mode
+ ### Example 2: Custom research digest pattern
+ **Input**
+ > We keep summarizing competitor articles the same way every week. I want a reusable Fabric pattern for this.
- Run Fabric as a microservice and call it from other tools:
+ **Output sketch**
+ - Mode: `custom-pattern`
+ - Deliver `system.md` skeleton with sections for thesis, notable claims, GTM implications, and open questions
+ - Include example directory layout under the user's pattern directory
- ```bash
- # Start server
- fabric --serve --port 8080
+ ### Example 3: Fabric or something else?
+ **Input**
+ > Should I use Fabric, a generic LLM CLI, or a coding assistant for this workflow?
- # Call via HTTP
- curl -X POST http://localhost:8080/chat \
- -H "Content-Type: application/json" \
- -d '{"prompts":[{"userInput":"Summarize this","patternName":"summarize"}]}'
- ```
+ **Output sketch**
+ - Mode: `migration-review`
+ - Compare by workflow shape
+ - Route repo-editing to coding assistant, ad hoc chat to generic CLI, reusable transforms to Fabric
## Best practices
-
- - Run `fabric -u` before first use and regularly to get the latest community patterns.
- - Use `--stream` for long content to see results progressively instead of waiting.
- - Create shell aliases (`alias wisdom="fabric -p extract_wisdom"`) for your most-used patterns.
- - Use per-pattern model routing to optimize cost vs. quality for each task type.
- - Keep custom patterns in `~/.config/fabric/patterns/` — they persist across updates.
- - For YouTube, transcript extraction works best with videos that have captions enabled.
- - Chain patterns with Unix pipes for multi-step processing workflows.
- - Follow the IDENTITY → STEPS → OUTPUT INSTRUCTIONS structure when creating custom patterns.
+ 1. Treat Fabric as a **pattern-first transform layer**, not a generic terminal chatbot.
+ 2. Solve messy input acquisition before blaming the pattern.
+ 3. Return the top 1-3 pattern choices instead of dumping the full catalog.
+ 4. Reach for a custom pattern when the workflow repeats or needs a stable output shape.
+ 5. Use shell composition honestly; Fabric often works best as one step in a larger pipeline.
+ 6. For server mode, specify auth/address assumptions instead of just saying `fabric --serve`.
+ 7. If the task is really coding-assistant work or deterministic automation, route out early.
## References
-
- - [Fabric GitHub](https://github.com/danielmiessler/Fabric)
- - [Pattern Library](https://github.com/danielmiessler/Fabric/tree/main/patterns)
- - [Installation Guide](https://github.com/danielmiessler/Fabric#installation)
- - [Custom Pattern Guide](https://github.com/danielmiessler/Fabric/blob/main/patterns/README.md)
+ - [Fabric upstream README](https://github.com/danielmiessler/Fabric/blob/main/README.md)
+ - [Fabric REST API docs](https://raw.githubusercontent.com/danielmiessler/Fabric/main/docs/rest-api.md)
+ - [references/routing-and-mode-selection.md](references/routing-and-mode-selection.md)
+ - [references/install-and-provider-setup.md](references/install-and-provider-setup.md)
+ - [references/pattern-workflow-recipes.md](references/pattern-workflow-recipes.md)