add-tool SKILL.md skillA
add-tool from riot-org/riot is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.
mdr add riot-org/riot/add-tool@git:20261011.281dcd7Pins git:20261011.281dcd7 in mdr.lock. Pin the fingerprint instead.
- Audit grade
- A, 17 of 17 checks passed
- Kind
- SKILL.md skill
- Repository
- riot-org/riot
- Path
.riot/skills/add-tool/SKILL.md- Versions recorded
- 2
- Latest version
- git:20261011.281dcd7, committed Oct 11, 2026
- First version recorded
- Aug 17, 2026
- Size
- 5,901 bytes
- Repository stars
- 22
- License
- a license file GitHub does not identify
给 Riot 加一个模型能调的工具时用。Tool trait 的必答项、fail-closed 默认值的判据、注册位置、以及几条写错了不报错只是行为悄悄降级的规则。.
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# 加一个工具
工具定义在 `crates/riot-protocol/src/tool.rs` 的 `Tool` trait,实现放
`crates/riot-tools/src/tools/<名字>.rs`。
## 1. 五个必须实现的
没有默认实现,漏一个编译不过:
| 方法 | 给谁看 | 注意 |
|---|---|---|
| `name` | API + 权限规则的键 | 返回 `&str` 而非 `&'static str`(MCP 工具的名字来自运行时) |
| `input_schema` | API | `schemars::schema_for!(Input)` |
| `prompt` | **模型** | 进 `tools[].description` 的完整说明。要写清和其它工具的分工、以及 NEVER 列表 |
| `describe` | **界面** | 一句话,如「读取 src/main.rs」 |
| `call` | — | 返回 `ToolOutcome`,**不是** `Result` |
`prompt` 和 `describe` 是两条独立的路,不要让其中一个凑合另一个。同理
`ToolOutcome::Ok` 里 `model_content`(模型看的)和 `ui_payload`(界面看的
**结构化数据**,不是渲染好的字符串)也是分开的。
## 2. `call` 里不许把错误抛出去
失败是正常返回值:`ToolOutcome::failed("...")`。函数内部可以自由用 `?`,
但必须在边界把 `Result` 转成 `Failed`。类型系统由此保证「工具错误不会抛穿
主循环」。
错误文本是**给模型的纠错指令**,用祈使句,不要贴原始错误:
```rust
// 好:告诉它下一步做什么
ToolOutcome::failed("`pattern` 不能为空。要列出文件请用 Glob。")
// 坏:把内部诊断甩给它
ToolOutcome::failed(format!("{e:?}"))
```
## 3. fail-closed 默认值:判据是什么
漏写不会造成危险行为,但**写错方向会**。逐条的判据:
- **`is_read_only`** —— 判据不是「感觉安不安全」,是**会不会执行任意代码
或改变任何状态**。`Diagnostics` 跑 `cargo check`,而它会执行 `build.rs`
和过程宏,所以它**不是**只读的。标错的后果是这个工具在所有权限模式下
自动放行(`mode_default` 里只读一律 Allow)。
…Read the whole file at its exact version.
How to install
mdr add riot-org/riot/add-tool@sha256:cb3946f683e1a7a3The line at the top of this page pins the label git:20261011.281dcd7, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
[](https://markdownregistry.com/a/art_fya4gvzm3iwjql2w)
4 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 2 versions of this file, between Aug 17, 2026 and Oct 11, 2026, about one every 55 days.
| version | committed | commit | size | audit | |
|---|---|---|---|---|---|
| git:20261011.281dcd7 latest | 2026-10-11 | 281dcd7 | 5,901 B | A | view · diff |
| git:20260817.d00a470 | 2026-08-17 | d00a470 | 5,839 B | A | view |
Audit of the latest version
- pass: Frontmatter block present
- pass: Frontmatter declares a name
- pass: Frontmatter declares a description
- pass: Size between 200 bytes and 200 KB (5901 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
riot-org/riot · 22 stars · license a license file GitHub does not identify · pushed 2026-10-29 · branch master
API
GET https://markdownregistry.com/api/v1/artifacts/art_fya4gvzm3iwjql2w GET https://markdownregistry.com/api/v1/resolve?ref=riot-org/riot/add-tool GET https://markdownregistry.com/api/v1/blob/cb3946f683e1a7a34b2db58febf32838eaa454308cbd4d7c4cac0d77946f5c1a
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.