create-bot

A guided setup for creating a Discord bot through Discord’s developer website. It covers creating the application, enabling required access settings, handling the bot token, and inviting the bot.

In plain words
What is it for?
Use it when creating a Discord bot for ThisCodex, choosing whether it should receive direct messages or appear in a specific server or private channel, and completing the required Discord setup.
Why use it?
It helps avoid missing portal settings or exposing the bot token while setting up a Discord bot. It also separates a test run from actions that change the live Discord account.

Skill for Claude CodeCodex

Part of the thiscodex plugin — 8 skills shipped together

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/treylom/thiscodex/create-bot
Any agent
npx skills add treylom/ThisCodex --skill create-bot
Clone the repo
git clone --depth 1 https://github.com/treylom/ThisCodex

Made for: Claude Code, Codex.

Or install thiscodex, the plugin that ships this one along with the rest of its 8 skills.

Per session 69 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,939 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 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.00069 $0.03939
Opus 5 $0.00034 $0.01969
Sonnet 5 $0.00014 $0.00788
Haiku 4.5 $0.00007 $0.00394

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

Security

Grade C, and why

create-bot scanned grade C with 2 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 3d 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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

chmod 600 "$STATE_DIR/.env" 2>/dev/null || true

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

Equivalent `~/.codex/config.toml` registration:
skills/create-bot/SKILL.md · 401 lines

How it starts

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

Create a Discord bot with ThisCodex

Carry the Discord Developer Portal flow to completion. The default is browser automation, with exactly three human-only security gates. Do not replace this flow with a list of portal instructions when an interactive browser MCP is available.

This is a Codex-surface port of the companion ThisCode skills/create-bot/SKILL.md. Keep its portal order, intent set, permissions, and security boundaries. This skill owns the Discord application and token stage; use thiscodex init for the surrounding local bot workspace setup.

Inputs

Confirm these before a live run:

  • bot/application name;
  • the ThisCodex Discord state directory that will receive .env;
  • DM-only or a named server/private-channel exposure;
  • whether the user requested dry-run or a live portal run.

If the state directory is not yet confirmed, stop and run guided thiscodex init. Do not invent a path.

0. Dry-run boundary

In dry-run mode, verify this document, discover browser capabilities, and explain the three human gates. A dry-run must not navigate to Discord, mutate Codex configuration, create an application, reset a token, or invite a bot.

Package tests and unattended CI are always dry-run. A real browser E2E uses a real account and therefore requires the account owner to be present.

0.5 Automation mode and the code gate

thiscodex init asks Automatic (auto / 자동) or Manual (manual / 수동) as its first interaction. Do not ask the same question again here. Before any manual handoff, call the shipped code gate; prose judgment is not evidence:

thiscodex automation-gate --gate <stable-gate-name> \
  --status <succeeded|failed|human_required> \
  --surface <policy-surface> --flow <policy-flow> \
  --provider <observed-provider-or-empty> --operation <policy-operation> \
  --terminal <policy-terminal> --reason-code <policy-reason-code>

In auto mode an unlisted gate is blocked. For attempt-required gates the CLI accepts only a completion envelope independently written by the app-server bridge for the current turn; flags or prose cannot claim an attempt. Immediately before the relevant tool call, bind its policy gate and operation with thiscodex automation-attempt --gate <stable-gate-name>. Evidence without that pre-attempt coordinate cannot satisfy another operation in the same flow. The first provider observed for a flow is bound to that flow. The gate writes only policy labels plus evidence coordinates (never arguments, page text, URL, result, or raw error) to ~/.config/thiscodex/automation-attempts.jsonl.

Read the full file on GitHub · 401 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. 3d ago First seen · 401 lines · 69 tokens per session scan C bde1f40116ee

Subscribe to this mod's changes

create-bot is a skill published in the GitHub repository treylom/ThisCodex (17 stars, last pushed 17d ago), licensed MIT. It adds 69 tokens to every session and 3,939 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it C with 2 findings (asks for root, reads agent configuration directories). 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

electron

Automate Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify, etc.) using agent-browser via Chrome DevTools Protocol. Use when the user needs to interact with an Electron app, automate a desktop app, connect to a running app, control a native app, or test an Electron application. Triggers include…

vercel-labs/agent-browser · 112 tokens

use-agent-browser-for-airi

Test AIRI display-model imports with agent-browser across stage-tamagotchi Electron, stage-web, and stage-pocket mobile web layouts. Use when uploading and verifying contributor-supplied Live2D ZIP, VRM, or MMD ZIP/PMX/PMD files through AIRI's model selector, including onboarding bypass, format-specific import…

moeru-ai/airi · 87 tokens

opencli-sitemap-author

Use when creating or maintaining OpenCLI site sitemaps: agent-facing navigation, page-state, action, workflow, API-reference, pitfall, and fallback knowledge for a website. Use after browser exploration discovers durable site context, when a sitemap is stale, or when promoting local site knowledge into the repo.

jackwener/OpenCLI · 67 tokens

playwright

Use when the task requires automating a real browser from the terminal (navigation, form filling, snapshots, screenshots, data extraction, UI-flow debugging) via playwright-cli or the bundled wrapper script.

XiaomiMiMo/MiMo-Code · 45 tokens

pinchtab-mcp

Use this skill when a task requires browser automation through PinchTab's MCP server connected to a remote browser instance. Covers navigation, element interaction, data extraction, form filling, multi-step flows, and session management via MCP tools.

pinchtab/pinchtab · 52 tokens

peekaboo

Capture and automate macOS UI with the Peekaboo CLI.

the-open-agent/openagent · 17 tokens