test-guide

test-guide is a skill for Claude Code, Codex 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 CodeCodex

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 skills/ebibibi/ebi-agent-chat-relay/test-guide
Any agent
npx skills add ebibibi/ebi-agent-chat-relay --skill test-guide
Clone the repo
git clone --depth 1 https://github.com/ebibibi/ebi-agent-chat-relay

Made for: Claude Code, Codex.

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.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.svg" alt="Measured on agentmods" 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. 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.1 $0.00026 $0.01020
Opus 5 $0.00013 $0.00510
Sonnet 5 $0.00005 $0.00204
Haiku 4.5 $0.00003 $0.00102

Measured 5d ago against content hash b8b1afec5d5e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, 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 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.

.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. 5d 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 (56 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. 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

pest-testing

Use this skill for Pest PHP testing in Laravel projects only. Trigger whenever any test is being written, edited, fixed, or refactored — including fixing tests that broke after a code change, adding assertions, converting PHPUnit to Pest, adding datasets, and TDD workflows. Always activate when the user asks how to…

coollabsio/coolify · 171 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/cli, vibe/acp, tools, config, sessions, skills, hooks, MCP…

mistralai/mistral-vibe · 80 tokens

nunit-testing

Use when writing or modifying tests in NUnit's own test projects, or when making a behavioral change to production code that needs test coverage. Covers test structure, attribute choice, helper visibility, platform guards, and which test projects are real.

nunit/nunit · 51 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