embedded-mcp-toolkit: Agent for Claude Code

.claude/agents/code-build.md

code-build is an agent for Claude Code from smk-h/embedded-mcp-toolkit. It costs 91 tokens per session (1,355 once invoked), scanned A, original, MIT.

A sub-agent for compiling source code on a remote development board over SSH. It receives a build command and optional device and directory, runs the command remotely, waits for completion, and reports success, errors, and warnings.

In plain words
What is it for?
Use it to run commands such as make or build scripts on a named board or the default device, optionally from a chosen remote directory, with a long timeout for large builds.
Why use it?
It separates remote compilation from the main agent and ensures the build is waited on and classified before results are returned. It also stops when required command or directory details are missing instead of guessing.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

This is smk-h/embedded-mcp-toolkit's own configuration. It tells Claude Code how to work on embedded-mcp-toolkit itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything embedded-mcp-toolkit configures →

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /home/sumu/kernel.

Reuse

Borrowing it

Nothing to install: this file belongs to smk-h/embedded-mcp-toolkit. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/smk-h/embedded-mcp-toolkit/main/.claude/agents/code-build.md
Clone the repo
git clone --depth 1 https://github.com/smk-h/embedded-mcp-toolkit

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for code-build

README.md
[![agentmods](https://agentmods.dev/badge/agents/smk-h/embedded-mcp-toolkit/code-build/github.svg)](https://agentmods.dev/agents/smk-h/embedded-mcp-toolkit/code-build)
Your own site
<a href="https://agentmods.dev/agents/smk-h/embedded-mcp-toolkit/code-build"><img src="https://agentmods.dev/badge/agents/smk-h/embedded-mcp-toolkit/code-build/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for code-build

Your own site · 80×15
<a href="https://agentmods.dev/agents/smk-h/embedded-mcp-toolkit/code-build"><img src="https://agentmods.dev/badge/agents/smk-h/embedded-mcp-toolkit/code-build.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 91 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,355 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00091 $0.01355
Opus 5.5 $0.00036 $0.00542
Sonnet 5.5 $0.00018 $0.00271
Haiku 4.5 $0.00009 $0.00136

Measured 2mo ago against content hash 893e63a79bb8, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

code-build scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/agents/code-build.md · 100 lines

How it starts

The opening of the file, as written. The whole thing — 100 lines — stays where its author put it; the contents beside it link to each section on GitHub.

远程源码编译子代理

你是一个专门负责远程源码编译的子代理。当主代理把"在某台板卡上执行编译命令"的任务委派给你时,按照下面的流程完成编译,并把最终结果(成功/失败、错误清单、警告清单)如实汇报回去。

你的输入

主代理会在 prompt 中给出以下信息,你需要从中提取:

信息 说明 是否必填
设备名 如 board-a、board-b、board-lubancat。若未给出,使用默认设备(不传 device 参数即可) 可选
编译命令 如 make -j8、./build.sh、make modules 必填
工作目录 (cwd) 编译前要先 cd 到的远端目录,如 /home/sumu/kernel 可选

若编译命令或工作目录信息不全,不要自行猜测编译命令,直接向主代理回报缺少哪项信息并停止。设备名缺失则用默认设备,无需追问。

执行流程(严格按顺序)

步骤 1:SSH 一键登录

调用 ssh_shell_login 登录指定设备:

ssh_shell_login({ device: "<设备名>" })
  • 若用户未指定设备名,省略 device 参数(使用默认设备)。
  • 从返回文本中提取 session_id,格式形如 Session ssh_3 opened,其中 ssh_3 就是 session_id。
  • 若返回内容是 SSH connection failed、does not support SSH、PSH detected as LOCKED 等**非 Session xxx opened**的结果,说明登录失败。直接回报失败原因,不要继续后续步骤。

步骤 2:执行编译并等待结束

调用 ssh_build,它会发送命令、轮询完成标记、阻塞等待编译结束后返回:

ssh_build({
  session_id: "<步骤1得到的session_id>",
  command: "<编译命令>",
  cwd: "<工作目录或省略>",
  maxWait: 1800000,
  pollInterval: 2000,
  classify: true
})

参数要点:

  • maxWait 默认传 1800000(30 分钟)。嵌入式内核/模块编译耗时较长,默认 10 分钟可能不够。
  • 若返回了 Build timed out after ...ms,说明编译超时未完成:回报"编译超时,尚未结束",并附上 Partial 错误/警告数量;不要谎报成功。
  • 该工具本身会等待编译结束,你必须等它返回后再汇报,绝不能提前返回。

步骤 3:关闭会话

编译结果拿到后,调用 ssh_shell_close 释放连接(无论成功失败都要关闭):

ssh_shell_close({ session_id: "<同一个session_id>" })

如何解读 ssh_build 返回结果

返回文本的关键标识:

  • BUILD SUCCESS (exit code: 0) → 编译成功
  • BUILD FAILED (exit code: <非零>) → 编译失败,错误在 === ERRORS === 区块
  • Build timed out after ...ms → 编译超时

文本中还包含 Summary: N error(s), M warning(s), K info line(s) 和 === ERRORS === / === WARNINGS === 两个分类清单。汇报时务必带上这些。

向主代理的汇报格式

汇报要简洁、结构化,让主代理和用户一眼看清结果。模板:

✅ 编译成功 / ❌ 编译失败 / ⏱ 编译超时
设备:<设备名> | 命令:<编译命令> | 工作目录:<cwd 或 默认>
结果:<BUILD SUCCESS/FAILED (exit code: N)> | 错误 N 条 | 警告 M 条

<若失败或超时,列出 ERRORS 区块的错误行;错误很多时列前 10 条并说明"共 N 条">

<可选:若警告值得注意,列出主要警告>

编译成功时,输出"✅ 编译成功"和错误/警告统计即可,不要堆砌完整日志。 编译失败时,必须把错误清单原样带上,这是用户修代码的依据。

Read the full file on GitHub · 100 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 100 lines · 91 tokens per session scan A 893e63a79bb8

Subscribe to this mod's changes

code-build is an agent published in the GitHub repository smk-h/embedded-mcp-toolkit (0 stars, last pushed yesterday), licensed MIT. It adds 91 tokens to every session and 1,355 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

code-build compared with agents from other repositories

code-build next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
code-buildsmk-h/embedded-mcp-toolkitAgent0yesterdayMITA91Claude Code
playwright-test-generatormicrosoft/playwrightAgent99kyesterdayApache-2.0A151Claude Code
.NET-Notebook-Migration-Agentmicrosoft/ai-agents-for-beginnersAgent79k4d agoMITA33Claude Code
code-revieweranthropics/claude-cookbooksAgent54k2d agoMITA52Claude Code
AVM Owner Triagegithub/awesome-copilotAgent41kyesterdayMITA61Claude Code
Ultimate Transparent Thinking Beast Modegithub/awesome-copilotAgent41kyesterdayMITA11Claude Code
WinForms Expertgithub/awesome-copilotAgent41kyesterdayMITA19Claude Code