当前位置: 首页 > news >正文

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),仅供参考

http://www.jsqmd.com/news/782791/

相关文章:

  • 2026年论文如何去AI痕迹?AIGC降重教程与实战案例 - 降AI实验室
  • 前端框架使用vue-cli( 第一层:依赖与环境层)
  • 2026年新疆票据印刷采购全攻略:源头直供如何降低企业成本80% - 优质企业观察收录
  • CANN/opbase:设置张量原始地址
  • CANN/ops-fft贡献指南
  • 20241223 2025-2026-2 《Python程序设计》实验三报告
  • 中国楼宇自控行业洗牌 楼宇自控厂家头部企业有谁?楼宇自控十大品牌 - 博客万
  • 网关支付 VS 纯代付:核心差异与适用场景
  • 影刀RPA如何实现店群自动化:拆解多浏览器并发,打造拼多多与TEMU的“超级航母”矩阵
  • AI专著生成新方法!借助工具,快速产出20万字高质量专著!
  • 一个老旧小区门禁改造项目的技术选型复盘:从云端到边缘
  • 亨得利腕表维修行业内部解密:假官方年骗1386起、保养套路大起底与全国官方直营网点联络大全 - 亨得利腕表维修中心
  • 加盟岩茶品牌,新手小白如何甄别真假“全程带教”?——以溪谷留香为样本的赋能体系深度解构 - 商业科技观察
  • 博客园优化折叠框
  • 为什么配置了Linux kernel以后.config文件没有起作用?
  • CANN/torchtitan-npu测试指南
  • CANN/hcomm引擎上下文复制
  • 2026年新疆票据印刷与热敏收银纸采购完全指南:源头直供降成本方案 - 优质企业观察收录
  • 3步掌握开源游戏加速:OpenSpeedy高效配置完全指南
  • 魔兽争霸3终极兼容性修复指南:5个简单步骤让经典游戏在Windows 11完美运行
  • 2026年水刀配件采购全攻略:从成都源头厂家到一站式解决方案 - 企业名录优选推荐
  • 江西菜代表品牌有哪些?2026年5大品牌实测推荐 - 速递信息
  • CANN/ops-cv最近邻上采样2D算子
  • ClaudeCode用户如何配置Taotoken解决API密钥被封与Token不足问题
  • 本地AI智能体平台搭建:基于Docker与Ollama的自动化工作流实践
  • QLoRA量化技术在日语技术文档处理中的应用实践
  • 盘活闲置沃尔玛购物卡,让每一笔钱都花在刀刃上 - 团团收购物卡回收
  • 2026耐火电力电缆品牌实测:优质厂家深度测评+工程采购避坑全指南 - 深度智识库
  • 盘活分期乐购物额度,轻松优化你的个人现金流 - 团团收购物卡回收
  • 2026年重庆留学机构哪家口碑最好?预算有限挑选攻略 - 速递信息