kicad-tools: Command for Claude Code

.claude/commands/loom/comment-body-literal-path.md

comment-body-literal-path is a command for Claude Code from rjwalters/kicad-tools. It costs 0 tokens per session (1,186 once invoked), scanned A, original, MIT.

A warning about GitHub CLI commands that treat --body @path as literal text instead of reading the file at that path.

In plain words
What is it for?
Use it when posting comments or reviews with gh issue comment, gh pr comment, or gh api, especially when the message is stored in a temporary file.
Why use it?
It prevents issue comments and pull-request reviews from being posted as an unusable file path instead of their intended contents.

Command for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions subagents.

This is rjwalters/kicad-tools's own configuration. It tells Claude Code how to work on kicad-tools 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 kicad-tools configures →

Reuse

Borrowing it

Nothing to install: this file belongs to rjwalters/kicad-tools. 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/rjwalters/kicad-tools/main/.claude/commands/loom/comment-body-literal-path.md
Clone the repo
git clone --depth 1 https://github.com/rjwalters/kicad-tools

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 comment-body-literal-path

README.md
[![agentmods](https://agentmods.dev/badge/commands/rjwalters/kicad-tools/comment-body-literal-path/github.svg)](https://agentmods.dev/commands/rjwalters/kicad-tools/comment-body-literal-path)
Your own site
<a href="https://agentmods.dev/commands/rjwalters/kicad-tools/comment-body-literal-path"><img src="https://agentmods.dev/badge/commands/rjwalters/kicad-tools/comment-body-literal-path/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 comment-body-literal-path

Your own site · 80×15
<a href="https://agentmods.dev/commands/rjwalters/kicad-tools/comment-body-literal-path"><img src="https://agentmods.dev/badge/commands/rjwalters/kicad-tools/comment-body-literal-path.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 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,186 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.00000 $0.01186
Opus 5 $0.00000 $0.00593
Sonnet 5 $0.00000 $0.00237
Haiku 4.5 $0.00000 $0.00119

Measured 11d ago against content hash 2fa0de1fb202, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

comment-body-literal-path 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 11d 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/commands/loom/comment-body-literal-path.md · 79 lines

How it starts

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

--body @path Does NOT Expand — It Posts the Literal String (canonical)

This is the single canonical copy of this warning. Every role prompt that carries a short "--body @path Does NOT Expand" pointer refers here for the full pitfall, incident citation, and fixes.

If a comment/review body you're posting (via gh issue comment, gh pr comment, or gh api ... comments) lives in a scratch/scratchpad file, do not pass it as --body @path. Unlike some shells' @file conventions, gh pr comment --body @path and gh issue comment --body @path do not read the file — they post the literal text @path as the comment. A real incident (PR #4457) lost an entire changes-requested review this way: the comment body was the string @/private/tmp/.../scratchpad/review.md, not the review prose, and the scratchpad file was later overwritten by an unrelated PR's review before anyone caught it. It recurred again later via gh api ... -f body=@path (-f/--raw-field never expands @path either) — see #5252.

❌ POSTS THE LITERAL STRING "@path" — NOT THE FILE CONTENTS
   gh pr comment 123 --body @/tmp/review-123.md
   gh pr comment 123 --body "@/tmp/review-123.md"
   gh issue comment 123 --body @/tmp/comment-123.md

❌ ALSO POSTS THE LITERAL STRING — a variable does NOT change what the flag does
   REVIEW_FILE="@/tmp/review-123.md"; gh pr comment 123 --body "$REVIEW_FILE"

❌ ALSO POSTS THE LITERAL STRING — on `gh api`, only -F/--field expands @path
   gh api repos/{owner}/{repo}/issues/123/comments -f body=@/tmp/review-123.md

✅ USE ONE OF THESE INSTEAD
   gh pr comment 123 --body "$(cat <<'EOF'
   ... review prose ...
   EOF
   )"
   gh pr comment 123 --body-file /tmp/review-123.md
   gh api repos/{owner}/{repo}/issues/123/comments -F body=@/tmp/review-123.md

Prefer the inline heredoc pattern above when the body is short/dynamic; use -F/--body-file <path> when the body genuinely lives in a file (e.g. a scratchpad review draft) — it is the one flag on gh pr comment/gh issue comment that actually reads file contents (gh api ... -F body=@path also works — but -f/--raw-field does not). Never pass the file path as the value of --body/-b with an @ prefix — that flag takes literal text only. After posting, re-fetch the comment (gh pr view <number> --comments / gh issue view <number> --comments) to confirm it renders your prose, not a path string.

Read the full file on GitHub · 79 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. 11d ago First seen · 79 lines · 0 tokens per session scan A 2fa0de1fb202

Subscribe to this mod's changes

comment-body-literal-path is a command published in the GitHub repository rjwalters/kicad-tools (56 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,186 tokens. 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-30.