SuperAPI AI 工具集

command-creator

智能体与模型

查看项目

更新于 10-16 09:47

技能介绍

用途:为 Claude Code 框架创建命令文件。命令是面向用户的快捷入口,其内容通过委托给某个技能来执行,从而简化复杂技能的调用、为常用工作流提供易记的命令名。命令存放在 .claude/commands/ 目录,会被 Claude Code 自动发现为 /命令名。

主要能力与格式:所有命令采用统一的 YAML frontmatter 与正文结构,frontmatter 含 description 和 disable-model-invocation: true,正文为“Invoke the {skill-name} skill and follow it exactly as presented to you”。

创建流程:先检查命令是否已存在(test -f .claude/commands/<command-name>.md && echo "EXISTS" || echo "NEW"),已存在则用 Read 检查、Edit 修改并执行创建后的集成步骤;新建则继续。随后运行生态伴随检查,调用 .claude/lib/creators/companion-check.cjs 的 checkCompanions("command", "{command-name}"),识别缺失的必需或推荐伴随产物。

输入验证:命令名转为小写并仅保留连字符,校验目标技能存在(.claude/skills/**/<skill>/SKILL.md),否则抛出“Target skill not found”。

创建与集成:写入 .claude/commands/<commandName>.md,更新 .claude/context/artifacts/catalogs/command-catalog.md 目录(按字母顺序插入条目),并调用 .claude/lib/creators/creator-commons.cjs 的 runIntegrationChecklist('command', path) 与 queueCrossCreatorReview(...)。集成验证点包括:已加入命令目录、目标技能存在且有效、命令文件 frontmatter 正确、可通过 /commandname 被发现。

使用示例:Skill({ skill: 'command-creator', args: '--name tdd --skill tdd --description "Test-driven development workflow"' });以及 --name debug --skill debugging --description "Systematic debugging workflow"。

相关技能:skill-creator 创建被委托的技能,skill-updater 更新底层技能。该技能属于 Creator Ecosystem,创建产物需与 agent-creator、skill-creator、tool-creator、hook-creator、rule-creator、semgrep-rule-creator、template-creator、workflow-creator 等对齐,并遵循记忆协议(读取 learnings.md,完成后写入 learnings/issues/decisions)、强制研究门(Exa 与 arXiv)、RED→GREEN→REFACTOR 回归安全交付。

限制:资料未说明收费、价格、平台支持范围;部分流程依赖 agent-studio 仓库内的专有脚本与内存/目录约定,离开该环境可能无法直接运行。