news 2026/5/9 12:08:31

CANN/cannbot-skills工具编写指南

作者头像

张小明

前端开发工程师

1.2k 24
文章封面图
CANN/cannbot-skills工具编写指南

Tool Authoring Playbook

【免费下载链接】cannbot-skillsCANNBot 是面向 CANN 开发的用于提升开发效率的系列智能体,本仓库为其提供可复用的 Skills 模块。项目地址: https://gitcode.com/cann/cannbot-skills

Use this playbook when adding or modifying a repository tool underagent/scripts/. Keep tools small, deterministic, and easy to validate.

Goal

Build a tool that:

  • solves one recurring problem cleanly
  • has a narrow interface
  • is easy to test from the command line
  • is summarized inagent/scripts/tools_summary.md

1. Confirm the tool belongs inagent/scripts/

A repository tool is a good fit when it:

  • performs repeated estimation or analysis
  • provides deterministic helper logic
  • is useful across multiple kernel tasks
  • should be runnable without loading a huge amount of prose context

If the work is only explanatory, prefer documentation instead of a new tool.

Before modifying a tool, check:

  • agent/references/examples/tool-catalog.md

2. Define the exact job and interface

Before coding, write down:

  • what the tool computes or checks
  • required inputs
  • optional inputs
  • output format
  • whether it is analysis-only or mutates files

Prefer a narrow API over a giant kitchen-sink script.

3. Keep the implementation deterministic

Repository preference:

  • tools should be small and direct
  • avoid hidden environment requirements unless truly needed
  • avoid unnecessary side effects

If a script must make a repository decision repeatedly, encode that decision clearly instead of forcing the agent to rediscover it in prose.

4. Keep command-line usage obvious

A good tool should be runnable quickly from the repository root. If it has multiple modes, keep the mode names explicit. If output is tabular or numeric, make the result readable enough for direct inspection.

5. Validate with a representative sample

Actually run the tool. Do not assume the script is correct because it is short. If there are several modes, test a representative subset.

For estimators or analyzers, validate:

  • a normal case
  • an edge or failure case
  • at least one case that exercises an option or mode switch

6. Update the tool summary

When adding or editing files underagent/scripts/, update:

  • agent/scripts/tools_summary.md

Update the summary itself. Do not turn it into a change log.

7. Refresh owner docs when done

After the tool work is complete and there are no scripts left to run, refresh the owner docs that actually describe the changed area:

  • agent/scripts/tools_summary.md
  • agent/references/code-paths.mdif the implementation-path lookup changed
  • agent/references/repo-map.mdordoc/11_architecture_for_contributors.mdif the repository structure or ownership changed

8. Keep Python style compact

Repository formatting preference:

  • keep signatures and call sites compact
  • do not force one argument per line unless readability really needs it
  • keep the script easy to scan

Fallback references

Read these if more detail is needed:

  • agent/scripts/tools_summary.md
  • agent/references/code-paths.md
  • doc/11_architecture_for_contributors.md
  • README.md

【免费下载链接】cannbot-skillsCANNBot 是面向 CANN 开发的用于提升开发效率的系列智能体,本仓库为其提供可复用的 Skills 模块。项目地址: https://gitcode.com/cann/cannbot-skills

创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考

版权声明: 本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!
网站建设 2026/5/9 12:04:31

CANN/ops-nn LogSigmoid梯度算子

LogSigmoidGrad 【免费下载链接】ops-nn 本项目是CANN提供的神经网络类计算算子库,实现网络在NPU上加速计算。 项目地址: https://gitcode.com/cann/ops-nn 产品支持情况 产品是否支持Ascend 950PR/Ascend 950DT√Atlas A3 训练系列产品/Atlas A3 推理系列产…

作者头像 李华
网站建设 2026/5/9 12:03:30

CANN/cannbot-skills Attention-Only模板

Attention-Only Scope 模板 【免费下载链接】cannbot-skills CANNBot 是面向 CANN 开发的用于提升开发效率的系列智能体,本仓库为其提供可复用的 Skills 模块。 项目地址: https://gitcode.com/cann/cannbot-skills 本模板提供仅将 Attention 模块纳入 Super…

作者头像 李华
网站建设 2026/5/9 12:00:32

指针学习笔记

一、指针的定义1.本质指针,就是存储地址值的变量。(我们设计一个地址类型的变量,用来存放其他变量的内存地址)2.指针的大小1.指针占多少字节取决于CPU架构:x86架构(32位):指针大小为…

作者头像 李华
网站建设 2026/5/9 11:58:33

无车位线智能车辆泊车路径规划与跟踪控制方法【附仿真】

✨ 本团队擅长数据搜集与处理、建模仿真、程序设计、仿真代码、EI、SCI写作与指导,毕业论文、期刊论文经验交流。 ✅ 专业定制毕设、代码 ✅ 如需沟通交流,可以私信,或者点击《获取方式》 (1)自适应椭圆采样域与势场引…

作者头像 李华
网站建设 2026/5/9 11:58:32

交通信号灯配时指数交叉差分进化优化算法【附代码】

✨ 本团队擅长数据搜集与处理、建模仿真、程序设计、仿真代码、EI、SCI写作与指导,毕业论文、期刊论文经验交流。 ✅ 专业定制毕设、代码 ✅ 如需沟通交流,可以私信,或者点击《获取方式》 (1)分段指数交叉机制与交叉率…

作者头像 李华