
LifeOS 中的 Fabric 工作流基于意图的智能模式选择实战指南【免费下载链接】LifeOS⛰️ The Life Operating System — an intent engineering platform that moves you from your current state to your ideal state, in life and work.项目地址: https://gitcode.com/GitHub_Trending/pe/LifeOS导读本文围绕 LifeOS 仓库中 Research 技能的 Fabric 工作流 展开讲解如何从 240 个经过实战验证的专业提示词模式pattern中根据用户意图自动挑选最合适的模式用于威胁建模、摘要、智慧提取、内容分析、内容创作与文本转换。读完本文你将掌握一整套意图识别 → 模式匹配 → 执行 → 结果输出的完整工作流并了解 LifeOS 如何在不依赖外部 CLI 的情况下原生执行这些模式以及何时才需要回退到fabric命令行。一、Fabric 工作流是什么Fabric 工作流是 LifeOS 中 Research 技能Research/SKILL.md注册的众多工作流之一它的定位是为 Fabric CLI 提供智能模式选择。当用户提出对某内容做威胁建模 / 分析 / 摘要 / 提取 / 转换之类的请求时本工作流负责从 240 个专业提示词模式中自动挑选最合适的那一个然后执行。它的适用触发条件USE WHEN覆盖处理内容processing content分析数据analyzing data生成摘要creating summaries威胁建模threat modeling文本转换transforming text注意Fabric 技能本体已迁移到独立技能目录本工作流文件只是 Research 技能中的路由入口。真正的模式库与执行逻辑位于LifeOS/install/skills/Fabric/目录。技能引用与模式位置原工作流文件明确给出了两个关键路径安装到用户主目录后的形态主技能文件~/.claude/skills/Fabric/SKILL.md模式存放目录~/.claude/skills/Fabric/Patterns/在当前仓库中对应的实际位置是 LifeOS/install/skills/Fabric/SKILL.md 与 LifeOS/install/skills/Fabric/Patterns/。当需要更新模式时直接说 update fabric patterns 即可触发 Fabric 技能的 UpdatePatterns 工作流详见第五节。二、何时激活本技能识别触发意图工作流文件给出了七类最常见的主用例Primary Use Cases当用户请求中出现以下意图时应激活本技能用户请求示例意图类型Create a threat model for...威胁建模Summarize this article/video/paper...摘要Extract wisdom/insights from...智慧提取Analyze this [code/malware/claims/debate]...分析Improve my writing/code/prompt...改进Create a [visualization/summary/report]...内容创作Rate/review/judge this content...评分/评审核心目标根据你要完成的任务从 240 个可用模式中挑选出正确的那一个——而不是把模式清单甩给用户让他自己选。三、模式选择策略意图分类决策树原文档的核心是一套决策树。拿到用户请求后第一步是判断意图属于哪一大类第二步是精确到具体模式。1. 识别意图类别威胁建模与安全Threat Modeling Security威胁建模 →create_threat_model或create_stride_threat_model威胁场景 →create_threat_scenarios安全更新 →create_security_update安全规则 →create_sigma_rules、write_nuclei_template_rule、write_semgrep_rule威胁分析 →analyze_threat_report、analyze_threat_report_trends摘要Summarization通用摘要 →summarize5 句摘要 →create_5_sentence_summary微摘要 →create_micro_summary或summarize_micro会议 →summarize_meeting论文/研究 →summarize_paper视频/YouTube →youtube_summary通讯稿 →summarize_newsletter代码变更 →summarize_git_changes或summarize_git_diff智慧提取Wisdom Extraction通用智慧 →extract_wisdom文章智慧 →extract_article_wisdom书籍想法 →extract_book_ideas洞察 →extract_insights或extract_insights_dm核心思想 →extract_main_idea推荐 →extract_recommendations争议观点 →extract_controversial_ideas分析Analysis恶意软件 →analyze_malware代码 →analyze_code或review_code论断 →analyze_claims辩论 →analyze_debate日志 →analyze_logs论文 →analyze_paper威胁报告 →analyze_threat_report产品反馈 →analyze_product_feedback销售电话 →analyze_sales_call内容创作Content CreationPRD →create_prd设计文档 →create_design_document用户故事 →create_user_story可视化 →create_visualization、create_mermaid_visualization、create_markmap_visualization文章 →write_essay报告发现 →create_report_finding通讯稿条目 →create_newsletter_entry改进Improvement写作 →improve_writing学术写作 →improve_academic_writing提示词 →improve_prompt报告发现 →improve_report_finding代码 →review_code评分/评审Rating/EvaluationAI 响应 →rate_ai_response内容质量 →rate_content价值评估 →rate_value通用判断 →judge_output2. 执行模式fabric 命令行格式# 基本格式 fabric [input] -p [selected_pattern] # 从 URL 抓取 fabric -u URL -p [pattern] # 从 YouTube fabric -y YOUTUBE_URL -p [pattern] # 从文件管道输入 cat file.txt | fabric -p [pattern] # 直接文本 fabric your text here -p [pattern]关键参数说明-p指定要使用的 pattern 名称名称必须精确例如extract_wisdom而不是extractwisdom-uURL 内容抓取-yYouTube 转写fabric 原生处理下载 转写 处理四、240 模式全目录七大分类速查仓库中的 Patterns/ 目录 实际存放了 240 个模式每个模式是一个目录内含system.md提示词指令。此外 pattern_explanations.md 提供了每个模式的一句话说明。威胁建模与安全15 个模式create_threat_model- 通用威胁建模create_stride_threat_model- STRIDE 方法论create_threat_scenarios- 威胁场景生成create_security_update- 安全更新文档create_sigma_rules- SIGMA 检测规则write_nuclei_template_rule- Nuclei 扫描器模板write_semgrep_rule- Semgrep 静态分析规则analyze_threat_report- 威胁报告分析analyze_threat_report_cmds- 从威胁报告提取命令analyze_threat_report_trends- 识别威胁趋势t_threat_model_plans- 针对计划的威胁建模ask_secure_by_design_questions- 安全设计提问create_network_threat_landscape- 网络威胁态势analyze_incident- 事件分析analyze_risk- 风险评估摘要20 个模式summarize- 通用摘要create_5_sentence_summary- 超精简 5 行摘要create_micro_summary- 微摘要create_summary- 详细摘要summarize_micro- 微摘要summarize_meeting- 会议纪要摘要summarize_paper- 学术论文摘要summarize_lecture- 讲座摘要summarize_newsletter- 通讯稿摘要summarize_debate- 辩论摘要summarize_legislation- 立法摘要summarize_rpg_session- RPG 跑团记录摘要summarize_board_meeting- 董事会会议摘要summarize_git_changes- Git 变更摘要summarize_git_diff- Git diff 摘要summarize_pull-requests- PR 摘要summarize_prompt- 提示词摘要youtube_summary- YouTube 视频摘要create_cyber_summary- 网络安全摘要提取30 个模式extract_wisdom- 通用智慧提取extract_article_wisdom- 文章专属智慧extract_book_ideas- 书籍想法extract_insights- 通用洞察extract_insights_dm- 深度模式洞察extract_main_idea- 核心信息extract_recommendations- 推荐extract_ideas- 内容想法extract_questions- 提出的问题extract_predictions- 做出的预测extract_controversial_ideas- 争议点extract_business_ideas- 商业机会extract_skills- 提及的技能extract_patterns- 识别出的模式extract_sponsors- 赞助商提及extract_references- 引用的参考extract_instructions- 内容中的指令extract_jokes- 幽默提取extract_primary_problem- 主要问题extract_primary_solution- 主要方案extract_product_features- 产品特性extract_core_message- 核心信息extract_algorithm_update_recommendations- 算法建议extract_extraordinary_claims- 非凡论断extract_most_redeeming_thing- 最有价值之处分析35 个模式analyze_claims- 论断分析analyze_malware- 恶意软件分析analyze_code- 代码分析analyze_paper- 论文分析analyze_logs- 日志分析analyze_debate- 辩论分析analyze_incident- 事件分析analyze_comments- 评论分析analyze_answers- 答案分析analyze_email_headers- 邮件头分析analyze_military_strategy- 军事战略analyze_mistakes- 错误分析analyze_personality- 人格分析analyze_presentation- 演示分析analyze_product_feedback- 产品反馈analyze_proposition- 提案分析analyze_prose- 散文分析analyze_risk- 风险分析analyze_sales_call- 销售电话分析analyze_spiritual_text- 灵性文本分析analyze_tech_impact- 技术影响分析analyze_threat_report- 威胁报告分析analyze_bill- 法案分析analyze_candidates- 候选人分析analyze_cfp_submission- CFP 投稿分析analyze_terraform_plan- Terraform 计划分析analyze_interviewer_techniques- 面试官技巧分析创作50 个模式create_prd- 产品需求文档create_design_document- 设计文档create_user_story- 用户故事create_coding_project- 编码项目create_coding_feature- 代码特性create_mermaid_visualization- Mermaid 图表create_markmap_visualization- Markmap 思维导图create_visualization- 通用可视化create_threat_model- 威胁模型create_stride_threat_model- STRIDE 威胁模型create_threat_scenarios- 威胁场景create_report_finding- 报告发现create_newsletter_entry- 通讯稿内容create_keynote- 主题演讲create_academic_paper- 学术论文create_flash_cards- 学习闪卡create_quiz- 测验create_graph_from_input- 图表create_tags- 内容标签create_art_prompt- 艺术生成提示词create_command- CLI 命令create_pattern- Fabric 模式create_logo- Logo 设计create_podcast_image- 播客图像create_sigma_rules- SIGMA 规则create_video_chapters- 视频章节create_upgrade_pack- 升级文档改进10 个模式improve_writing- 通用写作改进improve_academic_writing- 学术写作improve_prompt- 提示词工程improve_report_finding- 报告发现review_code- 代码评审review_design- 设计评审refine_design_document- 设计文档精炼humanize- 拟人化 AI 文本enrich_blog_post- 博客增强clean_text- 文本清理评分/评审8 个模式rate_ai_response- 评分 AI 输出rate_ai_result- 评分 AI 结果rate_content- 评分内容质量rate_value- 评分价值主张judge_output- 通用判断label_and_rate- 标注与评分check_agreement- 协议检查arbiter-evaluate-quality- 质量评估仓库实际规模以 Patterns/ 目录 为准除上述高频模式外还包含大量垂直场景模式如analyze_bill、write_hackerone_report、summarize_rpg_session、create_reading_plan、explain_code等完整清单可直接ls该目录查看。五、模式更新流程模式由 Fabric 技能统一管理。原文档规定的更新方式是更新模式直接说 update fabric patterns触发 UpdatePatterns 工作流查看全部模式ls ~/.claude/skills/Fabric/Patterns/UpdatePatterns 工作流仓库实现的完整步骤为前置条件必须已安装 fabric CLIgo install github.com/danielmiessler/fabriclatest更新从上游官方仓库拉取发送语音通知向本地通知服务 POST 一条消息统计当前模式数ls -1 ~/.claude/skills/Fabric/Patterns/ | wc -l通过 fabric CLI 更新执行fabric -U更新~/.config/fabric/patterns/同步到技能目录rsync -av --delete ~/.config/fabric/patterns/ ~/.claude/skills/Fabric/Patterns/报告结果对比新旧模式数量输出新增数量验证关键模式存在依次检查extract_wisdom、summarize、create_threat_model、analyze_claims四个核心模式是否就位若 fabric CLI 不可用还可通过手动 git clone 上游仓库后rsync同步模式目录详见工作流文档Alternative: Manual Git Update一节。六、实战示例威胁建模# 用户Create a threat model for our new API fabric API that handles user authentication and payment processing -p create_threat_model摘要# 用户Summarize this blog post fabric -u https://example.com/blog-post -p summarize # 用户Give me a 5-sentence summary fabric -u https://example.com/article -p create_5_sentence_summary智慧提取# 用户Extract wisdom from this video fabric -y https://youtube.com/watch?v... -p extract_wisdom # 用户What are the main ideas? fabric -u URL -p extract_main_idea分析# 用户Analyze this code for issues fabric $(cat code.py) -p analyze_code # 用户Analyze these security claims fabric security claims text -p analyze_claims七、模式选择决策矩阵原文档提供了一张速查表帮助快速根据用户请求关键词定位意图与推荐模式用户请求包含可能意图推荐模式threat model安全建模create_threat_model,create_stride_threat_modelsummarize, summary摘要summarize,create_5_sentence_summaryextract wisdom, insights智慧提取extract_wisdom,extract_insightsanalyze [X]分析analyze_[X]X 与模式匹配improve, enhance改进improve_writing,improve_promptcreate [visualization]可视化create_mermaid_visualization,create_markmap_visualizationrate, judge, evaluate评分rate_content,judge_outputmain idea, core message核心提取extract_main_idea,extract_core_message八、高级用法管道内容处理cat article.txt | fabric -p extract_wisdom pbpaste | fabric -p summarize curl -s https://... | fabric -p analyze_claims处理 YouTube 视频fabric 自动处理下载 转写 处理fabric -y https://youtube.com/watch?v... -p youtube_summary链式模式手动# 先提取再摘要 fabric -u URL -p extract_wisdom wisdom.txt cat wisdom.txt | fabric -p create_5_sentence_summary九、从 CLI 到原生执行LifeOS 的深度集成原工作流文档是面向fabric CLI的但 LifeOS 仓库中的 Fabric 技能本体 展示了更进一步的设计——原生模式执行Native Pattern Execution大多数模式无需 CLI 往返LifeOS 直接读取Patterns/{pattern_name}/system.md把模式的指令作为提示词直接应用避免外部 CLI 调用的延迟与依赖仅两种场景需要 fabric CLI-y URLYouTube 转写提取-u URLURL 内容抓取当原生抓取失败时回退每个模式的system.md遵循统一结构可查看 execute_wisdom/system.md 等真实文件IDENTITYAI 应扮演的角色PURPOSE要达成的目标STEPS如何处理输入OUTPUT结构化输出格式例如extract_wisdom的输出格式包含SUMMARY、IDEAS20-50 条、INSIGHTS10-20 条、QUOTES15-30 条、HABITS、FACTS、REFERENCES、ONE-SENTENCE TAKEAWAY、RECOMMENDATIONS等结构化区块summarize则输出ONE SENTENCE SUMMARYMAIN POINTS10 条每条 ≤16 词TAKEAWAYS5 条analyze_claims会对每条论断给出CLAIM、CLAIM SUPPORT EVIDENCE、CLAIM REFUTATION EVIDENCE、LOGICAL FALLACIES、CLAIM RATINGA-F 分级、LABELS以及OVERALL SCORE与OVERALL ANALYSIS。ExecutePattern 工作流与自动收割Auto-HarvestExecutePattern 工作流 给出了原生执行的四步流程意图识别 → 读取system.md→ 直接应用模式 → 按规格输出。其中值得注意的两个设计URL 特殊处理YouTube 用fabric -y原生处理转写不要用 WebFetch 抓 YouTube 页面遇到 CAPTCHA 或反爬时用fabric -u回退。Auto-Harvest 侧效应当选择的模式属于summarize 家族summarize、create_5_sentence_summary、create_micro_summary、summarize_paper、summarize_lecture、summarize_newsletter、summarize_meeting、summarize_debate、youtube_summary且输入为 URL 或 ≥200 字符的文本时会在后台并行触发知识摄入harvest技能实现一次动作、两份产出——聊天窗口得到摘要磁盘上得到 KNOWLEDGE 笔记。该侧效应遵循失败隔离原则收割失败绝不抑制摘要输出且遵守幂等性重复摘要同一 URL 只返回duplicate状态不会重复写笔记。常见坑GotchasYouTube 提取必须用fabric -y URL不要直接抓取 YouTube 页面模式名称必须精确extract_wisdom不是extractwisdom拿不准时用fabric --list核对长内容可能超出模式上下文限制对于超长输入先切块或用摘要模式先行压缩执行日志每次工作流完成后向~/.claude/LIFEOS/MEMORY/SKILLS/execution.jsonl追加一行 JSONL 记录含时间戳、技能名、工作流名、输入摘要、状态、耗时失败时记录status: error十、核心洞察该技能的价值在于为任务选择正确的模式。当用户说 Create a threat model using Fabric 时正确的动作是识别 threat model 意图知道可用选项create_threat_model、create_stride_threat_model、create_threat_scenarios选择最佳匹配通常默认create_threat_model除非用户明确指定 STRIDE立即执行fabric [content] -p create_threat_model错误做法以下是所有模式你挑一个吧。正确做法我将使用create_threat_model来处理 → 立即执行。这一直接行动哲学贯穿整个工作流模式选择的准确性直接决定输出质量而 LifeOS 将其进一步演进为选择后原生执行让 240 个专业提示词真正成为随手可用的能力库。十一、延伸阅读Fabric 技能主文档原生执行机制、模式类别统计、变更日志与执行日志规范ExecutePattern 工作流原生执行四步流程、Auto-Harvest 侧效应、错误处理模板UpdatePatterns 工作流模式更新、同步与验证的完整命令模式目录240 模式的实际存放位置每个模式目录下含system.md模式一句话说明快速浏览全部模式用途Research 技能主文档Fabric 工作流在整体多智能体研究体系中的路由位置【免费下载链接】LifeOS⛰️ The Life Operating System — an intent engineering platform that moves you from your current state to your ideal state, in life and work.项目地址: https://gitcode.com/GitHub_Trending/pe/LifeOS创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考