domain-tool-authoring
Skill1 starsChanged 17 days agoMITView on GitHub
新增、改名、改参或改副作用领域工具时走 ToolSpec 数据化管线;触发词:新增工具、make_spec_tool、ParamSpec、side_effect、kMutating、args.Find、missing required parameter。
In this repository16 other files it gives its agents.
- AGENTS.mdAGENTS.md
- cpp-registrationSkill
- gda-demo-e2eSkill
- gda-e2e-analysisSkill
- skill-proposerSkill
- thread-security-gateSkill
- wiki-maintainerSkill
- godot-autopilot-contentSkill
- godot-autopilot-csharpSkill
- godot-autopilot-resourcesSkill
- godot-autopilot-runtimeSkill
- godot-autopilot-scene-systemSkill
- godot-autopilot-scriptingSkill
- godot-autopilot-serversSkill
- godot-autopilotSkill
- godot-autopilot-toolsSkill
The file
Files
领域工具编写
按数据化管线新增工具,保证注册、取参、副作用声明一致。
步骤
- 读所在域邻居写法,锁定取参风格:已用
args.Find的文件不混入Args,缺参返回missing required parameter: <name>。 - 在
<域>_tools.hpp定义kXxxParams参数表,并在make_tools()以make_spec_tool(ToolSpec{...})一行注册;仅嵌套结构用raw_schema手写,其余由参数表派生。 - 在
<域>_ops.hpp声明handle_xxx,在<域>_ops.cpp实现;失败返回util::error_json,成功包util::ok_result。 - 按实际影响声明
SideEffect与flags(kMutating、kObserve等);合成输入类需截图后处理才加kObserve。 - 命名按
<动词>_<类别>_<维度>_<对象>_<修饰>,动词置首;signal_connect类名词前置仅限规范保留范围,不扩散。 - 遵循动词语义:
get/fetch/load目标必存在否则抛,find/search/query允空,validate/check失败即抛。
边界
- 输入:工具名、参数表、副作用声明;输出:handler 加参数表加注册行。
register_all.cpp经各域make_tools()自动汇总,不手改注册表。
非目标
- 不做文本级增量编辑、glob 匹配、C# 热重载。
- 不放宽监听、授权、脱敏默认值。
验证
- 执行
ctest --preset debug -R "migration_guard|comment_guard",预期全过。 - 用
get_tool_detail核对side_effect可识别;空 query 枚举与遍历排除一致。 - 注册统计以运行时为准,不复制旧数值。
权威参考
- 工程约定
- 工具注册表
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

