SuperAPI AI 工具集

role-creator

智能体与模型

查看项目

更新于 10-15 23:42

技能介绍

用途:role-creator 用于按固定契约生成或更新角色专属技能包,产出三个受管文件:<target>/SKILL.md、<target>/references/role.yaml、<target>/system.md。目标目录可选 skills/<role-name>/(开源发布,默认)、.agent-team/teams/<role-name>/(配合 agent-team 团队使用)或自定义本地路径。

主要能力与流程:1)规范化输入,角色名须为 kebab-case,不符合时建议规范化版本并确认;2)自动生成角色字段(description、system goal、in-scope、out-of-scope)供用户确认,被拒或置信度低时转交 /brainstorming 细化;3)选择技能,先运行 find-skills 获取推荐,用户选择后再手动补充,去重合并确认;技能可为空,将持久化为 skills: [];4)执行 CLI;5)校验输出三个文件是否符合模板结构,不符则报告并可重新生成。

使用方式:核心命令为 agent-team role create <role-name>,必填参数包括 --description 与 --system-goal,可选 --in-scope、--out-of-scope、--skills、--recommended-skills、--add-skills、--remove-skills、--manual-skills、--target-dir、--overwrite、--repo-root、--force。技能解析优先级为 --skills > --recommended-skills > --manual-skills,再追加 --add-skills、排除 --remove-skills。示例:agent-team role create frontend-dev --description "Frontend role for UI implementation" --system-goal "Ship accessible and maintainable UI work" --in-scope "Build components,Improve accessibility" --out-of-scope "Database migrations,Backend API ownership" --skills "ui-ux-pro-max,better-icons";团队使用加 --target-dir .agent-team/teams。

适用场景:需要为 agent-team 快速定义角色边界、系统目标与技能组合,并统一文件结构时使用。

限制:覆盖行为由 --overwrite(ask/yes/no)控制,当前 CLI 覆盖时不创建备份目录,仅覆盖受管文件,生成后会移除遗留的根级 role.yaml;目标为 skills 或 .agent-team/teams 时,CLI 会检查 ~/.agents/roles/ 中的同名全局角色,除非传 --force。运行时角色遇到未列出的技能可调用 find-skills,仅允许项目级安装或使用本地/项目缓存技能,禁止全局安装;找不到时发出警告并尽力执行。find-skills 不可用或返回空时跳过推荐,仅手动补充。其他细节暂未提供。