agentleFS
strikersamstrikersam/autonomous-ai-agency/.claude/skills/fabric-patterns/SKILL.md

fabric-patterns

Skill12 starsChanged 29 days agoMITView on GitHub

Implements a Fabric-like reusable prompt pattern system. Allows storing, retrieving, and composing prompt patterns for consistent AI interactions.

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 5 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When you need to reuse a specific prompt structure multiple times

    line 23
  2. Distinctive:

    When you want to compose complex prompts from simpler patterns (stitching)

    line 24
  3. Distinctive:

    When implementing agent behaviors that benefit from standardized prompt templates

    line 25
  4. Distinctive:

    Before creating ad-hoc prompts that could be standardized

    line 26
  5. Very specific:

    Use the list_patterns tool to see all available patterns.

    line 59
  6. Very specific:

    Use the get_pattern tool to retrieve a pattern's content.

    line 62
  7. Very specific:

    Use the apply_pattern tool to render a pattern with specific variable values.

    line 65
  8. Very specific:

    Use the stitch_patterns tool to combine multiple patterns in sequence, where the output of one pattern becomes the input to the next.

    line 68
  9. Distinctive:

    Create new Markdown files in the patterns directory following the format above.

    line 72

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Skill: fabric-patterns

Purpose

Provides a reusable prompt pattern system inspired by Fabric (danielmiessler/fabric). Enables agents to store, retrieve, and compose prompt patterns for consistent and efficient AI interactions.

When to Use

  • When you need to reuse a specific prompt structure multiple times
  • When you want to compose complex prompts from simpler patterns (stitching)
  • When implementing agent behaviors that benefit from standardized prompt templates
  • Before creating ad-hoc prompts that could be standardized

Directory Structure

This skill creates and manages:

.claude/skills/fabric-patterns/
  patterns/                 ← Directory for storing pattern files
    summarize.md            ← Example pattern: summarize content
    extract_wisdom.md       ← Example pattern: extract key insights
    ...                     ← Other patterns
  PATTERN_INDEX.md          ← Index of all available patterns

Pattern File Format

Each pattern is a Markdown file with optional YAML frontmatter:

---
name: pattern_name
description: Human-readable description of what the pattern does
version: "1.0.0"
---

The content after the frontmatter is the prompt template. Template variables can be used with {{variable_name}} syntax.

Steps

1. Ensure Pattern Directory Exists

The skill ensures .claude/skills/fabric-patterns/patterns/ exists.

2. List Available Patterns

Use the list_patterns tool to see all available patterns.

3. Retrieve a Pattern

Use the get_pattern tool to retrieve a pattern's content.

4. Apply a Pattern with Variables

Use the apply_pattern tool to render a pattern with specific variable values.

5. Stitch Patterns Together

Use the stitch_patterns tool to combine multiple patterns in sequence, where the output of one pattern becomes the input to the next.

6. Create New Patterns

Create new Markdown files in the patterns directory following the format above.

Tools Provided

This skill provides the following tools (to be implemented in agent/tools.py):

  • list_patterns(): Lists all available pattern names and descriptions
  • get_pattern(name): Retrieves the raw content of a pattern
  • apply_pattern(name, variables): Applies a pattern with variable substitution
  • stitch_patterns(pattern_names, initial_input): Chains patterns together

Example Patterns

summarize.md

---
name: summarize
description: Create a concise summary of the provided content
version: "1.0.0"
---

{{content}}

Please provide a concise summary of the above content, capturing the main points in 3-5 sentences or less.


### extract_wisdom.md
```yaml
---
name: extract_wisdom
description: Extract key insights, quotes, and actionable ideas from content
version: "1.0.0"
---

{{content}}

From the above content, extract:

  • Key insights and main ideas
  • Notable quotes
  • Actionable recommendations or takeaways
  • Important references or citations

Format as a structured list.


## Integration with Agent System
Patterns can be used by any agent through the provided tools. For example:
- The Planner agent might use patterns to structure its planning prompts
- The Implementer agent might apply patterns when generating code comments
- The Reviewer agent might use patterns for consistent review criteria

## Related Skills
- `implementation-planner`: Structures multi-step work (patterns can shape its prompts)
- `council-review`: Multi-perspective review (patterns can standardise review criteria)
- _(planned, not yet in this repo)_ `prompt-library`, `prompt-transparency`, `system-prompt-audit`

## Acceptance Checks
- [ ] Pattern directory exists at `.claude/skills/fabric-patterns/patterns/`
- [ ] At least two example patterns exist (summarize, extract_wisdom)
- [ ] Tools for listing, getting, applying, and stitching patterns are implemented
- [ ] Pattern template variable substitution works correctly
- [ ] Stitching chains patterns properly (output of one becomes input to next)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.