ebi-agent-chat-relay copilot-instructions.md

ebi-agent-chat-relay copilot-instructions.md is an instructions file for GitHub Copilot from ebibibi/ebi-agent-chat-relay. It costs 426 tokens per session, scanned A, original, MIT.

Project instructions for a Python Discord application that relays messages to the Claude Code command-line tool.

In plain words
What is it for?
Use them when changing the Discord relay, its session database, command runner, user interface, or pytest test suite. TDD means writing a failing test, making it pass, and then improving the code.
Why use it?
They give contributors consistent rules for architecture, testing, input validation, subprocess safety, and logging.

Instructions file for GitHub Copilot

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/ebibibi/ebi-agent-chat-relay/copilot-instructions
Clone the repo
git clone --depth 1 https://github.com/ebibibi/ebi-agent-chat-relay

Made for: GitHub Copilot.

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 ebi-agent-chat-relay copilot-instructions.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/ebibibi/ebi-agent-chat-relay/copilot-instructions.svg)](https://agentmods.dev/instructions/ebibibi/ebi-agent-chat-relay/copilot-instructions)
Your own site
<a href="https://agentmods.dev/instructions/ebibibi/ebi-agent-chat-relay/copilot-instructions"><img src="https://agentmods.dev/badge/instructions/ebibibi/ebi-agent-chat-relay/copilot-instructions.svg" alt="Measured on agentmods" height="20"></a>
Per session 426 This file is loaded in full into every session.
When invoked 426 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.00426 $0.00426
Opus 5 $0.00213 $0.00213
Sonnet 5 $0.00085 $0.00085
Haiku 4.5 $0.00043 $0.00043

Measured 5d ago against content hash 833baceb7fa6, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

ebi-agent-chat-relay copilot-instructions.md 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 5d 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.

.github/copilot-instructions.md · 40 lines

What it actually says

claude-code-discord-bridge — Copilot Instructions

Discord frontend for Claude Code CLI. Python 3.12+ with discord.py v2.

Key Rules

  • Type hints required on all function signatures
  • from __future__ import annotations in every Python file
  • ruff for linting and formatting (line-length: 100)
  • pytest with pytest-asyncio (auto mode) for testing
  • Never use shell=True in subprocess calls — always create_subprocess_exec
  • Validate all user input before passing to CLI (regex for session IDs, skill names)
  • -- separator before user prompts in CLI args to prevent flag injection
  • contextlib.suppress for non-critical Discord API failures
  • Logging via logging.getLogger(__name__), never print()

Architecture

  • claude_discord/claude/ — CLI subprocess runner and stream-json parser
  • claude_discord/cogs/ — Discord.py Cogs. Use _run_helper.run_claude_in_thread() for CLI execution
  • claude_discord/database/ — SQLite session persistence (aiosqlite)
  • claude_discord/discord_ui/ — Status reactions, message chunking, embeds
  • tests/ — pytest suite

Testing (TDD Enforced)

Write tests FIRST, then implement. Follow RED → GREEN → REFACTOR for all new features and bug fixes.

uv run pytest tests/ -v --cov=claude_discord
uv run ruff check claude_discord/
uv run ruff format --check claude_discord/

Security (Mandatory Pre-Commit)

This project spawns Claude Code CLI as a subprocess. All user input flows through to CLI args. Never interpolate user input into shell commands. Strip secrets from subprocess env. Run security audit before committing changes to runner.py, _run_helper.py, or any Cog.

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. 5d ago First seen · 40 lines · 426 tokens per session scan A 833baceb7fa6

Subscribe to this mod's changes

ebi-agent-chat-relay copilot-instructions.md is an instructions file published in the GitHub repository ebibibi/ebi-agent-chat-relay (57 stars, last pushed 2d ago), licensed MIT. It adds 426 tokens to every session, about $0.0021 per session on Opus 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.