diagnosing-commands

diagnosing-commands is a skill for Claude Code from asgeirtj/system_prompts_leaks. It costs 132 tokens per session (1,772 once invoked), scanned A, original, CC0-1.0.

A troubleshooting guide for ZCode custom slash commands, which are commands such as `/review` defined by Markdown files. It explains where commands are discovered, how nested names work, and why one command can override another.

In plain words
What is it for?
Use it to diagnose custom command discovery, naming, frontmatter, substitution, precedence, and availability in the ZCode command menu.
Why use it?
It helps find commands that are missing, invalid, empty, incorrectly named, or replaced by a higher-priority copy.

Skill for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: positional $N argument.

Good fit Use it to diagnose custom command discovery, naming, frontmatter, substitution, precedence, and availability in the ZCode command menu.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/asgeirtj/system_prompts_leaks/diagnosing-commands
About the project

System Prompts Leaks is a collection of captured system instructions used to guide AI chatbots and coding agents before they receive user messages. It serves researchers and developers studying how different AI assistants are directed.

asgeirtj/system_prompts_leaks · 70,207 stars · on GitHub

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.

Any agent
npx skills add asgeirtj/system_prompts_leaks --skill diagnosing-commands
Clone the repo
git clone --depth 1 https://github.com/asgeirtj/system_prompts_leaks

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 diagnosing-commands

README.md
[![agentmods](https://agentmods.dev/badge/skills/asgeirtj/system_prompts_leaks/diagnosing-commands/github.svg)](https://agentmods.dev/skills/asgeirtj/system_prompts_leaks/diagnosing-commands)
Your own site
<a href="https://agentmods.dev/skills/asgeirtj/system_prompts_leaks/diagnosing-commands"><img src="https://agentmods.dev/badge/skills/asgeirtj/system_prompts_leaks/diagnosing-commands/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 diagnosing-commands

Your own site · 80×15
<a href="https://agentmods.dev/skills/asgeirtj/system_prompts_leaks/diagnosing-commands"><img src="https://agentmods.dev/badge/skills/asgeirtj/system_prompts_leaks/diagnosing-commands.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 132 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,772 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.
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.00132 $0.01772
Opus 5.5 $0.00053 $0.00709
Sonnet 5.5 $0.00026 $0.00354
Haiku 4.5 $0.00013 $0.00177

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

Security

Grade A, and why

diagnosing-commands 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 2d 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.

GLM/skills/diagnosing-commands/SKILL.md · 67 lines

How it starts

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

Diagnosing Command Configuration

Goal: reduce any /command problem to a single concrete fix.

A person inspects commands from the / menu (the Commands group) in the input box; an agent inspects by reading the command files at the locations below.

Two points that are often misunderstood: nested command names join with a colon (review/code.md becomes /review:code, not /review/code); and a command is a .md file whose file name is the command name.

1. Discovery order (earlier locations take precedence)

  1. Explicitly configured roots
  2. User ~/.zcode/commands
  3. User ~/.agents/commands
  4. Workspace .zcode/commands (from the current directory up to the repository root; every level counts)
  5. Workspace .agents/commands
  6. Enabled plugin command roots (lowest precedence)

Within a level, .zcode is scanned before .agents. Subdirectories are scanned recursively, and a nested path joins into the command name with a colon.

2. Deduplication rule (first match wins)

The key is the normalized command name (the relative path with .md removed, separators replaced by :, lowercased). The first occurrence — the highest-precedence location — wins: user overrides workspace, .zcode overrides .agents, and local files override plugins. Duplicates are ignored.

There is also an interactive-surface-only filter: a command whose name matches a built-in slash command (or compress) is filtered out of the live / menu, though it is still present on disk.

3. Command .md format

  • The command name comes from the file name and must match ^[a-z0-9][a-z0-9_:-]{0,63}$ (lowercase alphanumeric start; no spaces, dots, or leading -/_; at most 64 characters). A violation drops the command.
  • Frontmatter (a flat parser; indented lines are ignored) recognizes description, argument-hint, allowed-tools, model, skills, and disable-noninteractive (all hyphenated). An unknown key is ignored but the command still loads.
  • A description or a non-empty body is required — otherwise the command is dropped. When description is absent, the first non-empty body line is used.
  • Argument substitution: $ARGUMENTS is the full argument string; $1/$2 are positional (out of range is empty). When arguments are supplied but no placeholder is present, they are appended under a "User arguments:" heading.
  • skills are auto-mounted. Inline dynamic shell (!`cmd` or a fenced ! block) is rejected.

Read the full file on GitHub · 67 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. 2d ago First seen · 67 lines · 132 tokens per session scan A b11d692dbbad

Subscribe to this mod's changes

diagnosing-commands is a skill published in the GitHub repository asgeirtj/system_prompts_leaks (70,207 stars, last pushed today), licensed CC0-1.0. It adds 132 tokens to every session and 1,772 once invoked, about $0.0005 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-10-24.