Prompts2026年3月29日·1 分钟阅读

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.

Agent 就绪

先审查再安装

这个资产需要先审查。复制的指令会要求 Agent dry-run、列出写入项,确认后再继续。

Needs Confirmation · 64/100策略:需确认
Agent 入口
任意 MCP/CLI Agent
类型
Prompt
安装
Single
信任
信任等级:Community
入口
Fabric — AI Prompt Patterns for Everything
先审查命令
npx -y tokrepo@latest install 6692e725-30db-45bd-93c5-65d28891bf2a --target codex

先 dry-run,确认写入项后再运行此命令。

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.

常见问题

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.

引用来源 (3)
🙏

来源与感谢

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

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产