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

.claude/skills/tdd/SKILL.md

tdd is a skill for Claude Code from ebibibi/ebi-agent-chat-relay. It costs 24 tokens per session (1,558 once invoked), scanned C, original, MIT.

A rule for using test-driven development (TDD), where tests are written before the code they check, in a Python Discord bridge project.

In plain words
What is it for?
Use it for new features, bug fixes, refactoring, new Discord bot modules, parser rules, interface components, or database operations. The required cycle is failing test, minimal implementation, then cleanup.
Why use it?
It makes new behavior and bug fixes explicit before implementation and helps prevent changes from breaking existing behavior.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

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/tdd/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 tdd

README.md
[![agentmods](https://agentmods.dev/badge/skills/ebibibi/ebi-agent-chat-relay/tdd.svg)](https://agentmods.dev/skills/ebibibi/ebi-agent-chat-relay/tdd)
Your own site
<a href="https://agentmods.dev/skills/ebibibi/ebi-agent-chat-relay/tdd"><img src="https://agentmods.dev/badge/skills/ebibibi/ebi-agent-chat-relay/tdd.svg" alt="Measured on agentmods" 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 1,558 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. 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.00024 $0.01558
Opus 5 $0.00012 $0.00779
Sonnet 5 $0.00005 $0.00312
Haiku 4.5 $0.00002 $0.00156

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

Security

Grade C, and why

tdd scanned grade C with 1 finding 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 7d 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

assert not re.match(r"^[\w-]+$", "invalid; rm -rf /")
.claude/skills/tdd/SKILL.md · 222 lines

How it starts

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

TDD — Test-Driven Development (Enforced)

This is not a suggestion. This is the workflow.

When adding features or fixing bugs in claude-code-discord-bridge, you MUST write tests before writing implementation code. No exceptions.

When to Activate

  • Adding any new feature or functionality
  • Fixing a bug (write a test that reproduces the bug FIRST)
  • Refactoring code (ensure existing tests pass, add missing ones)
  • Adding a new Cog, parser rule, UI component, or database operation

The Cycle: RED → GREEN → REFACTOR

Step 1: RED — Write Failing Tests

Write tests that describe the desired behavior. Run them. They must fail.

uv run pytest tests/test_new_feature.py -v
# Expected: FAILED (because the code doesn't exist yet)

If tests pass before you write any implementation, your tests are wrong.

Step 2: GREEN — Write Minimal Implementation

Write the minimum code to make the tests pass. No more.

uv run pytest tests/test_new_feature.py -v
# Expected: PASSED

Step 3: REFACTOR — Clean Up

Improve the implementation while keeping all tests green. Then run the full suite:

uv run pytest tests/ -v --cov=claude_discord --cov-report=term-missing

Step 4: VERIFY — Lint + Format + Full Suite

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

What to Test First (by module type)

New Parser Rule

# tests/test_parser.py — Write THIS first
def test_parse_new_event_type():
    line = '{"type":"new_type","data":"value"}'
    event = parse_line(line)
    assert event is not None
    assert event.message_type == MessageType.ASSISTANT

def test_parse_new_event_type_missing_data():
    line = '{"type":"new_type"}'
    event = parse_line(line)
    assert event is not None  # Should handle gracefully

# THEN implement in claude_discord/claude/parser.py

New Cog Command

# tests/test_new_cog.py — Write THIS first
from unittest.mock import AsyncMock, MagicMock

def test_rejects_unauthorized_user():
    cog = MyCog(bot=MagicMock(), allowed_user_ids={111})
    assert cog._is_authorized(999) is False

def test_accepts_authorized_user():
    cog = MyCog(bot=MagicMock(), allowed_user_ids={111})
    assert cog._is_authorized(111) is True

def test_validates_input_format():
    # Test that invalid input is rejected before reaching CLI
    assert not re.match(r"^[\w-]+$", "invalid; rm -rf /")

# THEN implement in claude_discord/cogs/my_cog.py

Read the full file on GitHub · 222 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. 7d ago First seen · 222 lines · 24 tokens per session scan C a937a02f1920

Subscribe to this mod's changes

tdd is a skill published in the GitHub repository ebibibi/ebi-agent-chat-relay (56 stars, last pushed yesterday), licensed MIT. It adds 24 tokens to every session and 1,558 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.