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

.claude/skills/add-cog/SKILL.md

add-cog is a skill for Claude Code from ebibibi/ebi-agent-chat-relay. It costs 18 tokens per session (617 once invoked), scanned A, original, MIT.

A step-by-step guide for adding a Cog to a discord.py bot. A Cog is a reusable group of Discord commands and event handlers.

In plain words
What is it for?
Use it to add Discord slash commands, event handlers, or other bot functionality.
Why use it?
It gives new bot features a consistent structure and avoids duplicating the shared code used to run Claude CLI tasks.

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/add-cog/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 add-cog

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/ebibibi/ebi-agent-chat-relay/add-cog"><img src="https://agentmods.dev/badge/skills/ebibibi/ebi-agent-chat-relay/add-cog.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 18 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 617 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.00018 $0.00617
Opus 5 $0.00009 $0.00309
Sonnet 5 $0.00004 $0.00123
Haiku 4.5 $0.00002 $0.00062

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

Security

Grade A, and why

add-cog 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 9d 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/add-cog/SKILL.md · 107 lines

How it starts

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

Add Cog — Scaffold a New Discord.py Cog

When to Activate

  • Adding new Discord bot functionality
  • Creating a new slash command or event handler
  • When asked to "add a cog", "create a command", or "add a feature"

Steps

1. Create the Cog File

Create claude_discord/cogs/your_cog.py:

"""Short description of what this Cog does."""

from __future__ import annotations

import logging

import discord
from discord import app_commands
from discord.ext import commands

logger = logging.getLogger(__name__)


class YourCog(commands.Cog):
    """Docstring explaining the Cog's purpose."""

    def __init__(
        self,
        bot: commands.Bot,
        # Add dependencies as constructor params (dependency injection)
    ) -> None:
        self.bot = bot

    # Add commands and listeners here

2. If It Runs Claude CLI

Use the shared helper — never duplicate the streaming logic:

from ._run_helper import run_claude_in_thread

# In your command handler:
runner = self.runner.clone()  # Always clone for concurrent safety
await run_claude_in_thread(
    thread=thread,
    runner=runner,
    repo=self.repo,
    prompt=user_input,
    session_id=existing_session_id,
)

3. Export from Package

Add to claude_discord/cogs/__init__.py:

from .your_cog import YourCog

Add to claude_discord/__init__.py:

from .cogs.your_cog import YourCog
# And add "YourCog" to __all__

4. Write Tests

Create tests/test_your_cog.py:

  • Test command validation (invalid inputs, edge cases)
  • Test authorization checks
  • Mock Discord objects (discord.Interaction, discord.TextChannel, etc.)
  • Test error handling paths

5. Verify

Run the verify skill to ensure everything passes:

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

Conventions

  • Type hints: Required on all function signatures
  • from __future__ import annotations: Required in every file
  • Logging: Use logger = logging.getLogger(__name__), never print()
  • Authorization: If the Cog accepts user commands, check _is_authorized(user_id)
  • Input validation: Validate all user-provided strings with regex before passing to subprocess
  • Error handling: Use contextlib.suppress(discord.HTTPException) for non-critical Discord API calls

Read the full file on GitHub · 107 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. 9d ago First seen · 107 lines · 18 tokens per session scan A 981ba457d5af

Subscribe to this mod's changes

add-cog is a skill published in the GitHub repository ebibibi/ebi-agent-chat-relay (56 stars, last pushed 2d ago), licensed MIT. It adds 18 tokens to every session and 617 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.