fix(skills): correct using-agent-relay drift and stale MCP names in sdk rule - #1423
fix(skills): correct using-agent-relay drift and stale MCP names in sdk rule#1423willwashburn wants to merge 2 commits into
Conversation
Both vendored copies of `using-agent-relay` had drifted from the published skill and were wrong in four ways: - **A dead security warning was suppressing content.** The CLI reference omitted every startup and status command because "Published Agent Relay versions through 11.3.0 can print live workspace credentials … Upgrade to Agent Relay 11.3.1 or later." This repo is on 11.4.0 and 11.3.1 shipped, so the warning describes a fixed defect while still hiding working commands from agents. - **The MCP tool prefix was wrong.** It documented `mcp__relaycast__send_dm` and `mcp__agent_relay__send_dm`. The prefix comes from the server key, which is `agent-relay`, so the real form is `mcp__agent-relay__send_dm`. - **`list_dms` was missing** from the tool table, even though `orchestrating-agent-relay` tells agents to use it to re-read consumed DM history. - **The base URL example was the legacy `gateway.relaycast.dev` host.** Every default in this repo and in relaycast is `cast.agentrelay.com`. The published version is correct on all four and is a strict superset of the vendored CLI reference (it also documents `message inbox mark_read`, `message dm list`, `message get_thread`, `channel list`, `node up`, `node status`, and the deprecated `local` alias). Both copies are synced to it; nothing unique was lost. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Jmke9G9s7ftrN49opNmdx1
📝 WalkthroughWalkthroughThe changes align Agent Relay documentation with canonical flat MCP tool names, add ChangesAgent Relay documentation
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.agents/skills/using-agent-relay/SKILL.md:
- Around line 201-209: Remove inline workspace keys and agent tokens from the
messaging command examples, replacing them with the documented
RELAY_WORKSPACE_KEY and RELAY_AGENT_TOKEN environment variables in
.agents/skills/using-agent-relay/SKILL.md lines 201-209 and
.claude/skills/using-agent-relay/SKILL.md lines 201-209; apply the same
correction to every listed command while preserving their arguments and
behavior.
- Line 204: Replace the angle-bracket conversation identifier placeholder in the
`agent-relay message dm list` example with the shell-safe `CONVERSATION_ID`
placeholder at `.agents/skills/using-agent-relay/SKILL.md:204-204` and apply the
same change at `.claude/skills/using-agent-relay/SKILL.md:204-204`.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 1492dc5b-bdee-475c-b21d-0c3261dd29ac
📒 Files selected for processing (3)
.agents/skills/using-agent-relay/SKILL.md.claude/rules/sdk.md.claude/skills/using-agent-relay/SKILL.md
| agent-relay message inbox check --workspace-key rk_live_... --token at_live_... | ||
| agent-relay message inbox mark_read msg_123 --workspace-key rk_live_... --token at_live_... | ||
| agent-relay message dm send Lead "ACK: I am online." --workspace-key rk_live_... --token at_live_... | ||
| agent-relay message dm list <conversationId> --workspace-key rk_live_... --token at_live_... # persistent DM history (unlike unread-only inbox check) | ||
| agent-relay message post general "Status update" --workspace-key rk_live_... --token at_live_... | ||
| agent-relay message list general --workspace-key rk_live_... --token at_live_... | ||
| agent-relay message reply msg_123 "Thread reply" --workspace-key rk_live_... --token at_live_... | ||
| agent-relay message get_thread msg_123 --workspace-key rk_live_... --token at_live_... | ||
| agent-relay channel list --workspace-key rk_live_... --token at_live_... |
There was a problem hiding this comment.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
Keep credentials out of command-line examples.
The messaging examples place workspace keys and agent tokens in process arguments. Use the documented environment variables instead.
.agents/skills/using-agent-relay/SKILL.md#L201-L209: Rewrite the examples to useRELAY_WORKSPACE_KEYandRELAY_AGENT_TOKEN..claude/skills/using-agent-relay/SKILL.md#L201-L209: Apply the same credential-handling correction.
🧰 Tools
🪛 SkillSpector (2.4.4)
[warning] 21: [AS3] Skill Enumeration: Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
Remediation: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
(Agent Snooping (AS3))
[warning] 54: [MP2] Context Window Stuffing: Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.
Remediation: Implement context-window management that detects and rejects padding or stuffing attempts. Prioritize system instructions over user-injected content.
(Memory Poisoning (MP2))
[warning] 75: [MP2] Context Window Stuffing: Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.
Remediation: Implement context-window management that detects and rejects padding or stuffing attempts. Prioritize system instructions over user-injected content.
(Memory Poisoning (MP2))
[warning] 91: [MP2] Context Window Stuffing: Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.
Remediation: Implement context-window management that detects and rejects padding or stuffing attempts. Prioritize system instructions over user-injected content.
(Memory Poisoning (MP2))
[warning] 93: [MP2] Context Window Stuffing: Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.
Remediation: Implement context-window management that detects and rejects padding or stuffing attempts. Prioritize system instructions over user-injected content.
(Memory Poisoning (MP2))
[warning] 94: [MP2] Context Window Stuffing: Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.
Remediation: Implement context-window management that detects and rejects padding or stuffing attempts. Prioritize system instructions over user-injected content.
(Memory Poisoning (MP2))
[warning] 95: [MP2] Context Window Stuffing: Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.
Remediation: Implement context-window management that detects and rejects padding or stuffing attempts. Prioritize system instructions over user-injected content.
(Memory Poisoning (MP2))
[warning] 96: [MP2] Context Window Stuffing: Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.
Remediation: Implement context-window management that detects and rejects padding or stuffing attempts. Prioritize system instructions over user-injected content.
(Memory Poisoning (MP2))
[warning] 99: [MP2] Context Window Stuffing: Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.
Remediation: Implement context-window management that detects and rejects padding or stuffing attempts. Prioritize system instructions over user-injected content.
(Memory Poisoning (MP2))
[warning] 248: [MP2] Context Window Stuffing: Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.
Remediation: Implement context-window management that detects and rejects padding or stuffing attempts. Prioritize system instructions over user-injected content.
(Memory Poisoning (MP2))
[warning] 250: [MP2] Context Window Stuffing: Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.
Remediation: Implement context-window management that detects and rejects padding or stuffing attempts. Prioritize system instructions over user-injected content.
(Memory Poisoning (MP2))
[warning] 251: [MP2] Context Window Stuffing: Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.
Remediation: Implement context-window management that detects and rejects padding or stuffing attempts. Prioritize system instructions over user-injected content.
(Memory Poisoning (MP2))
[warning] 252: [MP2] Context Window Stuffing: Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.
Remediation: Implement context-window management that detects and rejects padding or stuffing attempts. Prioritize system instructions over user-injected content.
(Memory Poisoning (MP2))
[warning] 254: [MP2] Context Window Stuffing: Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.
Remediation: Implement context-window management that detects and rejects padding or stuffing attempts. Prioritize system instructions over user-injected content.
(Memory Poisoning (MP2))
[warning] 255: [MP2] Context Window Stuffing: Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.
Remediation: Implement context-window management that detects and rejects padding or stuffing attempts. Prioritize system instructions over user-injected content.
(Memory Poisoning (MP2))
[warning] 256: [MP2] Context Window Stuffing: Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.
Remediation: Implement context-window management that detects and rejects padding or stuffing attempts. Prioritize system instructions over user-injected content.
(Memory Poisoning (MP2))
📍 Affects 2 files
.agents/skills/using-agent-relay/SKILL.md#L201-L209(this comment).claude/skills/using-agent-relay/SKILL.md#L201-L209
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.agents/skills/using-agent-relay/SKILL.md around lines 201 - 209, Remove
inline workspace keys and agent tokens from the messaging command examples,
replacing them with the documented RELAY_WORKSPACE_KEY and RELAY_AGENT_TOKEN
environment variables in .agents/skills/using-agent-relay/SKILL.md lines 201-209
and .claude/skills/using-agent-relay/SKILL.md lines 201-209; apply the same
correction to every listed command while preserving their arguments and
behavior.
| agent-relay message inbox check --workspace-key rk_live_... --token at_live_... | ||
| agent-relay message inbox mark_read msg_123 --workspace-key rk_live_... --token at_live_... | ||
| agent-relay message dm send Lead "ACK: I am online." --workspace-key rk_live_... --token at_live_... | ||
| agent-relay message dm list <conversationId> --workspace-key rk_live_... --token at_live_... # persistent DM history (unlike unread-only inbox check) |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Use a shell-safe conversation identifier placeholder.
Bash interprets <conversationId> as redirection syntax.
.agents/skills/using-agent-relay/SKILL.md#L204-L204: Replace<conversationId>withCONVERSATION_ID..claude/skills/using-agent-relay/SKILL.md#L204-L204: Apply the same placeholder correction.
🧰 Tools
🪛 SkillSpector (2.4.4)
[warning] 21: [AS3] Skill Enumeration: Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
Remediation: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
(Agent Snooping (AS3))
[warning] 54: [MP2] Context Window Stuffing: Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.
Remediation: Implement context-window management that detects and rejects padding or stuffing attempts. Prioritize system instructions over user-injected content.
(Memory Poisoning (MP2))
[warning] 75: [MP2] Context Window Stuffing: Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.
Remediation: Implement context-window management that detects and rejects padding or stuffing attempts. Prioritize system instructions over user-injected content.
(Memory Poisoning (MP2))
[warning] 91: [MP2] Context Window Stuffing: Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.
Remediation: Implement context-window management that detects and rejects padding or stuffing attempts. Prioritize system instructions over user-injected content.
(Memory Poisoning (MP2))
[warning] 93: [MP2] Context Window Stuffing: Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.
Remediation: Implement context-window management that detects and rejects padding or stuffing attempts. Prioritize system instructions over user-injected content.
(Memory Poisoning (MP2))
[warning] 94: [MP2] Context Window Stuffing: Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.
Remediation: Implement context-window management that detects and rejects padding or stuffing attempts. Prioritize system instructions over user-injected content.
(Memory Poisoning (MP2))
[warning] 95: [MP2] Context Window Stuffing: Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.
Remediation: Implement context-window management that detects and rejects padding or stuffing attempts. Prioritize system instructions over user-injected content.
(Memory Poisoning (MP2))
[warning] 96: [MP2] Context Window Stuffing: Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.
Remediation: Implement context-window management that detects and rejects padding or stuffing attempts. Prioritize system instructions over user-injected content.
(Memory Poisoning (MP2))
[warning] 99: [MP2] Context Window Stuffing: Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.
Remediation: Implement context-window management that detects and rejects padding or stuffing attempts. Prioritize system instructions over user-injected content.
(Memory Poisoning (MP2))
[warning] 248: [MP2] Context Window Stuffing: Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.
Remediation: Implement context-window management that detects and rejects padding or stuffing attempts. Prioritize system instructions over user-injected content.
(Memory Poisoning (MP2))
[warning] 250: [MP2] Context Window Stuffing: Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.
Remediation: Implement context-window management that detects and rejects padding or stuffing attempts. Prioritize system instructions over user-injected content.
(Memory Poisoning (MP2))
[warning] 251: [MP2] Context Window Stuffing: Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.
Remediation: Implement context-window management that detects and rejects padding or stuffing attempts. Prioritize system instructions over user-injected content.
(Memory Poisoning (MP2))
[warning] 252: [MP2] Context Window Stuffing: Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.
Remediation: Implement context-window management that detects and rejects padding or stuffing attempts. Prioritize system instructions over user-injected content.
(Memory Poisoning (MP2))
[warning] 254: [MP2] Context Window Stuffing: Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.
Remediation: Implement context-window management that detects and rejects padding or stuffing attempts. Prioritize system instructions over user-injected content.
(Memory Poisoning (MP2))
[warning] 255: [MP2] Context Window Stuffing: Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.
Remediation: Implement context-window management that detects and rejects padding or stuffing attempts. Prioritize system instructions over user-injected content.
(Memory Poisoning (MP2))
[warning] 256: [MP2] Context Window Stuffing: Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.
Remediation: Implement context-window management that detects and rejects padding or stuffing attempts. Prioritize system instructions over user-injected content.
(Memory Poisoning (MP2))
📍 Affects 2 files
.agents/skills/using-agent-relay/SKILL.md#L204-L204(this comment).claude/skills/using-agent-relay/SKILL.md#L204-L204
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.agents/skills/using-agent-relay/SKILL.md at line 204, Replace the
angle-bracket conversation identifier placeholder in the `agent-relay message dm
list` example with the shell-safe `CONVERSATION_ID` placeholder at
`.agents/skills/using-agent-relay/SKILL.md:204-204` and apply the same change at
`.claude/skills/using-agent-relay/SKILL.md:204-204`.
Summary
Both vendored copies of
using-agent-relay(.claude/skills/and.agents/skills/) had drifted from the published skill, in four ways that all mislead an agent reading them:mcp__relaycast__send_dmandmcp__agent_relay__send_dm. The prefix comes from the configured server key, which isagent-relay, so the real decorated form ismcp__agent-relay__send_dm.list_dmswas missing from the tool table — whileorchestrating-agent-relaytells agents to use exactly that tool to re-read consumed DM history.gateway.relaycast.dev, the legacy host. Every default in this repo and in relaycast iscast.agentrelay.com.The published version is correct on all four and is a strict superset of the vendored CLI reference — it also documents
message inbox mark_read,message dm list,message get_thread,channel list,node up,node status, and the deprecatedlocalalias. I diffed both directions before syncing; the vendored copies had nothing unique except the stale warning.Bonus: the same drift in a rule file
.claude/rules/sdk.mdlisted these as the "Primary" communication protocol:Those are the old category-expanded names that
using-agent-relayexplicitly tells agents not to use, andagent-relay mcpdoes not register any of them — the registered names are flat (send_dm,check_inbox,list_agents,add_agent,remove_agent, verified inagent-relay-mcp.tsandmcp/messaging-tools.ts). Two files in this repo were giving agents opposite instructions, and the rule file was the wrong one. Corrected.Not addressed here — needs a decision
Five more skills exist in three copies (
skillsrepo,.claude/skills/,.agents/skills/) with three different hashes each.writing-agent-relay-workflowsis 2277 / 2093 / 1523 lines; even after normalizing markdown syntax, the.claudeand.agentscopies differ by ~630 lines. That is content divergence, not formatting.I fixed
using-agent-relayhere because it was unambiguous — the published copy is strictly better on every point. The rest needs a call I did not want to make unilaterally, because the vendored copies are newer by commit date but worse in content, so neither side is simply canonical:skillsrepo the single source and generate the two vendored trees from it in CI, orprpm install, orHappy to implement whichever you prefer as a follow-up.
Part of a series from a review of the Agent Relay skills and plugins.
Test Plan
package.jsonis at 11.4.0, so the 11.3.0 warning is obsoleteagent-relay(plugin.mcp.json) and that the registered tool names are flat, by grepping the registrations inagent-relay-mcp.tsandmcp/messaging-tools.tscast.agentrelay.comis the default engine URL across both repos.claude/skills/and.agents/skills/copies are byte-identical after the syncScreenshots
n/a
Generated by Claude Code