PromptsMar 29, 2026·2 min read

Fabric — AI Prompt Patterns for Everything

Collection of 100+ AI prompt patterns for real-world tasks. Summarize articles, extract wisdom, analyze code, write essays, create presentations, and more.

TL;DR
Fabric offers 100+ reusable AI prompt patterns for summarization, analysis, writing, and more.
§01

What it is

Fabric is a collection of over 100 AI prompt patterns designed for real-world tasks. Each pattern is a carefully crafted system prompt that instructs an LLM to perform a specific task: summarize articles, extract key wisdom, analyze code quality, write essays, create presentations, rate content, and more. Fabric runs as a CLI tool that pipes content through these patterns.

This tool is for anyone who uses LLMs regularly and wants proven, reusable prompt templates instead of writing ad-hoc prompts for common tasks.

§02

How it saves time or tokens

Fabric patterns are optimized through community iteration. Each pattern includes specific output formatting instructions, reducing the back-and-forth of getting the LLM to produce useful output. The CLI interface pipes content directly, eliminating copy-paste workflows. Chaining patterns enables complex workflows like 'extract key points, then create a summary, then generate social posts.'

§03

How to use

  1. Install Fabric CLI.
  2. Configure your LLM API key.
  3. Pipe content through patterns.
  4. Chain patterns for multi-step workflows.
# Install Fabric
go install github.com/danielmiessler/fabric@latest

# Or via pip
pip install fabric-ai

# Summarize an article
curl -s https://example.com/article | fabric --pattern extract_wisdom

# Analyze code
cat main.py | fabric --pattern analyze_code

# Create a presentation outline
cat research.md | fabric --pattern create_presentation

# Chain patterns
cat article.md | fabric --pattern extract_wisdom | fabric --pattern create_summary
§04

Example

Using the extract_wisdom pattern:

$ echo 'Long article about AI safety...' | fabric --pattern extract_wisdom
§05

IDEAS

  • AI alignment research needs more funding
  • Interpretability tools are improving rapidly
  • Red-teaming is becoming standard practice
§06

INSIGHTS

  • The gap between AI capabilities and safety research is narrowing
  • Open-source safety tools lower the barrier to responsible development
§07

QUOTES

  • 'Safety is not a feature, it is a foundation'
§08

RECOMMENDATIONS

  • Invest in interpretability before scaling further
  • Mandate red-teaming for models above certain capability thresholds
§09

Related on TokRepo

§10

Common pitfalls

  • Pattern quality varies. Some community patterns are well-tested while others are rough drafts. Test patterns before relying on them.
  • Patterns are optimized for specific models. A pattern tuned for GPT-4 may produce different results with Claude or Gemini.
  • Long input content may exceed model context limits when combined with the pattern's system prompt.
  • The CLI requires API keys configured. Each invocation makes API calls, so costs accumulate with heavy use.
  • Chaining patterns multiplies API calls and token usage. Use chaining selectively for high-value workflows.

Frequently Asked Questions

How many patterns does Fabric include?+

Fabric includes over 100 patterns covering tasks like summarization, wisdom extraction, code analysis, essay writing, presentation creation, content rating, and more. The collection grows as the community contributes new patterns.

Can I create my own patterns?+

Yes. Patterns are text files with system prompts. Create a new file in the patterns directory, write your prompt, and Fabric makes it available as a named pattern. The repository accepts community contributions.

Does Fabric work with Claude?+

Yes. Fabric supports multiple LLM providers including OpenAI, Anthropic Claude, Google Gemini, and local models via Ollama. Configure your preferred provider in the settings.

Can I chain multiple patterns?+

Yes. Use Unix pipes to chain patterns. The output of one pattern becomes the input of the next. This enables multi-step workflows like extract, summarize, and format in one command.

Is Fabric suitable for automation?+

Yes. The CLI interface makes Fabric scriptable. Integrate it into shell scripts, cron jobs, or CI pipelines. Common automations include daily news digests and automated code review summaries.

Citations (3)
🙏

Source & Thanks

Created by Daniel Miessler. Licensed under MIT. danielmiessler/fabric — 28K+ GitHub stars

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.