ebi-agent-chat-relay: Skill for Claude Code

.claude/skills/security-audit/SKILL.md

security-audit is a skill for Claude Code from ebibibi/ebi-agent-chat-relay. It costs 24 tokens per session (791 once invoked), scanned A, original, MIT.

A security checklist for a Discord bot that starts Claude Code sessions from user messages. It covers command injection, secret leaks, session validation, and subprocess safety.

In plain words
What is it for?
It is used when changing subprocess execution, user commands, environment variables, or session handling in claude-code-discord-bridge.
Why use it?
It helps prevent attackers from turning Discord input into unwanted commands or using the bot to expose credentials.

Skill for Claude Code

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

This is ebibibi/ebi-agent-chat-relay's own configuration. It tells Claude Code how to work on ebi-agent-chat-relay 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 ebi-agent-chat-relay configures →

Reuse

Borrowing it

Nothing to install: this file belongs to ebibibi/ebi-agent-chat-relay. 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/ebibibi/ebi-agent-chat-relay/main/.claude/skills/security-audit/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/ebibibi/ebi-agent-chat-relay

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 security-audit

README.md
[![agentmods](https://agentmods.dev/badge/skills/ebibibi/ebi-agent-chat-relay/security-audit/github.svg)](https://agentmods.dev/skills/ebibibi/ebi-agent-chat-relay/security-audit)
Your own site
<a href="https://agentmods.dev/skills/ebibibi/ebi-agent-chat-relay/security-audit"><img src="https://agentmods.dev/badge/skills/ebibibi/ebi-agent-chat-relay/security-audit/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 security-audit

Your own site · 80×15
<a href="https://agentmods.dev/skills/ebibibi/ebi-agent-chat-relay/security-audit"><img src="https://agentmods.dev/badge/skills/ebibibi/ebi-agent-chat-relay/security-audit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 24 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 791 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Privilege Escalation · line 78
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 79
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
How audits are shown
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.00024 $0.00791
Opus 5.5 $0.00010 $0.00316
Sonnet 5.5 $0.00005 $0.00158
Haiku 4.5 $0.00002 $0.00079

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

Security

Grade A, and why

security-audit 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 3mo 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/skills/security-audit/SKILL.md · 88 lines

How it starts

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

Security Audit — claude-code-discord-bridge Specific

This project runs arbitrary Claude Code sessions triggered by Discord messages. Security is the #1 priority.

When to Activate

  • Before any commit that changes runner.py, _run_helper.py, or any Cog
  • When adding new user-facing commands
  • When modifying subprocess execution or argument passing
  • When adding new environment variables or configuration
  • Periodically as a full audit

Threat Model

Threat Vector Mitigation
Command injection User message passed to CLI args create_subprocess_exec (no shell), -- separator
Flag injection Prompt starting with - -- separator before prompt
Session hijack Fake session ID Strict regex validation ^[a-f0-9\-]+$
Skill injection Malicious skill name Strict regex validation ^[\w-]+$
Secret exfiltration Claude Bash tool reads env Strip secrets from subprocess env
Nesting attack Claude spawns another claude-code-discord-bridge Strip CLAUDECODE from env
Token theft Bot token in logs/errors Never log tokens, strip from env

Checklist

Subprocess Safety

  • All subprocess calls use asyncio.create_subprocess_exec (NEVER shell=True)
  • -- separator is always placed before user-provided prompt text
  • No string formatting/interpolation of user input into command strings
  • Session IDs validated with re.match(r"^[a-f0-9\-]+$", session_id)
  • Skill names validated with re.match(r"^[\w-]+$", name)

Environment Security

  • _STRIPPED_ENV_KEYS includes all secret environment variables
  • DISCORD_BOT_TOKEN is stripped from subprocess env
  • CLAUDECODE is stripped (prevents nesting detection bypass)
  • No secrets in log output (check logger.info/debug/warning/error calls)
  • .env file is in .gitignore

Input Validation

  • All user-provided strings are validated before use
  • Discord message content is never directly interpolated into commands
  • Thread IDs and channel IDs are validated as integers
  • No user input reaches dangerous evaluation functions

Read the full file on GitHub · 88 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. 3mo ago First seen · 88 lines · 24 tokens per session scan A 6f6c9775a15a

Subscribe to this mod's changes

security-audit is a skill published in the GitHub repository ebibibi/ebi-agent-chat-relay (68 stars, last pushed yesterday), licensed MIT. It adds 24 tokens to every session and 791 once invoked, about $0.0001 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-30.

Related

security-audit compared with skills from other repositories

security-audit next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
security-auditebibibi/ebi-agent-chat-relaySkill68yesterdayMITA24Claude Code
switchsandbox-quantum/switchSkill5.2kyesterdaynoneA135Claude Code, Codex
switch-buddy-first-agentsandbox-quantum/switchSkill5.2kyesterdaynoneA43Claude Code, Codex
switch-buddy-channelssandbox-quantum/switchSkill5.2kyesterdaynoneA45Claude Code, Codex
switch-buddy-onboardingsandbox-quantum/switchSkill5.2kyesterdaynoneA0Claude Code, Codex
switch-buddy-connectorssandbox-quantum/switchSkill5.2kyesterdaynoneA43Claude Code, Codex
switch-buddy-consolesandbox-quantum/switchSkill5.2kyesterdaynoneA33Claude Code, Codex