Communitygithub.com

编写技能

创建具有适当结构、渐进式披露和打包资源的新代理技能。当用户想要创建、编写或构建新技能时使用。

编写技能 是什么?

该技能是一个完整的4阶段流水线,用于创建新的AI代理技能。它从“收集”阶段开始,通过领域分批问题获取需求,覆盖目的、用例、结构和工具4个领域。接着是“拷问”阶段,调用专门的grill-me技能(或直接使用AskUserQuestion作为回退方案)深入探讨意图、范围、设计和边缘案例等定制领域。然后进入“规划”阶段,使用蓝图模板生成结构化的技能蓝图,用户必须批准才能继续。最后是“实施”阶段,完全自动化地创建所有技能文件,包括主SKILL.md、参考文档和脚本,并通过自动验证和主观审查确保质量。它支持Claude Code、Cursor、Codex等AI代理平台,遵循严格的目录结构和质量标准,例如SKILL.md不超过100行。

兼容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/cdcoonce/Portfolio_Website/tree/HEAD/.claude/skills/write-a-skill

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

编写技能 是做什么的?

一个4阶段流水线:收集 → 拷问 → 规划 → 实施。

阶段1:收集

使用AskUserQuestion进行领域分批提问,覆盖4个领域。每个领域调用1次,提供2-4个选项和一个推荐(第一个选项标记为(推荐))。

  1. 目的——该技能涵盖什么任务/领域?谁使用它?
  2. 用例——哪些具体场景会触发此技能?哪些关键词?
  3. 结构——是否需要脚本?参考文件?单一SKILL.md还是多文件?
  4. 工具——应调用或引用哪些工具或其他技能?

阶段2:拷问

调用grill-me技能,传入收集到的需求。指示其使用skill-grill-domains.md中针对技能定制领域(意图、范围、设计、边缘案例)。跳过不相关领域(数据流、依赖项、部署、测试)。

回退方案(grill-me不可用): 直接使用AskUserQuestion运行内联mini-grill。对于skill-grill-domains.md中的每个领域,每次调用批处理2-4个问题,并提供推荐和选项。

阶段3:规划

使用blueprint-template.md中的模板生成结构化的技能蓝图。在对话上下文中展示蓝图(不写入磁盘)。用户必须批准后才能继续。如果用户要求修改,则修订并重新展示。

阶段4:实施

按照批准的蓝图创建所有技能文件。完全自动化——代理编写所有内容。

然后运行阶段4b:审查,使用quality-criteria.md中的标准:

  1. 自动验证——检查可衡量标准(行数、描述长度、触发器、参考深度)。在继续之前修复任何失败。
  2. 主观审查——通过AskUserQuestion向用户展示检查清单。如果用户指出问题,修订并重新验证。

技能结构

skill-name/
├── SKILL.md           # 主指令(必需,<100行)
├── references/        # 支持文档(如果需要)
│   └── domain-ref.md
└── scripts/           # 实用脚本(如果需要)
    └── helper.sh

回退方案(无AskUserQuestion)

如果AskUserQuestion不可用,则回退到基于文本的问题:

[标题] — [主题] 推荐: [您的推荐及原因] 备选: (A) [选项] — [权衡] | (B) [选项] — [权衡]

质量标准

参见quality-criteria.md以了解描述要求、自动验证标准、主观审查检查清单以及何时添加脚本或拆分文件的指导。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

cdcoonce/Portfolio_Website

Git commit workflow with enforced conventional commit style. Use when Claude needs to stage and commit changes, craft commit messages, or the user asks to commit, make a commit, or save their work. Ensures consistent commit message format, proper scoping, and atomic commits across the project.

cdcoonce/Portfolio_Website

AI-powered code quality analysis for Python, Markdown, and Mermaid diagrams. Use this skill when: (1) reviewing code for quality issues, (2) checking Python files for PEP8 violations, unused code, missing type hints, docstring problems, complexity issues, or potential runtime errors, (3) validating Markdown documentation for broken links, heading structure, or formatting issues, (4) validating Mermaid diagram syntax, (5) the user asks for a "code review" or "quality check", (6) analyzing code snippets pasted in conversation, or (7) suggesting and applying fixes for code quality issues.

cdcoonce/Portfolio_Website

Deploy the portfolio chat agent Lambda function to AWS. Use when the user asks to deploy, redeploy, push to Lambda, update the chat agent, or after updating context files or lambda_function.py. Rebuilds the knowledge base, packages dependencies, and deploys to AWS Lambda.

cdcoonce/Portfolio_Website

