[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-mgechev--skills-best-practices":3,"tool-mgechev--skills-best-practices":62},[4,18,26,36,46,54],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":17},4358,"openclaw","openclaw\u002Fopenclaw","OpenClaw 是一款专为个人打造的本地化 AI 助手，旨在让你在自己的设备上拥有完全可控的智能伙伴。它打破了传统 AI 助手局限于特定网页或应用的束缚，能够直接接入你日常使用的各类通讯渠道，包括微信、WhatsApp、Telegram、Discord、iMessage 等数十种平台。无论你在哪个聊天软件中发送消息，OpenClaw 都能即时响应，甚至支持在 macOS、iOS 和 Android 设备上进行语音交互，并提供实时的画布渲染功能供你操控。\n\n这款工具主要解决了用户对数据隐私、响应速度以及“始终在线”体验的需求。通过将 AI 部署在本地，用户无需依赖云端服务即可享受快速、私密的智能辅助，真正实现了“你的数据，你做主”。其独特的技术亮点在于强大的网关架构，将控制平面与核心助手分离，确保跨平台通信的流畅性与扩展性。\n\nOpenClaw 非常适合希望构建个性化工作流的技术爱好者、开发者，以及注重隐私保护且不愿被单一生态绑定的普通用户。只要具备基础的终端操作能力（支持 macOS、Linux 及 Windows WSL2），即可通过简单的命令行引导完成部署。如果你渴望拥有一个懂你",349277,3,"2026-04-06T06:32:30",[13,14,15,16],"Agent","开发框架","图像","数据工具","ready",{"id":19,"name":20,"github_repo":21,"description_zh":22,"stars":23,"difficulty_score":10,"last_commit_at":24,"category_tags":25,"status":17},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,"2026-04-05T11:01:52",[14,15,13],{"id":27,"name":28,"github_repo":29,"description_zh":30,"stars":31,"difficulty_score":32,"last_commit_at":33,"category_tags":34,"status":17},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",159636,2,"2026-04-17T23:33:34",[14,13,35],"语言模型",{"id":37,"name":38,"github_repo":39,"description_zh":40,"stars":41,"difficulty_score":42,"last_commit_at":43,"category_tags":44,"status":17},8272,"opencode","anomalyco\u002Fopencode","OpenCode 是一款开源的 AI 编程助手（Coding Agent），旨在像一位智能搭档一样融入您的开发流程。它不仅仅是一个代码补全插件，而是一个能够理解项目上下文、自主规划任务并执行复杂编码操作的智能体。无论是生成全新功能、重构现有代码，还是排查难以定位的 Bug，OpenCode 都能通过自然语言交互高效完成，显著减少开发者在重复性劳动和上下文切换上的时间消耗。\n\n这款工具专为软件开发者、工程师及技术研究人员设计，特别适合希望利用大模型能力来提升编码效率、加速原型开发或处理遗留代码维护的专业人群。其核心亮点在于完全开源的架构，这意味着用户可以审查代码逻辑、自定义行为策略，甚至私有化部署以保障数据安全，彻底打破了传统闭源 AI 助手的“黑盒”限制。\n\n在技术体验上，OpenCode 提供了灵活的终端界面（Terminal UI）和正在测试中的桌面应用程序，支持 macOS、Windows 及 Linux 全平台。它兼容多种包管理工具，安装便捷，并能无缝集成到现有的开发环境中。无论您是追求极致控制权的资深极客，还是渴望提升产出的独立开发者，OpenCode 都提供了一个透明、可信",144296,1,"2026-04-16T14:50:03",[13,45],"插件",{"id":47,"name":48,"github_repo":49,"description_zh":50,"stars":51,"difficulty_score":32,"last_commit_at":52,"category_tags":53,"status":17},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",108322,"2026-04-10T11:39:34",[14,15,13],{"id":55,"name":56,"github_repo":57,"description_zh":58,"stars":59,"difficulty_score":32,"last_commit_at":60,"category_tags":61,"status":17},6121,"gemini-cli","google-gemini\u002Fgemini-cli","gemini-cli 是一款由谷歌推出的开源 AI 命令行工具，它将强大的 Gemini 大模型能力直接集成到用户的终端环境中。对于习惯在命令行工作的开发者而言，它提供了一条从输入提示词到获取模型响应的最短路径，无需切换窗口即可享受智能辅助。\n\n这款工具主要解决了开发过程中频繁上下文切换的痛点，让用户能在熟悉的终端界面内直接完成代码理解、生成、调试以及自动化运维任务。无论是查询大型代码库、根据草图生成应用，还是执行复杂的 Git 操作，gemini-cli 都能通过自然语言指令高效处理。\n\n它特别适合广大软件工程师、DevOps 人员及技术研究人员使用。其核心亮点包括支持高达 100 万 token 的超长上下文窗口，具备出色的逻辑推理能力；内置 Google 搜索、文件操作及 Shell 命令执行等实用工具；更独特的是，它支持 MCP（模型上下文协议），允许用户灵活扩展自定义集成，连接如图像生成等外部能力。此外，个人谷歌账号即可享受免费的额度支持，且项目基于 Apache 2.0 协议完全开源，是提升终端工作效率的理想助手。",100752,"2026-04-10T01:20:03",[45,13,15,14],{"id":63,"github_repo":64,"name":65,"description_en":66,"description_zh":67,"ai_summary_zh":67,"readme_en":68,"readme_zh":69,"quickstart_zh":70,"use_case_zh":71,"hero_image_url":72,"owner_login":73,"owner_name":74,"owner_avatar_url":75,"owner_bio":76,"owner_company":77,"owner_location":78,"owner_email":79,"owner_twitter":73,"owner_website":80,"owner_url":81,"languages":82,"stars":87,"forks":88,"last_commit_at":89,"license":90,"difficulty_score":42,"env_os":91,"env_gpu":91,"env_ram":91,"env_deps":92,"category_tags":95,"github_topics":90,"view_count":32,"oss_zip_url":90,"oss_zip_packed_at":90,"status":17,"created_at":96,"updated_at":97,"faqs":98,"releases":99},8958,"mgechev\u002Fskills-best-practices","skills-best-practices","Write professional-grade skills for agents, validate them using LLMs, and maintain a lean context window.","skills-best-practices 是一套专为构建高质量 AI 智能体（Agent）技能而设计的开源指南。它旨在解决开发者在创建智能体工具时常见的痛点，如提示词结构混乱、上下文窗口冗余以及技能难以被智能体准确识别和调用等问题。\n\n这套指南主要适合从事 AI 应用开发的工程师、Prompt 工程师以及希望提升智能体执行稳定性的研究人员使用。其核心技术亮点在于提出了一套标准化的技能目录结构，将元数据（SKILL.md）、可执行脚本、参考文档和静态资源分离管理。它特别强调“渐进式披露”策略，指导开发者如何将详细信息卸载到子目录中，仅在需要时由智能体按需加载，从而极大节省宝贵的上下文令牌（Token）。此外，它还提供了针对智能体路由机制优化的命名规范和描述撰写技巧，通过包含“负面触发条件”来确保技能调用的精准度。遵循这些最佳实践，能帮助团队打造出更专业、高效且易于维护的智能体技能库。","# Best Practices for Creating Agent Skills\n\nThis guide explains how to write professional-grade skills for agents, validate them using LLMs, and maintain a lean context window.\n\nThis guide is a concentrated set of best practices for creating agent skills. If you're looking for a comprehensive documentation see [Claude's docs](https:\u002F\u002Fplatform.claude.com\u002Fdocs\u002Fen\u002Fagents-and-tools\u002Fagent-skills\u002Fbest-practices).\n\n**To evaluate if your skills do well and prevent regressions, check out [skillgrade]((https:\u002F\u002Fgithub.com\u002Fmgechev\u002Fskillgrade).**\n\n## Structure of a skill\n\nEvery skill must follow this directory structure:\n\nPlaintext\n\n```\nskill-name\u002F\n├── SKILL.md              # Required: Metadata + core instructions (\u003C500 lines)\n├── scripts\u002F              # Executable code (Python\u002FBash) designed as tiny CLIs\n├── references\u002F           # Supplementary context (schemas, cheatsheets) \n└── assets\u002F               # Templates or static files used in output\n```\n\n* **SKILL.md:** Acts as the \"brain.\" Use it for navigation and high-level procedures.  \n* **References:** Link directly from SKILL.md. Keep them **one level deep** only.  \n* **Scripts:** Use for fragile\u002Frepetitive operations where variation is a bug. **Do not bundle library code here**;\n\n## Optimize the frontmatter for discoverability\n\nThe `name` and `description` in the frontmatter of your `SKILL.md` are the only fields that the agent sees before triggering a skill. If they are not optimized for discoverability and specific enough, your skill is invisible.\n\n* **Adhere to Strict Naming:** The name field must be 1-64 characters, contain only lowercase letters, numbers, and hyphens (no consecutive hyphens), and **must exactly match the parent directory name** (e.g., name: `angular-testing` must live in `angular-testing\u002FSKILL.md`).  \n* **Write Trigger-Optimized Descriptions:** (Max 1,024 characters). This is the only metadata the agent sees for routing. Describe the capability in the third person and include \"negative triggers.\"  \n  * **Bad:** \"React skills.\" (Too vague).\n  * **Good:** \"Creates and builds React components using Tailwind CSS. Use when the user wants to update component styles or UI logic. Don't use it for Vue, Svelte, or vanilla CSS projects.\"\n\n## Progressive disclosure and resource management\n\nMaintain a pristine context window by loading information only when needed. **SKILL.md** is the \"brain\" for high-level logic; offload details to subdirectories.\n\n* **Keep SKILL.md Lean:** Limit the main file to **\\\u003C500 lines**. Use it for navigation and primary procedures.  \n* **Use Flat Subdirectories:** Move bulky context to standard folders. Keep files exactly **one level deep** (e.g., `references\u002Fschema.md`, not `references\u002Fdb\u002Fv1\u002Fschema.md`).  \n  * `references\u002F`: API docs, cheatsheets, domain logic.  \n  * `scripts\u002F`: Executable code for deterministic tasks.  \n  * `assets\u002F`: Output templates, JSON schemas, images.  \n* **Just-in-Time (JiT) Loading:** Explicitly instruct the agent when to read a file. It will not see these resources until you direct it to (e.g., *\"See `references\u002Fauth-flow.md` for specific error codes\"*).  \n* **Explicit Pathing:** Always use **relative paths** with forward slashes (`\u002F`), regardless of the OS.\n\nSkills are for agents, not humans. To keep the context window lean and avoid unnecessary token consumption. **Do not create:**\n\n* **Documentation files:** `README.md`, `CHANGELOG.md`, or `INSTALLATION_GUIDE.md`.  \n* **Redundant logic:** If the agent already handles a task reliably without help, delete the instruction.  \n* **Library code:** Skills should reference existing tools or contain tiny, single-purpose scripts. Long-lived library code belongs in standard repo CLI directories.\n\n## Use specific procedural instructions instead of prose\n\nCreate instructions for LLMs instead of humans.\n\n* **Use Step-by-Step Numbering:** Define the workflow as a strict chronological sequence. If there is a decision tree, map it out clearly (e.g., *\"Step 2: If you need source maps run `ng build --source-map`. Otherwise, skip to Step 3.\"*).  \n* **Provide Concrete Templates:** Agents pattern-match exceptionally well. Instead of spending paragraphs describing how a JSON output should look, place a template in the assets\u002F folder and instruct the agent to copy its structure.  \n* **Write in the Third-Person Imperative:** Frame instructions as direct commands to the agent (e.g., *\"Extract the text...\"* rather than *\"I will extract...\"* or *\"You should extract...\"*).\n\nBe specific and consistent in the way you reference concepts in your skill files.\n\n* **Use identical terminology:** Pick a single term to refer to a specific concept.  \n* **Specificity**: Use the most specific terminology that’s native to the domain that you describe. For example, in Angular use the concept “template” instead of “html”, “markup”, or “view”.\n\n## Bundle deterministic scripts for repetitive operations\n\nDon't ask the LLM to write complex parsing logic or boilerplate code from scratch every time it runs a skill.\n\n* **Offload fragile\u002Frepetitive tasks:** If the agent needs to parse a complex dataset or query a specific database, give it a tested Python, Bash, or Node script to run in the scripts\u002F directory.  \n* **Handle edge cases gracefully:** An agent relies on standard output (stdout\u002Fstderr) to know if a script succeeded. Write scripts that return highly descriptive, human-readable error messages so the agent knows exactly how to self-correct without needing user intervention.\n\n# Validation Guide\n\nSince LLMs will be using your skills, the best way I’ve identified to ensure they are useful is in collaboration with LLMs.\n\nIt’s critical to have evals for your skills to make sure the changes you’re making have a positive impact and don’t lead to regression. A popular benchmark for skills is [SkillsBench](https:\u002F\u002Farxiv.org\u002Fabs\u002F2602.12670) which could help with some inspiration.\n\nOnce you draft the initial version of your skills, you can validate your work going through the following steps:\n\n### Discovery Validation\n\nAgents load skills based strictly on the YAML frontmatter. Test how an LLM interprets your description in isolation to prevent false triggers (like firing for a React app when it's meant for Angular).\n\nPaste exactly the text below into a fresh LLM chat:\n\n> I am building an Agent Skill based on the agentskills.io spec. Agents will decide whether to load this skill based entirely on the YAML metadata below.\n>\n> ```\n> name: angular-vite-migrator\n> description: Migrates Angular CLI projects from Webpack to Vite and esbuild. Use when the user wants to update builder configurations, replace webpack plugins with rollup equivalents, or speed up Angular compilation.\n> ```\n>\n> Based strictly on this description:\n> 1. Generate 3 realistic user prompts that you are 100% confident should trigger this skill.\n> 2. Generate 3 user prompts that sound similar but should NOT trigger this skill (e.g., migrating a React app to Vite, or just updating Angular versions).\n> 3. Critique the description: Is it too broad? Suggest an optimized rewrite.\n\nIn addition, prompt agents with assignments that you expect to trigger a skill read and inspect the thought process. Go back and forth with the agent to identify why it picked (or didn’t) particular skills.\n\n### Logic Validation\n\nEnsure your step-by-step instructions are deterministic and don't force the agent to hallucinate missing steps.\n\nFeed the LLM your entire `SKILL.md` and directory structure:\n\n> Here is the full draft of my SKILL.md and the directory tree of its supporting files.\n> \n> ```\n> ├── SKILL.md\n> ├── scripts\u002Fesbuild-optimizer.mjs\n> └── assets\u002Fvite.config.template.ts\n> ```\n> \n> [Paste your SKILL.md contents here]\n> Act as an autonomous agent that has just triggered this skill. Simulate your execution step-by-step based on a request to Migrate my Angular v17 app to Vite.\n>\n> For each step, write out your internal monologue:\n> 1. What exactly are you doing?\n> 2. Which specific file\u002Fscript are you reading or running?\n> 3. Flag any Execution Blockers: Point out the exact line where you are forced to guess or hallucinate because my instructions are ambiguous (e.g., how to map Angular environment files to Vite's import.meta.env).\n\n### Edge Case Testing\n\nForce the LLM to hunt for vulnerabilities, unsupported configurations, and failure states inherent to web tooling.\n\nAsk the LLM to attack your logic:\n\n> Now, switch roles. Act as a ruthless QA tester. Your goal is to break this skill.\n> Ask me 3 to 5 highly specific, challenging questions about edge cases, failure states, or missing fallbacks in the SKILL.md. Focus on:\n>\n> * What if `scripts\u002Fesbuild-optimizer.mjs` fails due to a legacy CommonJS dependency?\n> * What if the user's `angular.json` contains heavily customized Webpack builders (`@angular-builders\u002Fcustom-webpack`) that Vite doesn't support?\n> * Are there implicit assumptions I made about the user's Node environment?\n>\n> Do not fix these issues yet. Just ask me the numbered questions and wait for me to answer them.\n\n### Architecture Refinement\n\nLLMs often try to stuff large config files directly into the main prompt. Use this step to enforce progressive disclosure and shrink the token footprint.\n\nHave the LLM apply your fixes and restructure the skill:\n\n> Based on my answers to your edge-case questions, rewrite the SKILL.md file, strictly enforcing the Progressive Disclosure design pattern:\n>\n> 1. Keep the main `SKILL.md` strictly as a high-level set of steps using third-person imperative commands (e.g., Execute the esbuild script, Read the Vite config template).\n> 2. If there are dense rules, large `vite.config.ts` templates, or complex `angular.json` schemas currently in the file, remove them. Tell me to create a new file in `references\u002F` or `assets\u002F`, and replace the text in `SKILL.md` with a strict command to read that specific file only when needed.\n> 3. Add a dedicated Error Handling section at the bottom incorporating my answers about Webpack fallbacks and CommonJS resolution.\n","# 创建智能体技能的最佳实践\n\n本指南介绍了如何编写专业级别的智能体技能、使用大语言模型对其进行验证，以及如何保持简洁的上下文窗口。\n\n本指南是一套高度浓缩的最佳实践，用于创建智能体技能。如果您需要更全面的文档，请参阅 [Claude 的文档](https:\u002F\u002Fplatform.claude.com\u002Fdocs\u002Fen\u002Fagents-and-tools\u002Fagent-skills\u002Fbest-practices)。\n\n**要评估您的技能表现是否良好并防止功能退化，请查看 [skillgrade]((https:\u002F\u002Fgithub.com\u002Fmgechev\u002Fskillgrade)。**\n\n## 技能的结构\n\n每个技能都必须遵循以下目录结构：\n\n纯文本\n\n```\nskill-name\u002F\n├── SKILL.md              # 必需：元数据 + 核心指令（不超过500行）\n├── scripts\u002F              # 可执行代码（Python\u002FBash），设计为小型命令行工具\n├── references\u002F           # 补充上下文（模式、速查表等）\n└── assets\u002F               # 用于输出的模板或静态文件\n```\n\n* **SKILL.md：** 充当“大脑”。用于导航和高层次流程。\n* **References：** 直接从 SKILL.md 链接。仅保持**一层深度**。\n* **Scripts：** 用于处理脆弱或重复性操作，其中任何变化都可能引发错误。**请勿在此处捆绑库代码**；\n\n## 优化 frontmatter 以提高可发现性\n\n`SKILL.md` 文件中的 `name` 和 `description` 是智能体在触发技能之前唯一能看到的字段。如果它们没有针对可发现性进行优化且不够具体，您的技能将无法被识别。\n\n* **严格命名规范：** `name` 字段必须为 1–64 个字符，只能包含小写字母、数字和连字符（不允许连续连字符），并且**必须与父目录名称完全一致**（例如，名称为 `angular-testing` 的技能必须位于 `angular-testing\u002FSKILL.md` 中）。\n* **编写适合触发的描述：** （最多 1,024 字符）。这是智能体用于路由的唯一元数据。以第三人称描述功能，并包含“负面触发条件”。\n  * **不良示例：** “React 技能。”（过于笼统）。\n  * **良好示例：** “使用 Tailwind CSS 创建并构建 React 组件。当用户希望更新组件样式或 UI 逻辑时使用。请勿用于 Vue、Svelte 或原生 CSS 项目。”\n\n## 渐进式披露和资源管理\n\n通过仅在需要时加载信息来保持清晰的上下文窗口。**SKILL.md** 是用于高层次逻辑的“大脑”；将详细信息下放到子目录中。\n\n* **保持 SKILL.md 简洁：** 主文件限制在**500 行以内**。用于导航和主要流程。\n* **使用扁平子目录：** 将大量上下文移至标准文件夹。文件应保持**一层深度**（例如，`references\u002Fschema.md`，而不是 `references\u002Fdb\u002Fv1\u002Fschema.md`）。\n  * `references\u002F`：API 文档、速查表、领域逻辑。\n  * `scripts\u002F`：用于确定性任务的可执行代码。\n  * `assets\u002F`：输出模板、JSON 模式、图片。\n* **即时加载（JiT）：** 明确指示智能体何时读取文件。在您明确指示之前，它不会看到这些资源（例如：“请参阅 `references\u002Fauth-flow.md` 以获取特定错误代码”）。\n* **显式路径：** 始终使用带有正斜杠 (`\u002F`) 的**相对路径**，无论操作系统如何。\n\n技能是为智能体设计的，而非人类。为了保持上下文窗口简洁并避免不必要的 token 消耗，**请勿创建：**\n\n* **文档文件：** `README.md`、`CHANGELOG.md` 或 `INSTALLATION_GUIDE.md`。\n* **冗余逻辑：** 如果智能体已经能够可靠地完成某项任务而无需帮助，则应删除相关指令。\n* **库代码：** 技能应引用现有工具，或包含小型的、单一用途的脚本。长期存在的库代码应放在标准仓库的 CLI 目录中。\n\n## 使用具体的程序化指令而非散文\n\n为 LLM 而非人类编写指令。\n\n* **使用逐步编号：** 将工作流程定义为严格的按时间顺序排列的步骤。如果有决策树，应清晰地绘制出来（例如：“第 2 步：如果需要源映射，请运行 `ng build --source-map`。否则，跳至第 3 步。”）。\n* **提供具体模板：** 智能体对模式匹配非常擅长。与其花费数段文字描述 JSON 输出应如何呈现，不如将模板放置在 `assets\u002F` 文件夹中，并指示智能体复制其结构。\n* **使用第三人称祈使语气：** 将指令表述为直接对智能体的命令（例如：“提取文本……”而不是“我将提取……”或“你应该提取……”）。\n\n在技能文件中引用概念时，务必保持具体性和一致性。\n\n* **使用一致的术语：** 为特定概念选择一个统一的术语。\n* **具体性：** 使用最符合您所描述领域的专业术语。例如，在 Angular 中使用“template”这一概念，而非“html”、“markup”或“view”。\n\n## 为重复性操作打包确定性脚本\n\n不要每次运行技能时都要求 LLM 从头开始编写复杂的解析逻辑或样板代码。\n\n* **将脆弱或重复的任务下放：** 如果智能体需要解析复杂的数据集或查询特定数据库，可以为其提供经过测试的 Python、Bash 或 Node 脚本，存放在 `scripts\u002F` 目录中供其运行。\n* **优雅地处理边缘情况：** 智能体依靠标准输出（stdout\u002Fstderr）来判断脚本是否成功。编写返回高度描述性、易于理解的错误信息的脚本，以便智能体能够准确地自我纠正，而无需用户干预。\n\n# 验证指南\n\n由于 LLM 将会使用您的技能，我发现确保其有用性的最佳方法就是与 LLM 合作。\n\n对技能进行评估至关重要，以确保您所做的更改产生积极影响，且不会导致功能退化。一个流行的技能基准测试是 [SkillsBench](https:\u002F\u002Farxiv.org\u002Fabs\u002F2602.12670)，它可以为您提供一些灵感。\n\n在您起草技能的初始版本后，可以通过以下步骤来验证您的工作：\n\n### 发现验证\n\n代理会严格按照 YAML 前置元数据来加载技能。请单独测试 LLM 对您描述的理解，以避免误触发（例如，当该技能适用于 Angular 时却因 React 应用而被触发）。\n\n将以下文本原封不动地粘贴到一个新的 LLM 对话中：\n\n> 我正在根据 agentskills.io 规范构建一个代理技能。代理将完全依据下方的 YAML 元数据来决定是否加载此技能。\n>\n> ```\n> name: angular-vite-migrator\n> description: 将 Angular CLI 项目从 Webpack 迁移到 Vite 和 esbuild。当用户希望更新构建配置、用 rollup 等效插件替换 webpack 插件，或加快 Angular 编译速度时使用。\n> ```\n>\n> 仅基于此描述：\n> 1. 生成 3 条您 100% 确信应该触发此技能的真实用户提示。\n> 2. 生成 3 条听起来相似但**不应**触发此技能的用户提示（例如，将 React 应用迁移到 Vite，或仅仅更新 Angular 版本）。\n> 3. 评价该描述：是否过于宽泛？请提出优化后的改写建议。\n\n此外，向代理提供预期会触发该技能的任务，并仔细检查其思考过程。与代理反复交流，明确它为何选择（或未选择）特定技能。\n\n### 逻辑验证\n\n确保您的步骤式指令具有确定性，且不会迫使代理凭空猜测缺失的步骤。\n\n将您的整个 `SKILL.md` 文件及目录结构输入 LLM：\n\n> 以下是我的 SKILL.md 完整草稿及其支持文件的目录结构。\n> \n> ```\n> ├── SKILL.md\n> ├── scripts\u002Fesbuild-optimizer.mjs\n> └── assets\u002Fvite.config.template.ts\n> ```\n> \n> [在此处粘贴您的 SKILL.md 内容]\n> 请扮演刚刚触发此技能的自主代理，模拟执行过程，任务是将我的 Angular v17 应用迁移到 Vite。\n>\n> 针对每一步，请写出您的内心独白：\n> 1. 您具体在做什么？\n> 2. 您正在读取或运行哪份具体的文件\u002F脚本？\n> 3. 标记任何执行障碍：指出由于我的指令不够明确而不得不猜测或“幻觉”出答案的确切位置（例如，如何将 Angular 环境文件映射到 Vite 的 import.meta.env）。\n\n### 边界场景测试\n\n强制 LLM 寻找潜在漏洞、不支持的配置以及 Web 工具固有的失败状态。\n\n让 LLM 攻击您的逻辑：\n\n> 现在请切换角色，扮演一位严苛的 QA 测试员。您的目标是“破坏”这个技能。\n> 请就边界场景、失败状态或 SKILL.md 中缺失的回退机制，向我提出 3 到 5 个高度具体且具有挑战性的问题。重点关注：\n>\n> * 如果 `scripts\u002Fesbuild-optimizer.mjs` 因遗留的 CommonJS 依赖而失败怎么办？\n> * 如果用户的 `angular.json` 包含大量自定义的 Webpack 构建器（如 `@angular-builders\u002Fcustom-webpack`），而 Vite 又不支持这些配置，该如何处理？\n> * 我是否对用户的 Node 环境做出了一些隐含假设？\n>\n> 请先不要修复这些问题，只需依次提出上述问题并等待我的回答。\n\n### 架构优化\n\nLLM 经常会尝试将大型配置文件直接塞入主提示中。通过这一步骤，您可以实施渐进式披露策略，从而减少 token 消耗。\n\n让 LLM 应用您的修复方案并重构技能：\n\n> 根据我对您提出的边界场景问题的回答，重新编写 SKILL.md 文件，严格遵循渐进式披露的设计模式：\n>\n> 1. 保持主 `SKILL.md` 仅为高层次的步骤集合，采用第三人称祈使句形式（例如，“执行 esbuild 脚本”、“阅读 Vite 配置模板”）。\n> 2. 如果文件中包含密集规则、大型 `vite.config.ts` 模板或复杂的 `angular.json` 模式等，将其移除。指示我在 `references\u002F` 或 `assets\u002F` 目录下创建新文件，并用一条明确的指令替代 `SKILL.md` 中的相关内容，仅在需要时才读取该文件。\n> 3. 在底部添加专门的错误处理部分，结合我对 Webpack 回退机制和 CommonJS 解析问题的回答进行完善。","# skills-best-practices 快速上手指南\n\n本指南旨在帮助开发者创建专业级的 Agent 技能（Skills），优化 LLM 上下文窗口，并通过标准化结构确保技能的可靠性和可发现性。\n\n## 环境准备\n\n*   **系统要求**：支持 Linux、macOS 或 Windows（建议使用类 Unix 环境以获得最佳脚本兼容性）。\n*   **前置依赖**：\n    *   任意主流 LLM 接入环境（用于验证和运行技能）。\n    *   基础命令行工具（Bash\u002FZsh）。\n    *   （可选）Python、Node.js 或 Go，用于编写 `scripts\u002F` 目录下的确定性脚本。\n*   **推荐工具**：\n    *   使用 [skillgrade](https:\u002F\u002Fgithub.com\u002Fmgechev\u002Fskillgrade) 进行技能评估和回归测试。\n\n## 安装步骤\n\n该工具并非传统软件包，而是一套**文件结构规范**。无需执行安装命令，只需在您的项目中按照以下标准创建目录和文件即可。\n\n1.  **创建技能根目录**：\n    目录名称必须全小写，仅包含字母、数字和连字符（不能连续使用连字符）。\n    ```bash\n    mkdir angular-testing\n    cd angular-testing\n    ```\n\n2.  **构建标准目录结构**：\n    在根目录下创建以下文件和文件夹：\n    ```bash\n    touch SKILL.md\n    mkdir scripts\n    mkdir references\n    mkdir assets\n    ```\n\n3.  **初始化核心文件**：\n    在 `SKILL.md` 中写入符合规范的 YAML Frontmatter 和指令（详见“基本使用”）。\n\n## 基本使用\n\n### 1. 编写 SKILL.md (核心大脑)\n\n`SKILL.md` 是技能的入口，必须包含优化的元数据以便 Agent 发现，并遵循“渐进式披露”原则以保持上下文精简。\n\n**示例内容 (`angular-testing\u002FSKILL.md`)：**\n\n```markdown\n---\nname: angular-testing\ndescription: Creates and builds React components using Tailwind CSS. Use when the user wants to update component styles or UI logic. Don't use it for Vue, Svelte, or vanilla CSS projects.\n---\n\n# Angular Testing Skill Instructions\n\nYou are an expert agent specialized in Angular testing strategies.\n\n## Workflow\nFollow these steps strictly in order:\n\n1. **Analyze Requirements**: Identify the component to be tested and the specific testing framework (Jest\u002FKarma).\n2. **Load References**: If specific error codes or schema definitions are needed, read `references\u002Ftesting-schema.md`. Do not load this file unless explicitly required by the current step.\n3. **Execute Scripts**: For repetitive setup tasks, run the deterministic script:\n   - Execute `scripts\u002Fgenerate-test-boilerplate.sh` with the component name as an argument.\n4. **Generate Output**: Use the template found in `assets\u002Ftest-template.ts` to structure the final test file.\n\n## Error Handling\n- If `scripts\u002Fgenerate-test-boilerplate.sh` fails, check the stderr output. If it mentions \"legacy dependency\", advise the user to update their Node version.\n- Do not hallucinate configuration steps. If a step is unclear, refer to `references\u002Fangular-cli-docs.md`.\n\n## Constraints\n- Keep instructions in the third-person imperative (e.g., \"Run the script\", not \"You should run\").\n- Do not include library code here; reference existing tools or small CLI scripts only.\n```\n\n### 2. 添加辅助资源 (渐进式披露)\n\n将大型配置、Schema 或模板移至子目录，仅在 `SKILL.md` 中指示 Agent 何时读取。\n\n*   **references\u002F**: 存放 API 文档片段、Cheatsheets。\n    *   *规则*：保持扁平结构，仅限一级目录（如 `references\u002Fschema.md`，禁止 `references\u002Fdb\u002Fv1\u002Fschema.md`）。\n*   **scripts\u002F**: 存放处理脆弱或重复任务的脚本（Python\u002FBash\u002FNode）。\n    *   *规则*：脚本必须输出清晰的人类可读错误信息，以便 Agent 自我修正。\n*   **assets\u002F**: 存放输出模板、JSON Schema 或静态文件。\n\n### 3. 验证技能 (Validation)\n\n在部署前，利用 LLM 对技能进行三轮验证，确保其逻辑严密且触发准确。\n\n**步骤 A: 发现验证 (Discovery Validation)**\n将 `SKILL.md` 的 Frontmatter 部分发送给 LLM，提示如下：\n> \"Based strictly on this description: 1. Generate 3 realistic user prompts that should trigger this skill. 2. Generate 3 similar prompts that should NOT trigger this skill. 3. Critique the description for breadth.\"\n\n**步骤 B: 逻辑验证 (Logic Validation)**\n将完整的 `SKILL.md` 和目录树发送给 LLM，要求其模拟执行：\n> \"Act as an autonomous agent... Simulate your execution step-by-step... Flag any Execution Blockers where instructions are ambiguous.\"\n\n**步骤 C: 边界测试 (Edge Case Testing)**\n要求 LLM 扮演测试人员寻找漏洞：\n> \"Act as a ruthless QA tester. Ask me 3 to 5 highly specific questions about edge cases, failure states, or missing fallbacks in the SKILL.md.\"\n\n根据反馈迭代修改 `SKILL.md` 和脚本，直至逻辑无歧义且上下文占用最小化。","某全栈开发团队正在构建一个能自动处理复杂前端任务（如组件重构、样式迁移）的 AI 代理，旨在提升日常编码效率。\n\n### 没有 skills-best-practices 时\n- **上下文爆炸**：将所有 API 文档和逻辑说明堆砌在单个提示词文件中，导致 Token 消耗巨大且经常超出模型窗口限制，引发信息丢失。\n- **技能触发失败**：技能描述过于模糊（如仅写\"React 技能”），导致代理无法准确识别何时调用该技能，或在 Vue 项目中错误触发。\n- **执行结果不稳定**：缺乏标准化的脚本目录和分步指令，代理在处理重复性操作时容易产生幻觉，输出格式混乱或代码逻辑错误。\n- **维护成本高昂**：文件结构杂乱无章，包含大量人类阅读的 README 或冗余逻辑，更新某个功能时需重新梳理整个庞大的上下文。\n\n### 使用 skills-best-practices 后\n- **上下文极致精简**：遵循“按需加载”原则，主文件 `SKILL.md` 控制在 500 行内，仅在需要时引导代理读取 `references\u002F` 中的具体文档，大幅节省 Token。\n- **路由精准命中**：优化元数据描述，明确写入“负向触发条件”（如“勿用于 Vue 项目”），确保代理仅在匹配 Tailwind CSS 样式更新等特定场景时才激活技能。\n- **操作流程标准化**：将易错操作封装为 `scripts\u002F` 下的微型 CLI 脚本，并用严格的步骤编号替代自然语言叙述，保证每次执行结果 deterministic（确定性）且专业。\n- **架构清晰易扩展**：严格区分元数据、脚本、参考资源和资产目录，移除人类文档冗余，使新技能的开发和旧技能的迭代变得像搭积木一样高效。\n\nskills-best-practices 通过将非结构化的提示词工程转化为标准化的软件工程范式，让 AI 代理从“偶尔可用的聊天机器人”进化为“稳定可靠的专业开发者”。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fmgechev_skills-best-practices_a01a3911.png","mgechev","Minko Gechev","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fmgechev_710da23e.jpg","Improving developer productivity with AI","Google","California 🌴","mgechev@gmail.com","https:\u002F\u002Fblog.mgechev.com\u002F","https:\u002F\u002Fgithub.com\u002Fmgechev",[83],{"name":84,"color":85,"percentage":86},"Python","#3572A5",100,1813,129,"2026-04-18T00:03:40",null,"未说明",{"notes":93,"python":91,"dependencies":94},"该工具并非传统的可执行软件或模型，而是一套用于编写和验证 AI Agent 技能（Skills）的指南和规范。它不包含需要特定操作系统、GPU、内存或 Python 版本运行的代码库。用户需遵循其定义的目录结构（SKILL.md, scripts\u002F, references\u002F, assets\u002F）来创建技能文件，并利用 LLM 进行验证。脚本部分支持 Python、Bash 或 Node.js，但具体版本取决于用户编写的脚本内容而非工具本身的要求。",[91],[13,14],"2026-03-27T02:49:30.150509","2026-04-18T14:33:29.601988",[],[]]