Fabric
Fabric copied to clipboard
[Feature request]: Short description of each prompt
What do you need?
I've used fabric a little bit and often find myself wanting to know a little bit more about a pattern before running it. The short names used for the files are fairly descriptive, but some of them are also quite similar and it's not always clear what the actual idea is behind the tool.
On the other hand, it's possible to get a lot of info by reading the prompt directly, but a lot of this is appropriately directed toward the LLM, not a human reader.
My request is for a middle ground "short description" and/or list of example documented somewhere that describes what a pattern is doing. Ideally this could be viewed quickly on the CLI, something like fabric help -p <pattern> that would print the short description.
@johnsaigle this is already implemented in the web ui. see here: https://github.com/danielmiessler/fabric/blob/main/web/Web%20Interface%20Update%20README%20Files/pr-1284-update.md
Is there anyway to have this more visible via CLI? The main draw to fabric for me is the ability to have a UNIX-style workflow (piping output to and from different procesess, etc.)
I'll look into enhancing the completions... I have a feeling it's possible.
I've found something I am adding into my CLI workflow, @johnsaigle - Maybe this is enough to address your issue?
I just found out I can do this using "fzf" (fuzzy find). Install it and you'll see fun stuff like this:
fzf --walker-root="$HOME/.config/fabric/patterns" --preview 'cat {}' --preview-window=up:50%:wrap
You can wrap an alias or a function around it too
alias fuzzy_fabric='fabric -p $(basename $(dirname $(fzf --walker-root="$HOME/.config/fabric/patterns" --preview "cat {}" --preview-window=up:50%:wrap)))'
This is what it looks like in action:
https://github.com/user-attachments/assets/036db942-17b7-4725-99f8-a98ce7825f07
@ksylvan Thanks, I'm able to do something similar in Neovim (by using telescope, which wraps ripgrep and fzf). Like I said in the OP, reading the prompts themselves can be helpful but I think they're more helpful for the LLM, less so for me the user.
What I'd like is something like e.g.:
extract_wisdom -- Gets the most important points, quotes, etc. from a piece of text
improve_writing -- Fixes grammar and clarity issues
write_essay -- Converts writing to a simple, direct style (i.e. Paul Graham's style)
Stated another way, I think these descriptions could be the why/what of a task, whereas the prompt itself is the how. It would be easier to learn about the tools this way vs. opening up the prompt and parsing the purpose/identity out of all prompt-optimization stuff (writing on colossal white boards and so on).
I got fuzzy_fabric working in Windows PowerShell too. Will update my aliases in https://github.com/ksylvan/custom-fabric
@johnsaigle How about this, then?
code_helper ~/.config/fabric/patterns 'Generate a list of patterns' | fabric -m $MODEL_GEMINI "$(cat dist/summarize_patterns)"
The summarize_patterns instruction was this:
This is the directory structure of all the Fabric Patterns
I want you to examine all the system.md files and create an alphabetized list
that shows simply:
pattern_name - short and concise summary of its fuction
So the list might look something like this:
extract_wisdom -- Gets the most important points, quotes, etc. from a piece of text
improve_writing -- Fixes grammar and clarity issues
write_essay -- Converts writing to a simple, direct style (i.e. Paul Graham's style)
And Gemini took about thirty seconds and replied:
Okay, I will examine the `system.md` file within each pattern directory to create the alphabetized list.
Here is the list:
agility_story -- Creates Agile user stories and acceptance criteria for a given topic in JSON format.
ai -- Interprets questions insightfully and provides answers in 3-5 concise Markdown bullets.
analyze_answers -- Evaluates student answers against learning objectives and generated questions, providing feedback.
analyze_bill -- Discerns the true nature, goals (overt/covert), and gotchas of legislative bills.
analyze_bill_short -- Discerns and summarizes the overt and covert goals of legislation in a concise format.
analyze_candidates -- Analyzes and compares two political candidates' stances on key issues, policies, and backgrounds.
analyze_cfp_submission -- Reviews and evaluates conference speaking session abstracts for quality, relevance, and engagement potential.
analyze_claims -- Analyzes truth claims, providing supporting/refuting evidence, logical fallacies, and quality ratings.
analyze_comments -- Characterizes internet comment sentiments, praise, and criticisms for a piece of content.
analyze_debate -- Analyzes debate transcripts for insightfulness, emotionality, arguments, agreements, and disagreements.
analyze_email_headers -- Analyzes SPF, DKIM, DMARC, and ARC email headers for security validation and concerns.
analyze_incident -- Extracts essential information from cybersecurity breach articles, focusing on attack details and recommendations.
analyze_interviewer_techniques -- Extracts and analyzes interviewer questions and techniques to identify what makes them effective.
analyze_logs -- Analyzes server log files to identify patterns, anomalies, and provide insights for reliability and performance.
analyze_malware -- Analyzes malware, extracting IOCs, behavior, MITRE ATT&CK techniques, and detection information.
analyze_military_strategy -- Analyzes historical battles, detailing commanders, strategic decisions, strengths/weaknesses, and tactical comparisons.
analyze_mistakes -- Analyzes past mistaken thought patterns and applies insights to current beliefs/predictions for improvement.
analyze_paper -- Analyzes research papers for primary findings, scientific rigor, and quality.
analyze_patent -- Examines patents for technology field, problem, solution, advantages, novelty, and inventive step.
analyze_personality -- Performs in-depth psychological analysis on the main person in the provided input.
analyze_presentation -- Reviews presentations for content, speaker's goals, selflessness, and entertainment value.
analyze_product_feedback -- Analyzes user product feedback to identify themes, consolidate, and prioritize based on usefulness.
analyze_proposition -- Analyzes federal, state, or local ballot propositions for purpose, impact, and arguments.
analyze_prose -- Evaluates writing quality for novelty, clarity, and prose, providing ratings and improvement recommendations.
analyze_prose_json -- Evaluates writing for novelty, clarity, and prose, outputting ratings and recommendations in JSON format.
analyze_prose_pinker -- Assesses prose and makes recommendations based on Steven Pinker's "The Sense of Style."
analyze_risk -- Conducts risk assessments of third-party vendors based on security/privacy compliance and documentation.
analyze_sales_call -- Rates sales call transcripts on sales fundamentals and pitch alignment with company vision.
analyze_spiritual_text -- Analyzes spiritual texts, highlighting surprising claims and comparing tenets with the King James Bible.
analyze_tech_impact -- Analyzes the societal impact, ethical considerations, and sustainability of technology projects.
analyze_threat_report -- Extracts surprising insights, trends, statistics, quotes, and recommendations from cybersecurity threat reports.
analyze_threat_report_cmds -- Interprets cybersecurity prompts, extracting commands and arguments from materials for pentesters/hackers.
analyze_threat_report_trends -- Extracts up to 50 surprising, insightful, and interesting trends from cybersecurity threat reports.
answer_interview_question -- Generates tailored, conversational responses to technical interview questions, reflecting expertise and experience.
ask_secure_by_design_questions -- Generates security-focused questions to ensure a project is built securely by design.
ask_uncle_duke -- Coordinates AI agents to answer Java/Spring/Maven questions, research solutions, and perform code reviews.
capture_thinkers_work -- Outputs a template summarizing a philosopher's or philosophy's teachings, background, ideas, and works.
changelog_summary_from_package_diff -- Generates a concise changelog summary in markdown from a git diff of Python package changes.
check_agreement -- Analyzes contracts and agreements for important stipulations, issues, and gotchas, outputting a Markdown summary.
clean_text -- Cleans up broken and malformatted text, fixing line breaks, capitalization, and punctuation without altering content.
coding_master -- Explains coding concepts to beginners using examples and structured markdown output.
compare_and_contrast -- Compares and contrasts a list of items in a markdown table.
convert_to_markdown -- Converts content to clean Markdown, preserving all original formatting and content.
cover_letter -- Creates a tailored, compelling cover letter based on resume details, job description, and customization preferences.
create_5_sentence_summary -- Creates concise summaries or answers to arbitrary input at 5 different levels of depth (5 words to 1 word).
create_academic_paper -- Creates high-quality academic papers in LaTeX format with clear explanations and authoritative layout.
create_ai_jobs_analysis -- Analyzes AI's impact on jobs, identifying resilient categories and recommending adaptation strategies.
create_aphorisms -- Finds and lists 20 existing, known aphorisms on a given topic, with attribution.
create_art_prompt -- Takes a concept and generates a descriptive prompt for an AI image generator to create art.
create_better_frame -- Finds better, positive mental frames for interpreting the world, based on an essay about framing.
create_coding_feature -- Elite programmer that takes project ideas and outputs secure, composable code modifications based on existing project structure.
create_coding_project -- Takes project ideas and outputs secure, composable code, directory structures, and setup scripts.
create_command -- Generates CLI commands for penetration testing tools based on help instructions and objectives.
create_cyber_summary -- Creates a summary of cybersecurity threats, vulnerabilities, stories, incidents, and malware.
create_design_document -- Creates detailed software/cloud/cybersecurity design documents using the C4 model, business posture, and security posture.
create_diy -- Creates "Do It Yourself" tutorial patterns by analyzing prompts and organizing elements into structured instructions.
create_excalidraw_visualization -- Maps input concepts into Excalidraw diagram syntax for visualizing relationships.
create_flash_cards -- Creates flashcards (question and answer) for key concepts in a piece of input.
create_formal_email -- Crafts or responds to emails with professionalism, clarity, and respect, adhering to formal correspondence conventions.
create_git_diff_commit -- Creates git add commands and a conventional commit message summarizing changes in a Git diff.
create_graph_from_input -- Creates CSV data from input to visualize security program improvement over time.
create_hormozi_offer -- Creates business offers using concepts from Alex Hormozi's "$100M Offers."
create_idea_compass -- Develops a structured system of thoughts using the Idea Compass template (Definition, Evidence, Source, Similarities, Opposites, Theme, Consequences).
create_investigation_visualization -- Creates detailed Graphviz visualizations of investigations, showing relationships and activities.
create_keynote -- Creates TED-quality keynote presentations from input, focusing on narrative flow and takeaways.
create_loe_document -- Creates Level of Effort (LOE) documents for estimating work, resources, and costs for tasks/projects.
create_logo -- Creates simple, elegant, minimalist company logos (without text) by generating an AI image prompt.
create_markmap_visualization -- Visualizes complex ideas using Markmap syntax, simplifying concepts into diagrams.
create_mermaid_visualization -- Visualizes complex ideas using Mermaid (Markdown) syntax for diagrams.
create_mermaid_visualization_for_github -- Creates Mermaid (Markdown) visualizations suitable for GitHub READMEs from complex ideas.
create_micro_summary -- Summarizes content into a 20-word sentence, 3 main points, and 3 takeaways in Markdown.
create_network_threat_landscape -- Analyzes network port/service statistics and creates a markdown threat report with findings and recommendations.
create_newsletter_entry -- Condenses article text into a concise newsletter entry (less than 70 words) in the style of Frontend Weekly.
create_npc -- Generates detailed D&D 5th edition Non-Player Characters (NPCs) with rich backstories and stats.
create_pattern -- Interprets LLM/AI prompts and structures them into a new pattern with IDENTITY, STEPS, and OUTPUT INSTRUCTIONS.
create_prd -- Creates precise and accurate Product Requirement Documents (PRDs) from input.
create_prediction_block -- Creates Markdown blocks for predictions extracted from input content, formatted for a blog.
create_quiz -- Generates review questions for a student based on learning objectives and subject matter.
create_reading_plan -- Designs a three-phase reading plan for a user based on an author or topic.
create_recursive_outline -- Breaks down complex tasks, projects, or ideas into smaller, manageable hierarchical components.
create_report_finding -- Creates a markdown security finding for a cyber security assessment report based on a vulnerability title and explanation.
create_rpg_summary -- Summarizes in-person role-playing game session transcripts into key events, combat stats, and character insights.
create_security_update -- Creates concise security updates for newsletters, covering threats, advisories, and vulnerabilities.
create_show_intro -- Creates compelling short podcast/media intros highlighting key topics discussed.
create_sigma_rules -- Extracts TTPs from security news and translates them into YAML-based Sigma detection rules.
create_story_explanation -- Explains content in a clear, approachable story-like format to convey its impact.
create_stride_threat_model -- Creates STRIDE-per-element threat models for systems, identifying assets, boundaries, data flows, and prioritizing threats.
create_summary -- Summarizes content into a 20-word sentence, 10 main points, and 5 takeaways in Markdown.
create_tags -- Identifies and extracts at least 5 subject/idea tags from text content for mind mapping tools.
create_threat_scenarios -- Creates simple, narrative-based threat models for various scenarios, focusing on realistic attack vectors.
create_ttrc_graph -- Creates a CSV file to graph the Time to Remediate Critical Vulnerabilities (TTR-C) metric over time.
create_ttrc_narrative -- Creates a compelling narrative showing progress in reducing Time to Remediate Critical Vulnerabilities.
create_upgrade_pack -- Extracts world model beliefs and task algorithm updates from input content.
create_user_story -- Writes concise, clear technical user stories for new software features.
create_video_chapters -- Extracts interesting topics discussed in a video transcript and provides timestamps for them.
create_visualization -- Turns complex ideas or data into ASCII art visualizations.
dialog_with_socrates -- Engages in deep, Socratic dialogues to explore an interlocutor's thoughts and beliefs.
enhance_resume -- Enhances resumes by improving content, structure, ATS compatibility, and strategic targeting for the desired role.
enrich_blog_post -- Enriches Markdown blog files by applying structural and visual enhancements for proper HTML rendering.
explain_code -- Explains code, security tool output, or configuration text provided as input.
explain_docs -- Captures and explains the most important parts of tool instructions or documentation.
explain_math -- Explains mathematical equations or concepts in easy-to-understand terms with examples and resources.
explain_project -- Explains what a project does and how to use it based on its documentation.
explain_terms -- Produces a glossary of important advanced terms from content, with definitions and analogies.
export_data_as_csv -- Finds all mentions of data structures within input and outputs them as properly formatted CSV data.
extract_algorithm_update_recommendations -- Extracts concise, practical recommendations for how to do something from content.
extract_article_wisdom -- Extracts surprising, insightful, and interesting ideas, quotes, facts, references, and recommendations from text content.
extract_book_ideas -- Extracts 50-100 of the most surprising, insightful, or interesting ideas from a book.
extract_book_recommendations -- Extracts 50-100 of the most practical recommendations from a book.
extract_business_ideas -- Extracts top business ideas from content and elaborates on the best 10 unique ideas.
extract_controversial_ideas -- Extracts the most controversial statements and supporting quotes from input.
extract_core_message -- Articulates the core message of a presentation, essay, or body of work in a single sentence.
extract_ctf_writeup -- Extracts a short, readable CTF writeup from a warstory-like text about a cybersecurity engagement.
extract_domains -- Extracts source domains and URLs from articles/newsletters to identify content sources.
extract_extraordinary_claims -- Extracts extraordinary claims (scientifically false, unverifiable) from conversations.
extract_ideas -- Extracts the most important ideas from any input into 15-word bullet points.
extract_insights -- Extracts surprising, powerful, and interesting insights from text content, focusing on human-centric topics.
extract_insights_dm -- Extracts interesting, novel, surprising, and insightful information related to human flourishing, AI, learning, etc.
extract_instructions -- Extracts clear, concise step-by-step instructions and main objectives from instructional video transcripts.
extract_jokes -- Extracts jokes from text content, presenting each joke and its punchline.
extract_latest_video -- Extracts the latest video URL from a YouTube RSS feed.
extract_main_activities -- Extracts key events and activities from a transcript or log.
extract_main_idea -- Extracts the primary idea and recommendation from input content.
extract_most_redeeming_thing -- Extracts the single most redeeming thing about a person or body of work, even if mostly negative.
extract_patterns -- Identifies interesting and surprising patterns from a collection of ideas, data, or observations.
extract_poc -- Extracts proof-of-concept URLs and validation methods from security/bug bounty reports.
extract_predictions -- Extracts predictions made within content, including timeframe, confidence, and verification criteria.
extract_primary_problem -- Articulates the primary problem with the world as presented in a text or body of work.
extract_primary_solution -- Articulates the primary solution for the world as presented in a text or body of work.
extract_product_features -- Extracts a list of product features from the provided input.
extract_questions -- Extracts all questions asked by an interviewer within a conversation or interview.
extract_recipe -- Extracts a recipe from text, including a short description, ingredients, and preparation steps.
extract_recommendations -- Extracts concise, practical recommendations from content into a bulleted list.
extract_references -- Extracts references to art, stories, books, literature, and papers from content.
extract_skills -- Extracts skill terms from a job description and classifies them as hard or soft skills.
extract_song_meaning -- Analyzes song lyrics, artist context, and fan analysis to determine a song's meaning.
extract_sponsors -- Extracts official and potential sponsors from a transcript.
extract_videoid -- Extracts the video ID from any URL.
extract_wisdom -- Extracts surprising, insightful information (ideas, quotes, habits, facts, references, recommendations) from text.
extract_wisdom_agents -- Coordinates AI agents to extract insights on human flourishing, AI, learning, etc., from text.
extract_wisdom_dm -- Extracts valuable insights on human flourishing, AI, learning, etc., from input.
extract_wisdom_nometa -- Extracts insights on human flourishing, AI, learning, etc., without meta-commentary.
find_anchor_points -- Identifies powerful "anchor points" (key statements for reflection) from personal development seminar transcripts.
find_female_life_partner -- Analyzes a man's criteria for a female life partner and refines it into direct, clear, and poetic sentences.
find_hidden_message -- Analyzes input for overt and hidden political messages, propaganda techniques, and desired audience actions.
find_logical_fallacies -- Identifies and lists logical fallacies present in a given text.
generate_song_lyrics -- Generates lyrics for a song based on a given theme or concept, providing two versions with different styles.
get_wow_per_minute -- Determines the "wow-factor" (surprise, novelty, insight, value, wisdom) per minute of content.
get_youtube_rss -- Returns the RSS URL for a given YouTube channel ID or URL.
humanize -- Rewrites AI-generated text to sound natural, conversational, and relatable, like an average person.
identify_dsrp_distinctions -- Explores DSRP distinctions (boundaries of ideas/systems) within a topic, inspired by systems thinkers.
identify_dsrp_perspectives -- Explores key DSRP perspectives surrounding a system, considering various stakeholder viewpoints and biases.
identify_dsrp_relationships -- Explores key DSRP relationships (causal, feedback, etc.) within a system, inspired by systems thinkers.
identify_dsrp_systems -- Identifies and analyzes DSRP systems (parts and wholes) present in a topic, inspired by systems thinkers.
identify_job_stories -- Generates insightful job stories capturing stakeholder needs, motivations, and outcomes in various scenarios.
improve_academic_writing -- Refines input text into clear, coherent academic and scientific language using common words.
improve_prompt -- Improves an LLM/AI prompt using prompt engineering expertise and best practices.
improve_report_finding -- Improves a cybersecurity penetration test finding by enhancing its description, risk, recommendations, and references.
improve_writing -- Refines input text to enhance clarity, coherence, grammar, and style while maintaining original meaning.
judge_output -- Evaluates Honeycomb queries for correctness and usefulness based on query language info and guidelines.
label_and_rate -- Labels content with single-word tags and rates its quality based on idea count and thematic relevance.
md_callout -- Creates a markdown callout (Note, Tip, Important, Warning, Caution) based on provided text.
official_pattern_template -- Serves as a template for creating new Fabric patterns, outlining standard sections.
prepare_7s_strategy -- Prepares a briefing document capturing organizational profile, strategic elements, and market dynamics for 7S strategy analysis.
provide_guidance -- Provides psychiatric, psychological, and life coaching advice based on user questions and context.
rate_ai_response -- Rates AI response quality compared to top human expert performance, providing a grade and score.
rate_ai_result -- Assesses the quality of AI/ML/LLM work results against human expert performance across multiple dimensions.
rate_content -- Labels content with up to 20 single-word tags and rates it based on idea count and thematic relevance.
rate_value -- Determines the Value Per Minute (VPM) of content based on surprising ideas, giveaways, stories, resources, and secret knowledge.
raw_query -- A universal AI that aims to provide the best possible result by deeply understanding the input and sender's intent.
recommend_artists -- Recommends a personalized EDM festival schedule based on user's favorite styles and artists.
recommend_pipeline_upgrades -- Optimizes vulnerability-checking pipelines by incorporating new information and improving efficiency.
recommend_talkpanel_topics -- Generates proposed talk titles/abstracts or panel talking points for a person based on their interests and goals.
refine_design_document -- Refines a software/cloud/cybersecurity design document based on design review feedback.
review_code -- Performs a comprehensive code review focusing on correctness, performance, readability, security, and best practices.
review_design -- Reviews architecture design for clarity, component design, integrations, security, performance, scalability, and data management.
sanitize_broken_html_to_markdown -- Converts messy HTML to clean Markdown with custom styling, ensuring Vite compatibility.
session-outline -- Creates a concise, clear, and human-natural seminar session outline ready for publishing.
show_fabric_options_markmap -- Creates a Markmap visualization of Fabric framework's functionality, commands, and features.
solve_with_cot -- Provides detailed, step-by-step responses using Chain of Thought reasoning with thinking and reflection tags.
suggest_pattern -- Suggests appropriate Fabric patterns or commands based on user input to expand tool usability.
summarize -- Summarizes content into a 20-word sentence, 10 main points, and 5 takeaways in Markdown.
summarize_debate -- Summarizes debates, identifies primary disagreements, extracts arguments, and analyzes evidence strength.
summarize_git_changes -- Summarizes major GitHub project changes and upgrades from the last 7 days with enthusiasm.
summarize_git_diff -- Summarizes Git diff changes with a conventional commit title and succinct bullet points.
summarize_lecture -- Extracts relevant topics, definitions, tools, and timestamps from lecture transcripts into a structured summary.
summarize_legislation -- Summarizes complex political proposals/legislation, identifying key points, tricky parts, and overall purpose.
summarize_meeting -- Analyzes meeting transcripts to extract a structured summary including overview, key points, tasks, decisions, and next steps.
summarize_micro -- Summarizes content into a 20-word sentence, 3 main points, and 3 takeaways in Markdown.
summarize_newsletter -- Extracts meaningful content from a newsletter, summarizing content, opinions, tools, companies, and follow-up items.
summarize_paper -- Summarizes academic papers detailing title, authors, goals, technical approach, features, results, and conclusions.
summarize_prompt -- Summarizes AI chat prompts by describing their primary function, unique approach, and expected output concisely.
summarize_pull-requests -- Summarizes pull requests for a coding project, providing an overview and listing top PRs with readable descriptions.
summarize_rpg_session -- Summarizes role-playing game sessions, extracting key events, combat stats, character changes, and quotes.
t_analyze_challenge_handling -- Describes how well challenges are being addressed based on a TELOS file and input.
t_check_metrics -- Checks metrics/KPIs from a TELOS file to assess current state and recent improvements.
t_create_h3_career -- Analyzes a TELOS file to suggest human-to-human interaction-based career contributions post-automation.
t_create_opening_sentences -- Describes a person's identity, problem they see, and actions from a TELOS file in humble, non-douchey bullet points.
t_describe_life_outlook -- Describes a person's life outlook in 5 concise, 16-word bullets based on their TELOS file.
t_extract_intro_sentences -- Describes a person's identity, work, and current projects in 5 concise, grounded bullet points from a TELOS file.
t_extract_panel_topics -- Creates 5 panel ideas with titles and descriptions based on a TELOS file and input.
t_find_blindspots -- Identifies possible blindspots in thinking, frames, or models based on a TELOS file.
t_find_negative_thinking -- Identifies negative thinking in a TELOS file or journal and provides tough love encouragement.
t_find_neglected_goals -- Identifies goals/projects from a TELOS file that haven't been worked on recently.
t_give_encouragement -- Evaluates progress from a TELOS file, providing encouragement and recommendations for continued effort.
t_red_team_thinking -- Red-teams thinking, models, and frames from a TELOS file and journal, offering improvement recommendations.
t_threat_model_plans -- Threat models a life plan from a TELOS file, identifying what could go wrong and recommending improvements.
t_visualize_mission_goals_projects -- Creates an ASCII art diagram of the relationship between missions, goals, and projects from a TELOS file.
t_year_in_review -- Creates insights about a person/entity's year, summarizing accomplishments and visualizations from a TELOS file.
to_flashcards -- Creates Anki flashcards from text, focusing on concise questions and answers without external context.
transcribe_minutes -- Extracts meeting minutes, actionables, ideas, decisions, challenges, and next steps from a transcribed meeting.
translate -- Translates sentences or documentation accurately into a specified language, maintaining original format and tone.
tweet -- Provides a guide to crafting engaging tweets with emojis, covering Twitter basics and strategy.
write_essay -- Writes concise, clear, and illuminating essays on a given topic in the style of Paul Graham.
write_hackerone_report -- Generates concise, reproducible bug bounty reports for HackerOne, detailing vulnerability, impact, and reproduction steps.
write_latex -- Generates syntactically correct LaTeX code for a .tex document based on user request.
write_micro_essay -- Writes concise, clear, and illuminating micro-essays (max 250 words) on a given topic in Paul Graham's style.
write_nuclei_template_rule -- Generates YAML Nuclei templates for detecting vulnerabilities, including HTTP requests, matchers, and extractors.
write_pull-request -- Drafts detailed pull request descriptions from git diff output, explaining changes, reasoning, and potential bugs.
write_semgrep_rule -- Creates accurate and working Semgrep rules based on input, following syntax guidelines.
youtube_summary -- Creates concise, timestamped YouTube video summaries highlighting key points from transcripts.
Yeah that's great, thank you. I think it would make sense to add as a commit or even a build step for the repository: each time a new pattern is added, this script could run and update a fixed list.
If that's not something you want to maintain, maybe it could be added as a documentation note, at least.
I added the two sets of aliases (one for Linux/Mac and one for Windows PowerShell) to my custom patterns repo here: https://github.com/ksylvan/custom-fabric
After I'm done with a big project I'm working on in prep for a job interview, I'll add some info about this to the README.
https://github.com/ksylvan/custom-fabric/commit/a4c77179239c04762b8878b1cb75bf0ba03f4c87
There was an idea a while back to include front matter in the patterns, just a section of yaml. That would be used to have description, author, model it was designed for, that sort of thing. If there any support for it....
The pattern system evolved from @danielmiessler having an explicit goal to make it super easy for humans and LLMs to read, so having a more structured YAML front matter wasn't in our thinking then.
However, as I demonstrated in https://github.com/danielmiessler/fabric/issues/1461#issuecomment-2887452604 we can post-process to create a full list.
I'll make a mini-diff in the next couple of days (likely by Thursday) to address this.
I agree, I like the plaintext approach to the prompts vs. yaml.
Including yaml as frontmatter has little or no impact to human readability, is entirely backward compatible and encoding metadata in the pattern has merit.
also, yaml is plaintext
for example
---
name : my test pattern
author : matt
description : use for testing context staging
---
# IDENTITY and PURPOSE
You are part of a test sequence.
# STEPS
Read and understand the input and produce a short concise response.
# OUTPUT INSTRUCTIONS
Wrap the response in simple XML
<RESPONSE>foo</RESPONSE>
# INPUT:
it's trivially easy to detect, and to strip off before use. This would also allow for default model, and other tuneable parameters.
I'm not strongly advocating for it, but the opposing rationale so far is not compelling.
I think the strongest reason not to, would be that other system leverage fabric patterns.
I'm not strongly advocating for it, but the opposing rationale so far is not compelling.
Fair.
I think the strongest reason not to, would be that other system leverage fabric patterns.
Yeah. Let's think about this a bit more. I'm not completely opposed to the plaintext front matter either.
I just did a presentation using slides created using "marp" (a system that encodes speaker notes as markdown comments and slide metadata as part of the front matter and in comments). It worked brilliantly.
@mattjoyce @johnsaigle @jmd1010 @KenMacD We do maintain a JSON pattern descriptions file (which we update every time a new pattern is added)
https://github.com/danielmiessler/Fabric/blob/main/scripts/pattern_descriptions/pattern_descriptions.json
Maybe we can do something using this asset.
@johnsaigle does that file give you what you need?
I like the file, I wonder if it would be possible to have it stored in ~/.config along with the other patterns. Like you, I also maintain a separate directory of custom patterns which I copy into ~/.config. I think it would be cool to have lightweight support for custom pattern descriptions just like there are for custom patterns.
The goal isn't to describe the patterns to myself but to better use them in other tools. For example, it would help a tool like Claude Code call out to fabric if it could see a short description of all tools (built-in and custom).
@johnsaigle You don't have to copy your custom patterns into ~/.config/fabric/patterns any more.
As of... (consults the new CHANGELOG.md file)... v.1.4.232 you can run fabric -S and tell it where you store your custom patterns. The setup environment variable points to the place where the patterns live (not its containing folder).
I'll see about copying it into ~/.config/fabric
Ah thanks I wasn't aware of that new change
I've found something I am adding into my CLI workflow, @johnsaigle - Maybe this is enough to address your issue?
I just found out I can do this using "fzf" (fuzzy find). Install it and you'll see fun stuff like this:
fzf --walker-root="$HOME/.config/fabric/patterns" --preview 'cat {}' --preview-window=up:50%:wrap
You can wrap an alias or a function around it too
alias fuzzy_fabric='fabric -p $(basename $(dirname $(fzf --walker-root="$HOME/.config/fabric/patterns" --preview "cat {}" --preview-window=up:50%:wrap)))' This is what it looks like in action:
Fuzz_Fabric.Alias.mp4
fabric_patterns() {
(cd "$HOME/.config/fabric/patterns" && find . -type f | fzf --preview 'cat {}' --preview-window=up:50%:wrap)
}
This can be run from anywhere, without first cd into patterns folder.
Here's another solution, @johnsaigle
mkdir ~/.config/fabric/patter_descriptions/
code_helper -ignore .env ~/.config/fabric 'Read all the patterns in the patterns/ \
directory and create a text file in the pattern_descriptions/ directory that has the \
following format for each row: pattern_name|succinct description of what the pattern does'| \
create_coding_feature -m google/gemini-2.5-pro
And after a few minutes, gemini-2.5-pro says:
Applied create operation to pattern_descriptions/pattern_summaries.txt
Successfully applied file changes.
You can review the changes with 'git diff' if you're using git.
Based on your request to summarize all available patterns, I will create a new file, `pattern_descriptions/pattern_summaries.txt`. This file will contain a pipe-delimited list of each pattern's name and a succinct description of its function, making it easier to quickly understand the purpose of each available pattern.
And here is what it produced:
head pattern_descriptions/pattern_summaries.txt
agility_story|Generates a user story and acceptance criteria in JSON format.
ai|Interprets questions deeply and provides concise, insightful answers.
analyze_answers|Evaluates quiz answers for correctness against learning objectives.
analyze_bill|Analyzes legislation to identify overt and covert goals.
analyze_bill_short|Provides a concise analysis of legislation's overt and covert goals.
analyze_candidates|Compares and contrasts two political candidates on key issues.
analyze_cfp_submission|Evaluates conference talk submissions for clarity, relevance, and impact.
analyze_claims|Rates truth claims by providing evidence, counter-arguments, and fallacies.
analyze_comments|Analyzes internet comments for sentiment, praise, and criticism.
analyze_debate|Provides an unbiased analysis of debate arguments, agreements, and disagreements.
tail pattern_descriptions/pattern_summaries.txt
tweet|Provides a guide on crafting engaging tweets with emojis.
write_essay|Writes an essay on a given topic in the style of a specified author.
write_essay_pg|Writes a concise essay on a given topic in the style of Paul Graham.
write_hackerone_report|Generates a concise bug bounty report for HackerOne.
write_latex|Generates a syntactically correct LaTeX document.
write_micro_essay|Writes a short essay (max 250 words) in the style of Paul Graham.
write_nuclei_template_rule|Generates a Nuclei YAML template to detect a vulnerability.
write_pull-request|Drafts a detailed pull request description from a git diff.
write_semgrep_rule|Creates a working Semgrep rule from a vulnerability description.
youtube_summary|Creates a concise, timestamped summary of a YouTube video.
Thanks that looks pretty nice. I think I'll add this to my custom patterns project.
@johnsaigle There is now an up-to-date pattern_explanations.md being installed with the latest versions of fabric.
$ tail ~/.config/fabric/patterns/pattern_explanations.md
211. **tweet**: Provides a step-by-step guide on crafting engaging tweets with emojis, covering Twitter basics, account creation, features, and audience targeting.
212. **write_essay**: Writes essays in the style of a specified author, embodying their unique voice, vocabulary, and approach. Uses `author_name` variable.
213. **write_essay_pg**: Writes concise, clear essays in the style of Paul Graham, focusing on simplicity, clarity, and illumination of the provided topic.
214. **write_hackerone_report**: Generates concise, clear, and reproducible bug bounty reports, detailing vulnerability impact, steps to reproduce, and exploit details for triagers.
215. **write_latex**: Generates syntactically correct LaTeX code for a new.tex document, ensuring proper formatting and compatibility with pdflatex.
216. **write_micro_essay**: Writes concise, clear, and illuminating essays on the given topic in the style of Paul Graham.
217. **write_nuclei_template_rule**: Generates Nuclei YAML templates for detecting vulnerabilities using HTTP requests, matchers, extractors, and dynamic data extraction.
218. **write_pull-request**: Drafts detailed pull request descriptions, explaining changes, providing reasoning, and identifying potential bugs from the git diff command output.
219. **write_semgrep_rule**: Creates accurate and working Semgrep rules based on input, following syntax guidelines and specific language considerations.
220. **youtube_summary**: Create concise, timestamped Youtube video summaries that highlight key points.
Source is here: https://github.com/danielmiessler/Fabric/blob/main/data/patterns/pattern_explanations.md
I also keep the suggest_pattern patterm updated regularly.
How feasible is it for fabric to also have a command that generates this patterns in the configured custom directory?
My dream workflow would to be able to pull fabric updates, sync with my custom or overwritten patterns, and have the new ones also included in pattern_explanations.md. The main motivation for this is to ultimately have an LLM coding agent ingest the pattern explanations and decide on its own which fabric tools it should use to accomplish a particular task.
I've been doing a bit of work to get this going for myself, but I think it would be really cool to have that process upstreamed :D
How feasible is it for fabric to also have a command that generates this patterns in the configured custom directory?
My dream workflow would to be able to pull fabric updates, sync with my custom or overwritten patterns, and have the new ones also included in
pattern_explanations.md. The main motivation for this is to ultimately have an LLM coding agent ingest the pattern explanations and decide on its own which fabric tools it should use to accomplish a particular task.I've been doing a bit of work to get this going for myself, but I think it would be really cool to have that process upstreamed :D
Yes @johnsaigle that would be cool - and something I can consider adding as a tool to fabric-mcp - Feel free to open a new feature request for this.
Meanwhile, you can always do this:
pushd ~/src/custom-fabric
code_helper ./patterns/ 'read all the patterns in this directory and create (or replace, if it alredady exists) a markdown \
file called "custom_pattern_explanations.md" starting with "# Custom Patterns" listing all the patterns in an enumerated \
list, alphabetized, with each pattern name and a short description (one sentence summary)' | \
create_coding_feature -m $MODEL_CLAUDE
This produced this output on the terminal (and made the requested update for my custom patterns explanations file).
Applied update operation to patterns/custom_pattern_explanations.md
Successfully applied file changes.
You can review the changes with 'git diff' if you're using git.
## Summary of File Changes
I will analyze all the patterns in the directory and create/update the `custom_pattern_explanations.md` file with an alphabetized, enumerated list of all patterns along with brief one-sentence descriptions of their functionality.
The patterns found are:
1. changelog_summary_from_package_diff
2. cover_letter
3. enhance_resume
4. find_anchor_points
5. generate_song_lyrics
6. review_code (mentioned in existing file but no directory found)
7. session-outline
I will create a comprehensive markdown file that lists all these patterns alphabetically with clear, concise descriptions.
I like keeping the standard pattern_explanations file separate from the custom one, so no information is lost (or having to be re-updated) during updates.
Thanks I'll try out this workflow.