Generate multiple radically different interface designs for a module using parallel sub-agents. Use when user wants to design an API, explore interface options, compare module shapes, or mentions "design it twice".

cdcoonce/Portfolio_Website

Orchestrate the full GitHub-issues-driven development lifecycle. 7-phase pipeline from brainstorm through PR with state tracking and cross-conversation resume. Use when user says "dev cycle", "development workflow", "full development pipeline", or invokes /dev-cycle.

cdcoonce/Portfolio_Website

Production Python coding standards with automatic version detection (3.10-3.13). Use when writing, reviewing, or refactoring Python to ensure adherence to modern type syntax, LBYL exception handling, pathlib operations, ABC-based interfaces, and production-tested patterns. Not Dagster-specific - applies to any Python project.

cdcoonce/Portfolio_Website

Set up Claude Code hooks to block dangerous git commands (push, reset --hard, clean, branch -D, etc.) before they execute. Use when user wants to prevent destructive git operations, add git safety hooks, or block git push/reset in Claude Code.

cdcoonce/Portfolio_Website

GitHub CLI (gh) integration for managing issues, pull requests, branches,

cdcoonce/Portfolio_Website

Interview the user relentlessly about a plan or design until reaching shared understanding, resolving each branch of the decision tree. Use when user wants to stress-test a plan, get grilled on their design, or mentions "grill me".

cdcoonce/Portfolio_Website

Explore a codebase to find opportunities for architectural improvement, focusing on making the codebase more testable by deepening shallow modules. Use when user wants to improve architecture, find refactoring opportunities, consolidate tightly-coupled modules, or make a codebase more AI-navigable.

cdcoonce/Portfolio_Website

CEO/founder-mode plan review. Rethink the problem, find the 10-star product, challenge premises, expand scope when it creates a better product. Three modes: SCOPE EXPANSION (dream big), HOLD SCOPE (maximum rigor), SCOPE REDUCTION (strip to essentials). Use when the user asks for a plan review, CEO review, mega review, or wants a plan challenged/stress-tested before implementation.

cdcoonce/Portfolio_Website

Break a PRD into independently-grabbable GitHub issues using tracer-bullet vertical slices. Use when user wants to convert a PRD to issues, create implementation tickets, or break down a PRD into work items.

cdcoonce/Portfolio_Website

Turn a PRD into a multi-phase implementation plan using tracer-bullet vertical slices, saved as a local Markdown file in docs/plans/. Use when user wants to break down a PRD, create an implementation plan, plan phases from a PRD, or mentions "tracer bullets".

cdcoonce/Portfolio_Website

Generate or update the `.claude/docs/project.md` file that gives Claude project-specific context. Use this skill when the user asks to create, update, regenerate, or refresh project context, or says things like "update project.md", "generate project context", "this repo needs a project.md", or "Claude doesn't know about this project". Also trigger when onboarding Claude to a new repository for the first time.

cdcoonce/Portfolio_Website

Generate comprehensive, high-quality README.md files for code repositories. Use this skill whenever the user asks to create, write, generate, update, or improve a README for any project or repository. Also trigger when the user says things like "document this project", "write docs for this repo", "this repo needs a README", "help me onboard developers to this codebase", or asks for project documentation in markdown. Even if the user just says "README" or "readme" in the context of a codebase, use this skill.

cdcoonce/Portfolio_Website

Create a detailed refactor plan with tiny commits via user interview, then file it as a GitHub issue. Use when user wants to plan a refactor, create a refactoring RFC, or break a refactor into safe incremental steps.

cdcoonce/Portfolio_Website

Set up pre-commit hooks for the current repo. Use when user wants to add pre-commit hooks, configure commit-time linting, formatting, type checking, or testing. Triggers on "pre-commit", "git hooks", "linting hooks", or /setup-pre-commit.

cdcoonce/Portfolio_Website

Test-driven development with red-green-refactor loop. Use when user wants to build features or fix bugs using TDD, mentions "red-green-refactor", wants integration tests, or asks for test-first development.

cdcoonce/Portfolio_Website

Triage a bug or issue by exploring the codebase to find root cause, then create a GitHub issue with a TDD-based fix plan. Use when user reports a bug, wants to file an issue, mentions "triage", or wants to investigate and plan a fix for a problem.

cdcoonce/Portfolio_Website

Rewrites the prose sections of wiki pages in-place. Reads source files to understand current context, then updates only the content inside <!-- claude:prose --> ... <!-- claude:prose:end --> markers. Never touches <!-- generated:start --> ... <!-- generated:end --> blocks. Supports targeting a single page with /update-wiki {PageName}.

相关技能