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

.claude/skills/test-guide/SKILL.md

test-guide is a skill for Claude Code from ebibibi/ebi-agent-chat-relay. It costs 26 tokens per session (1,020 once invoked), scanned A, original, MIT.

A project guide for testing a Python Discord bridge with pytest, including asynchronous code and simulated Discord objects.

In plain words
What is it for?
Use it when adding features, fixing bugs, or improving test coverage in the bridge. It covers tests for parsers, other self-contained logic, asynchronous functions, and Discord interactions.
Why use it?
It gives the agent repeatable patterns for writing tests, checking existing behavior, and finding regressions. It also explains test-driven development (TDD): write a failing test, make it pass, then clean up the code.

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/test-guide/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 test-guide

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/ebibibi/ebi-agent-chat-relay/test-guide"><img src="https://agentmods.dev/badge/skills/ebibibi/ebi-agent-chat-relay/test-guide.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 26 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,020 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 pass 7 Sept 2026
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.00026 $0.01020
Opus 5.5 $0.00010 $0.00408
Sonnet 5.5 $0.00005 $0.00204
Haiku 4.5 $0.00003 $0.00102

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

Security

Grade A, and why

test-guide 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 1mo 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/test-guide/SKILL.md · 154 lines

How it starts

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

Test Guide — Testing Patterns for claude-code-discord-bridge

When to Activate

  • Writing tests for new features
  • Fixing test failures
  • Adding test coverage for existing code
  • When asked to "add tests", "test this", or "improve coverage"

TDD Workflow

Follow the Red-Green-Refactor cycle:

  1. RED: Write a failing test that describes the desired behavior
  2. GREEN: Write the minimum code to make the test pass
  3. REFACTOR: Clean up while keeping tests green

Project Test Setup

# pyproject.toml
[tool.pytest.ini_options]
asyncio_mode = "auto"
testpaths = ["tests"]
  • pytest-asyncio: Auto mode — all async test functions run automatically
  • pytest-cov: Coverage reporting
  • No test markers needed: asyncio_mode = "auto" handles async tests

Test Patterns by Module

Pure Logic (parser, chunker, types) — Full Unit Tests

These have no external dependencies. Test exhaustively:

def test_parse_system_message():
    line = '{"type":"system","session_id":"abc-123"}'
    event = parse_line(line)
    assert event.message_type == MessageType.SYSTEM
    assert event.session_id == "abc-123"

def test_parse_invalid_json():
    event = parse_line("not json")
    assert event is None

Repository (database) — Integration Tests with Real SQLite

@pytest.fixture
async def repo(tmp_path):
    db_path = str(tmp_path / "test.db")
    await init_db(db_path)
    return SessionRepository(db_path)

async def test_save_and_get(repo):
    await repo.save(thread_id=123, session_id="abc-def")
    result = await repo.get_session_id(thread_id=123)
    assert result == "abc-def"

Runner — Unit Test Args/Env Building

def test_build_args_basic():
    runner = ClaudeRunner(command="claude", model="sonnet")
    args = runner._build_args("hello", session_id=None)
    assert args[0] == "claude"
    assert "-p" in args
    assert "--" in args
    assert args[-1] == "hello"

def test_build_args_rejects_invalid_session():
    runner = ClaudeRunner()
    with pytest.raises(ValueError):
        runner._build_args("hello", session_id="'; DROP TABLE --")

def test_env_strips_secrets():
    runner = ClaudeRunner()
    import os
    os.environ["DISCORD_BOT_TOKEN"] = "test-token"
    env = runner._build_env()
    assert "DISCORD_BOT_TOKEN" not in env

Read the full file on GitHub · 154 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. 1mo ago First seen · 154 lines · 26 tokens per session scan A b8b1afec5d5e

Subscribe to this mod's changes

test-guide is a skill published in the GitHub repository ebibibi/ebi-agent-chat-relay (64 stars, last pushed yesterday), licensed MIT. It adds 26 tokens to every session and 1,020 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

Other skills, from other repositories

rust-testing

Rust testing patterns including unit tests, integration tests, async testing, property-based testing, mocking, and coverage. Follows TDD methodology.

affaan-m/ECC · 31 tokens

cpp-testing

Use only when writing/updating/fixing C++ tests, configuring GoogleTest/CTest, diagnosing failing or flaky tests, or adding coverage/sanitizers.

affaan-m/ECC · 34 tokens

write-vibe-tests

Write or refactor Mistral Vibe tests with proper decoupling. Use when adding behavior coverage, testing ports/adapters, replacing brittle mocks, creating fakes, adding characterization tests before refactors, or changing tests under tests/ for vibe/core, vibe/appserver, vibe/acp, tools, config, sessions, skills…

mistralai/mistral-vibe · 80 tokens

composing-matchers

Build compound Gomega assertions by combining matchers — And/SatisfyAll (all pass), Or/SatisfyAny (any pass), Not (negate), WithTransform to map the actual before matching, Satisfy for an ad-hoc predicate, HaveValue to dereference pointers/interfaces, HaveField for struct fields and method results, HaveEach for every…

onsi/gomega · 136 tokens

principle-test-behavior-not-implementation

Apply when you write, change, or keep a test. Assert what the code's users can observe, so that the test fails when that behavior breaks and keeps passing when only the internals change.

michael-denyer/pstack-claude · 50 tokens

spec-driven-tests

Rebuild a package's unit test suite around a behavior specification (SPEC.md) derived from the implementation, with every test citing a numbered rule ID. Use when asked to do a spec-driven test rebuild, write a SPEC.md for a package, repeat the state or store spec process (PRs.

tldraw/tldraw · 63 tokens