add-slash-command

add-slash-command is a skill for Claude Code, Codex from bgill55/daedalus. It costs 32 tokens per session (764 once invoked), scanned A, original, MIT.

Instructions for adding a new slash command to Daedalus, a command-driven application. A slash command is a typed shortcut such as /config that runs a specific action.

In plain words
What is it for?
Use it when creating a command in Daedalus, including validating input, changing configuration, saving it, and updating the command index and documentation.
Why use it?
It explains the required command structure and the documentation update needed to keep the codebase and its docs in sync.

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/bgill55/daedalus/add-slash-command
Any agent
npx skills add bgill55/daedalus --skill add-slash-command
Clone the repo
git clone --depth 1 https://github.com/bgill55/daedalus

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 add-slash-command

README.md
[![agentmods](https://agentmods.dev/badge/skills/bgill55/daedalus/add-slash-command.svg)](https://agentmods.dev/skills/bgill55/daedalus/add-slash-command)
Your own site
<a href="https://agentmods.dev/skills/bgill55/daedalus/add-slash-command"><img src="https://agentmods.dev/badge/skills/bgill55/daedalus/add-slash-command.svg" alt="Measured on agentmods" height="20"></a>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 764 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 $0.00032 $0.00764
Opus 5 $0.00016 $0.00382
Sonnet 5 $0.00006 $0.00153
Haiku 4.5 $0.00003 $0.00076

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

Security

Grade A, and why

add-slash-command 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.

src/skills/add-slash-command/SKILL.md · 66 lines

How it starts

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

Adding a Slash Command to Daedalus

Commands live in src/commands/ and are aggregated in src/commands/index.ts. ESM only, named exports, .js extension on imports, no comments unless necessary.

Command shape

src/commands/types.ts defines Command:

export interface Command {
  name: string;            // '/spinner'
  aliases?: string[];      // ['spin']
  description: string;
  usage?: string;
  helpText?: string;
  execute: (args: string, ctx: CommandContext) => Promise<boolean | void>;
}

Steps

  1. Create src/commands/<name>.ts exporting export const <name>Commands: Command[]. Inside execute, use ctx.config (typed DaedalusConfig), ctx.configDir, ctx.router.
  2. To persist a config change, mirror /config (src/commands/dev.ts ~line 964):
    const { saveConfig, ConfigSchema } = await import('../config/index.js');
    ctx.config.ui.spinner = arg;
    const validated = ConfigSchema.parse(ctx.config);
    ctx.config = validated;
    saveConfig(validated);
    if (ctx.router && typeof ctx.router.updateConfig === 'function') {
      ctx.router.updateConfig(ctx.config.router);
    }
    
    Validate input BEFORE mutating; reject unknown values with a friendly message.
  3. Register in src/commands/index.ts: import { <name>Commands } from './<name>.js'; then spread ...<name>Commands, into commandsList.
  4. CRITICAL — docs will break CI if you skip this. src/docs.test.ts has two tests that fail unless the command is in BOTH the docs generator and the test's own copy:
    • scripts/sync-docs.ts: add the command to COMMAND_GROUPS (array) AND COMMAND_USAGES (map).
    • src/docs.test.ts: add the SAME entries to its duplicate COMMAND_GROUPS + COMMAND_USAGES.
    • Then run npm run sync-docs to regenerate README.md + docs/configuration-reference.md. The usual failure: a missing COMMAND_USAGES entry → test says "commands table is out of sync".
  5. Add src/commands/<name>.test.ts. For config-persisting commands, vi.mock('../config/index.js') with { ConfigSchema: { parse: (c) => c }, saveConfig: vi.fn() } so no real disk write; assert saveConfig called and ctx.router.updateConfig fired.

Read the full file on GitHub · 66 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 · 66 lines · 32 tokens per session scan A 155fcd8fd62c

Subscribe to this mod's changes

add-slash-command is a skill published in the GitHub repository bgill55/daedalus (4 stars, last pushed 5d ago), licensed MIT. It adds 32 tokens to every session and 764 once invoked, about $0.0002 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-31.

Related

Other skills, from other repositories

release

Release a new version of the project.

mochow13/keen-code · 10 tokens

commit

Inspect git status, draft a commit message that matches the repo's style, and commit staged changes.

mochow13/keen-code · 22 tokens

tlamatini-self-update-inclusion

Sweep the whole codebase and keep the SELF-UPDATE pipeline complete — so every new asset/feature added to Tlamatini is actually carried into a release by build.py AND survives (or is correctly replaced by) the self-update swap. Invoke whenever you add/rename a new agent, top-level file or directory, dependency…

XAIHT/Tlamatini · 171 tokens

tlamatini-self-modify-inclusion

Sweep the whole codebase and keep the SELF-MODIFY source snapshot complete — so the TlamatiniSourceCode/ tree that a --self-modify build ships carries every source/build asset Tlamatini needs to read, modify, and REBUILD herself, with heavy media/secrets correctly omitted+redacted and omitted binaries listed in the…

XAIHT/Tlamatini · 183 tokens

tlamatini-daily-chat-test

Run the daily automated Tlamatini chat regression — drive a visible Chrome via Playwright, log into agentpage.html, ask up to 1000 curated safe questions one-by-one (Multi-Turn ON, ACPX/Ask-Execs/Exec-Report/Internet OFF), wait for and qualify each answer (heuristic + LLM judge on failures), then write a dated report…

XAIHT/Tlamatini · 125 tokens

adding-external-mcp

The authoritative reference for adding a NEW external MCP server to Tlamatini universal MCP client layer. Covers the full lifecycle: catalog import, transport selection, activation, runtime provisioning, diagnosis, verification, and troubleshooting. READ THIS BEFORE calling externalmcpimport, before editing…

XAIHT/Tlamatini · 71 tokens