
In SKILL.md【免费下载链接】ruflo The original agent meta-harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, RAG integration, and native Claude Code / Codex / Hermes and many more Integrated项目地址: https://gitcode.com/GitHub_Trending/cl/rufloSee Advanced Configuration for complex scenarios. See API Reference for complete documentation. Use template:resources/templates/api-template.jsClaude will load these files ONLY if needed**收益量化**安装 100 个技能仅占用约 6KB 上下文只有激活技能的正文1–10KB才会进入上下文。这正是 Ruflo 能同时承载 40 打包技能含 v3 生态中 claude-flow 各模块技能而不会拖垮会话的底层原因。 ## 6. SKILL.md 内容结构推荐的 4 级内容模型 一份好的技能正文应遵循从概览到罕见场景参考的 4 层递进让不同需求深度的调用方各取所需name: Your Skill Name description: What it does and when to use itYour Skill NameLevel 1: Overview (Always Read First)Brief 2-3 sentence description of the skill.PrerequisitesRequirement 1Requirement 2What This Skill DoesPrimary functionSecondary functionKey benefitLevel 2: Quick Start (For Fast Onboarding)Basic Usage# Simplest use case command --option valueCommon ScenariosScenario 1: How to...Scenario 2: How to...Level 3: Detailed Instructions (For Deep Work)Step-by-Step GuideStep 1: Initial Setup# CommandsExpected output:Success messageStep 2: ConfigurationConfiguration option 1Configuration option 2Step 3: ExecutionRun the main commandVerify resultsAdvanced OptionsOption 1: Custom Configuration# Advanced usageOption 2: Integration# Integration stepsLevel 4: Reference (Rarely Needed)TroubleshootingIssue: Common ProblemSymptoms: What you seeCause: Why it happensSolution: How to fix# Fix commandIssue: Another ProblemSolution: Steps to resolveComplete API ReferenceSee API_REFERENCE.mdExamplesSee examples/Related SkillsRelated Skill 1Related Skill 2 注上述 docs/、resources/ 路径属于某个技能目录**内部的相对引用**示例并非本仓库文件它们演示的是技能正文保持精简、把深度内容外置并按需加载的写法。 ## 7. 内容编写最佳实践 ### 7.1 写出高命中率的 description **关键词前置Front-Load Keywords**Claude 通过扫描 description 匹配技能关键词必须出现在开头 yaml # ✅ GOOD: Keywords first description: Generate TypeScript interfaces from JSON schema. Use when converting schemas, creating types, or building API clients. # ❌ BAD: Keywords buried description: This skill helps developers who need to work with JSON schemas by providing a way to generate TypeScript interfaces.显式声明触发条件Include Trigger Conditions# ✅ GOOD: Clear when clause description: Debug React performance issues using Chrome DevTools. Use when components re-render unnecessarily, investigating slow updates, or optimizing bundle size. # ❌ BAD: No trigger conditions description: Helps with React performance debugging.描述要具体Be Specific# ✅ GOOD: Specific technologies description: Create Express.js REST endpoints with Joi validation, Swagger docs, and Jest tests. Use when building new APIs or adding endpoints. # ❌ BAD: Too generic description: Build API endpoints with proper validation and testing.7.2 渐进式写作原则Level 1 保持简短概览用 1–2 句话讲清做什么、几步骤完成Level 2 覆盖 80% 高频路径给出最常用的一条命令即达Level 3 展开细节逐步引导完成主流程与高级选项Level 4 收纳边界场景复杂场景HOC、render props、自定义 hooks 等一律外链到ADVANCED.md等独立文档。仓库实例佐证以 plugin/skills/pair-programming/SKILL.md1202 行为例它的正文结构是标准的## What This Skill Does能力清单→## Prerequisites前置条件→## Quick Start基础会话与 TDD 会话两条快路径→## Complete GuideSession 控制、模式、验证等长文档description 同时写明了 what 与 when。这正是 Skill Builder 规范在真实技能上的落地样本。8. 添加脚本与资源8.1 scripts/ 目录可执行脚本统一放在技能目录下的scripts/并在SKILL.md中引用# In skill directory scripts/ ├── setup.sh # Initialization script ├── validate.js # Validation logic ├── generate.py # Code generation └── deploy.sh # Deployment script## Setup Run the setup script: bash ./scripts/setup.shValidationValidate your configuration:node scripts/validate.js config.json### 8.2 resources/ 目录 模板、示例、schema 等静态资源放入 resources/供脚本引用或复制 bash resources/ ├── templates/ │ ├── component.tsx.template │ ├── test.spec.ts.template │ └── story.stories.tsx.template ├── examples/ │ ├── basic-example/ │ ├── advanced-example/ │ └── integration-example/ └── schemas/ ├── config.schema.json └── output.schema.json## Templates Use the component template: bash cp resources/templates/component.tsx.template src/components/MyComponent.tsxExamplesSee working examples inresources/examples/:basic-example/- Simple componentadvanced-example/- With hooks and context9. 文件引用与导航模式Claude 能够自动导航到被引用的文件支持三种引用写法Markdown 链接跨文档See Advanced Configuration for complex scenarios. See Troubleshooting Guide if you encounter errors.相对路径引用目录/资源Use the template located at resources/templates/api-template.js See examples in resources/examples/basic-usage/内联文件内容贴出关键片段## Example Configuration See resources/examples/config.json: json { option: value }**核心实践建议让 SKILL.md 保持精简约 2–5KB长内容拆分到独立文件并在正文引用。** Claude 只会按需加载被访问的文件这是控制上下文开销的关键杠杆。 ## 10. 发布前的验证清单 在发布技能前逐项核对 **YAML Frontmatter** - [ ] 以 --- 开头 - [ ] 包含 name 字段≤64 字符 - [ ] 包含 description 字段≤1024 字符 - [ ] description 同时含 what 与 when - [ ] 以 --- 结束 - [ ] 无 YAML 语法错误 **文件结构** - [ ] SKILL.md 存在于技能目录中 - [ ] 目录直接位于 ~/.claude/skills/[skill-name]/ 或 .claude/skills/[skill-name]/ - [ ] 目录名清晰、有描述性 - [ ] **无嵌套子目录**Claude Code 要求顶层结构 **内容质量** - [ ] Level 1概览简短清晰 - [ ] Level 2快速开始给出常见用例 - [ ] Level 3细节提供逐步指南 - [ ] Level 4参考链接到进阶内容 - [ ] 示例具体且可运行 - [ ] Troubleshooting 覆盖常见问题 **渐进式披露** - [ ] 核心指令留在 SKILL.md约 2–5KB - [ ] 进阶内容置于独立 docs/ - [ ] 大型资源放入 resources/ 目录 - [ ] 层级间导航清晰 **测试** - [ ] 技能出现在 Claude 技能列表 - [ ] description 能被相关提问触发 - [ ] 指令清晰可执行 - [ ] 内置脚本执行成功 - [ ] 示例按文档可用 **仓库工程化延伸**人工清单之外Ruflo 用脚本将上述校验自动化。执行 node scripts/audit-skill-frontmatter.mjs 即可全仓扫描也支持 --format json 输出机器可读结果、--only plugin 单插件聚焦其检查项frontmatter 闭合、name/description 非空、allowed-tools 非通配、name 与目录名一致与本文清单形成互补。退出码约定0 无违规、1 存在违规、2 扫描错误找不到插件目录。 ## 11. 开箱即用的三套模板 ### 模板 1基础技能最小可用 text --- name: My Basic Skill description: One sentence what. One sentence when to use. --- # My Basic Skill ## What This Skill Does [2-3 sentences describing functionality] ## Quick Start bash # Single command to get startedStep-by-Step GuideStep 1: Setup[Instructions]Step 2: Usage[Instructions]Step 3: Verify[Instructions]TroubleshootingIssue: Problem descriptionSolution: Fix description模板 2进阶技能带脚本--- name: My Intermediate Skill description: Detailed what with key features. When to use with specific triggers: scaffolding, generating, building. --- # My Intermediate Skill ## Prerequisites - Requirement 1 - Requirement 2 ## What This Skill Does 1. Primary function 2. Secondary function 3. Integration capability ## Quick Start bash ./scripts/setup.sh ./scripts/generate.sh my-project ## Configuration Edit config.json: json { option1: value1, option2: value2 } ## Step-by-Step Guide ### Basic Usage [Steps for 80% use case] ### Advanced Usage [Steps for complex scenarios] ## Available Scripts - scripts/setup.sh - Initial setup - scripts/generate.sh - Code generation - scripts/validate.sh - Validation ## Resources - Templates: resources/templates/ - Examples: resources/examples/ ## Troubleshooting [Common issues and solutions] 模板 3高级技能完整功能--- name: My Advanced Skill description: Comprehensive what with all features and integrations. Use when [trigger 1], [trigger 2], or [trigger 3]. Supports [technology stack]. --- # My Advanced Skill ## Overview [Brief 2-3 sentence description] ## Prerequisites - Technology 1 (version X) - Technology 2 (version Y) - API keys or credentials ## What This Skill Does 1. **Core Feature**: Description 2. **Integration**: Description 3. **Automation**: Description --- ## Quick Start (60 seconds) ### Installation bash ./scripts/install.sh ### First Use bash ./scripts/quickstart.sh Expected output: ✓ Setup complete ✓ Configuration validated → Ready to use --- ## Configuration ### Basic Configuration Edit config.json: json { mode: production, features: [feature1, feature2] } ### Advanced Configuration See [Configuration Guide](https://link.gitcode.com/i/42a061ba185f933fc0d2e1f4046ffb9e) --- ## Step-by-Step Guide ### 1. Initial Setup [Detailed steps] ### 2. Core Workflow [Main procedures] ### 3. Integration [Integration steps] --- ## Advanced Features ### Feature 1: Custom Templates bash ./scripts/generate.sh --template custom ### Feature 2: Batch Processing bash ./scripts/batch.sh --input data.json ### Feature 3: CI/CD Integration See CI/CD Guide --- ## Scripts Reference | Script | Purpose | Usage | |--------|---------|-------| | install.sh | Install dependencies | ./scripts/install.sh | | generate.sh | Generate code | ./scripts/generate.sh [name] | | validate.sh | Validate output | ./scripts/validate.sh | | deploy.sh | Deploy to environment | ./scripts/deploy.sh [env] | --- ## Resources ### Templates - resources/templates/basic.template - Basic template - resources/templates/advanced.template - Advanced template ### Examples - resources/examples/basic/ - Simple example - resources/examples/advanced/ - Complex example - resources/examples/integration/ - Integration example ### Schemas - resources/schemas/config.schema.json - Configuration schema - resources/schemas/output.schema.json - Output validation --- ## Troubleshooting ### Issue: Installation Failed **Symptoms**: Error during install.sh **Cause**: Missing dependencies **Solution**: bash # Install prerequisites npm install -g required-package ./scripts/install.sh --force ### Issue: Validation Errors **Symptoms**: Validation script fails **Solution**: See Troubleshooting Guide --- ## API Reference Complete API documentation: API_REFERENCE.md ## Related Skills - Related Skill 1 - Related Skill 2 三套模板覆盖了技能的典型演化路径先以模板 1 跑通能被发现、能被触发再按需引入脚本与资源模板 2最终演进为含配置体系、脚本引用表、故障排查、CI/CD 集成的完整技能模板 3。12. 实战范例解析范例 1文档生成类技能--- name: README Generator description: Generate comprehensive README.md files for GitHub repositories. Use when starting new projects, documenting code, or improving existing READMEs. --- # README Generator ## What This Skill Does Creates well-structured README.md files with badges, installation, usage, and contribution sections. ## Quick Start bash # Answer a few questions ./scripts/generate-readme.sh # README.md created with: # - Project title and description # - Installation instructions # - Usage examples # - Contribution guidelines ## Customization Edit sections in resources/templates/sections/ before generating. 解读description 把 what生成完整 README与 when新项目、写文档、改进旧 README压缩在同一句里正文通过 Quick Start 快速展示产物结构把可定制面收敛到resources/templates/sections/一处——典型的 Level 2 快路径 Level 3 深度定位设计。范例 2代码生成类技能--- name: React Component Generator description: Generate React functional components with TypeScript, hooks, tests, and Storybook stories. Use when creating new components, scaffolding UI, or following component architecture patterns. --- # React Component Generator ## Prerequisites - Node.js 18 - React 18 - TypeScript 5 ## Quick Start bash ./scripts/generate-component.sh MyComponent # Creates: # - src/components/MyComponent/MyComponent.tsx # - src/components/MyComponent/MyComponent.test.tsx # - src/components/MyComponent/MyComponent.stories.tsx # - src/components/MyComponent/index.ts ## Step-by-Step Guide ### 1. Run Generator bash ./scripts/generate-component.sh ComponentName ### 2. Choose Template - Basic: Simple functional component - With State: useState hooks - With Context: useContext integration - With API: Data fetching component ### 3. Customize Edit generated files in src/components/ComponentName/ ## Templates See resources/templates/ for available component templates. 【免费下载链接】ruflo The original agent meta-harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, RAG integration, and native Claude Code / Codex / Hermes and many more Integrated项目地址: https://gitcode.com/GitHub_Trending/cl/ruflo创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考