Agent skill

Diagnosing Commands

by zai-org in zai-org/ZCode

A skill your agent uses to diagnose and fix ZCode custom slash-command (/command) configuration problems in the ZCode client.

Apache-2.0Auto-check passedAgent Workflows

Install Diagnosing Commands

skills CLI
$ npx skills add zai-org/ZCode --skill diagnosing-commands -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install zai-org/ZCode diagnosing-commands --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/zai-org/ZCode.git skills-src && mkdir -p .claude/skills && cp -r skills-src/apps/zcode-cli/packages/zcode-guide-plugin/skills/diagnosing-commands .claude/skills/diagnosing-commands && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
diagnosing-commands
GitHub stars
7.7k
Token cost
~1.8k tokens
SKILL.md length
955 words
Files
1
Skills in repo
5
Repo updated
First seen
Licence
Apache-2.0

At a glance

A skill your agent uses to diagnose and fix ZCode custom slash-command (/command) configuration problems in the ZCode client.

  • Works in 6 steps: Discovery order (earlier locations take… → Deduplication rule (first match wins) → Command .md format → …
  • Diagnose and fix ZCode custom slash-command (/command) configuration problems in the ZCode client
  • SKILL.md covers 1. Discovery order (earlier…, 2. Deduplication rule (first…, 3. Command .md format and 4. How to inspect commands, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Diagnosing Commands is an agent skill from zai-org/ZCode. Use to diagnose and fix ZCode custom slash-command (/command) configuration problems in the ZCode client. Applies when a command is missing, is overridden by a higher-precedence command of the same name, has a frontmatter parse error, is dropped for having an empty body, has an invalid name, does not substitute $ARGUMENTS/$1, uses a colon rather than a slash for nested names, has a misspelled frontmatter key, or disappears because the plugin providing it is disabled. Provides the discovery order, how to inspect…

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Agent Workflows, covering Internationalization and Hooks and plugins. The repository describes itself as: Z.ai's coding agent harness. Powerful, intelligent, extensible. The licence is Apache-2.0.

When your agent uses it

  • Diagnose and fix ZCode custom slash-command (/command) configuration problems in the ZCode client
  • Tasks that involve Internationalization
  • Tasks that involve Hooks and plugins

Example prompts

  • “/diagnosing-commands”

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Discovery order (earlier locations take precedence)
  2. Deduplication rule (first match wins)
  3. Command .md format
  4. How to inspect commands
  5. Common pitfalls (symptom → cause → fix)
  6. Localization workflow (in order)

What it can do on your machine

Read from SKILL.md and the folder at commit aac4755. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Diagnosing Commands loads about 1.8k tokens when it runs. Until then it costs about 158 tokens; SKILL.md has 955 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~158
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from zai-org/ZCode at commit aac4755, republished under its Apache-2.0 licence (© zai-org). 955 words, ~1,822 tokens.

Download SKILL.mdSave it as .claude/skills/diagnosing-commands/SKILL.md (or your agent's skills folder).
name
diagnosing-commands
description
Use to diagnose and fix ZCode custom slash-command (/command) configuration problems in the ZCode client. Applies when a command is missing, is overridden by a higher-precedence command of the same name, has a frontmatter parse error, is dropped for having an empty body, has an invalid name, does not substitute $ARGUMENTS/$1, uses a colon rather than a slash for nested names, has a misspelled frontmatter key, or disappears because the plugin providing it is disabled. Provides the discovery order, how to inspect commands in the client, common pitfalls, and a step-by-step localization and repair workflow.

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.

4. How to inspect commands

  • In the client: type / in the input box and open the Commands group; you can search by keyword. Each entry shows its name and description.
  • As an agent: read the .md files at each location in discovery order. Derive each command's name from its path (subdirectories become :), and remember that for a same-named command the first in discovery order is the one that runs.

5. Common pitfalls (symptom → cause → fix)

  1. Missing — wrong directory — the .md is not under a scanned root (for example a singular .zcode/command/, or above the repository root). → Move it into ~/.zcode/commands/ or <repo>/.zcode/commands/.
  2. Missing — invalid name — the file exists but no command appears. The file name violates the pattern (uppercase, spaces, dots, leading -/_, or over 64 characters). → Rename to a valid lowercase name; namespace with subdirectories (which become :), not dots.
  3. Overridden by a higher-precedence duplicate — a different command runs, or your edits have no effect. First match wins. → Find the higher-precedence copy in discovery order and rename or remove it. Local files always beat plugins.
  4. Frontmatter parse error — a key is silently missing. The flat parser reads only single-line top-level keys; indented lines and multi-line arrays are dropped. → Keep every value on one line; write lists inline, e.g. allowed-tools: Read, Bash.
  5. Empty command is dropped — both the description and the body are empty. → Add a description: or at least one non-empty body line.
  6. Unknown frontmatter key (misspelling) — model/skills/allowed-tools have no effect. → Use the hyphenated keys: allowed-tools (not allowed_tools), argument-hint, disable-noninteractive.
  7. $ARGUMENTS/$1 does not substitute — the placeholder appears literally or is empty. The body has no placeholder (arguments are appended under "User arguments:" by design), $1 is out of range, or a form like ${ARGUMENTS} is not recognized. → Use the exact $ARGUMENTS/$1 tokens.
  8. Dynamic shell is rejected — running the command reports an unsupported shell expansion. The body contains !`...` or a fenced ! block. → Remove it; use static text or $ARGUMENTS.
  9. A plugin command is missing — a disabled plugin contributes no command roots, or a local same-named file is shadowing it. → Enable the plugin in Settings → Plugin Management, and ensure no local duplicate shadows it.
  10. Disabled by configuration — a valid command silently disappears. The configuration disables it by the command file's absolute path (not the command name). → Set that path's enable to true or remove it.
  11. / versus : confusion — /review/code reports not found although review/code.md exists. Subdirectories map to :, so the real name is review:code. → Invoke /review:code.
  12. Reserved-name collision (interactive only) — the command exists on disk but cannot be triggered in the live / menu, because its name matches a built-in slash command or compress. → Rename to a non-reserved name.
Show full SKILL.md (166 more words)Show less

6. Localization workflow (in order)

  1. Is it in the / menu? Open the Commands group. Absent → step 2. Present but the wrong content runs → step 4 (a duplicate).
  2. Confirm the file and its root. Ensure the .md sits directly under a scanned commands root for the current working directory — pitfall 1 — and that its name is valid — pitfall 2.
  3. Check the frontmatter. A missing/garbled key points to the flat-parser rules (pitfall 4) or an empty command (pitfall 5); a key with no effect is likely a misspelling (pitfall 6).
  4. Resolve a duplicate. For a given name, the winner is the first in discovery order; find and rename or remove the copy you do not want.
  5. Check the body. Verify the argument placeholders (pitfall 7) and that there is no rejected dynamic shell (pitfall 8).
  6. Still missing with no obvious cause? Check for a configuration disable (pitfall 10, by absolute file path), a disabled plugin (pitfall 9), or reserved-name filtering (pitfall 12).

© zai-org, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in apps/zcode-cli/packages/zcode-guide-plugin/skills/diagnosing-commands of zai-org/ZCode.

Open the folder on GitHubat commit aac4755

Compare with similar skills

Diagnosing Commands next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Diagnosing Commands compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Diagnosing Commands this skillzai-org/ZCode7.7k—~1.8kAutomated safety check: PassApache-2.0
Wp Plugin Developmentjorgerosal/wordpress-skills103—~438Automated safety check: PassMIT
Ckeditor5 Plugin DevelopmentTriliumNext/Trilium38k—~4.9kAutomated safety check: PassAGPL-3.0
Wp Plugin Developmentjorgerosal/wordpress-skills103—~12kAutomated safety check: PassMIT
FbaZhongye1/KnowAgenticRAG135—~758Automated safety check: PassNone
Hook Development for Claude Code Pluginsanthropics/claude-plugins-official38k10 repos~4.1kAutomated safety check: NotesApache-2.0

Similar skills

  • Wp Plugin Development

    jorgerosal/wordpress-skills

    WordPress plugin architecture review for Codex. An agent skill from jorgerosal/wordpress-skills.

    103 GitHub stars~438 tokensUpdated 4 mo ago
    Agent WorkflowsAuto-check passed
  • Ckeditor5 Plugin Development

    TriliumNext/Trilium

    Write, extend, and review CKEditor 5 plugins in the Trilium (TriliumNext Notes) monorepo — the rich-text-note editor under packages/ckeditor5, whose plugins live in src/plugins/.

    38k GitHub stars~4.9k tokensUpdated today
    DevelopmentAuto-check passed
  • Wp Plugin Development

    jorgerosal/wordpress-skills

    WordPress plugin architecture review and WordPress.org submission standards.

    103 GitHub stars~12k tokensUpdated 4 mo ago
    Frontend & DesignAuto-check passed
  • Fba

    Zhongye1/KnowAgenticRAG

    FastAPI Best Architecture (fba) project development guide. An agent skill from Zhongye1/KnowAgenticRAG.

    135 GitHub stars~758 tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • Hook Development for Claude Code Plugins

    anthropics/claude-plugins-official

    Official

    Explains how to write Claude Code plugin hooks, both prompt-based checks and bash commands, for events such as PreToolUse, Stop and SessionStart.

    38k GitHub starsUsed in 10 repos~4.1k tokens
    Agent WorkflowsAuto-check: notes
  • Claude Code Agent Development

    anthropics/claude-plugins-official

    Official

    Explains how to write agents for Claude Code plugins: the markdown file with YAML frontmatter, trigger descriptions, model and color settings, and system prompt design.

    38k GitHub starsUsed in 7 repos~2.8k tokens
    Agent WorkflowsAuto-check passed

More from zai-org/ZCode

All 25 skills in this repo
  • DOCX

    zai-org/ZCode

    Complete DOCX document creation, editing, and analysis capabilities with support for revisions, comments, formatting preservation, and text extraction.

    7.7k GitHub stars~4.9k tokensUpdated yesterday
    Auto-check: notes
  • Visualize

    zai-org/ZCode

    Create visualizations and interactive tools directly in conversation.

    7.7k GitHub stars~8.7k tokensUpdated yesterday
    Auto-check passed
  • PDF

    zai-org/ZCode

    Professional PDF toolkit covering four production workflows: reports, creative visuals, academic LaTeX, and existing PDF processing.

    7.7k GitHub stars~18k tokensUpdated yesterday
    Auto-check: notes
  • A skill your agent uses when ZCode needs to inspect, plan, or execute restoration of old ACP-era ZCode sessions from ~/.zcode/v2/sessions into the new ZCode task/session stores.

    7.7k GitHub stars~1.2k tokensUpdated yesterday
    Auto-check passed
  • Generate, verify, or remove large synthetic ZCode task fixtures in local ~/.zcode persistence for UI/session performance testing.

    7.7k GitHub stars~698 tokensUpdated yesterday
    Auto-check passed
  • Check ZCode module and layer boundaries for code changes. An agent skill from zai-org/ZCode.

    7.7k GitHub stars~1.3k tokensUpdated yesterday
    Auto-check passed

Categories

Questions about Diagnosing Commands

What does Diagnosing Commands do?

A skill your agent uses to diagnose and fix ZCode custom slash-command (/command) configuration problems in the ZCode client. Diagnosing Commands is an agent skill from zai-org/ZCode. Use to diagnose and fix ZCode custom slash-command (/command) configuration problems in the ZCode client.

When should I use Diagnosing Commands?

Diagnosing Commands fits situations like: diagnose and fix ZCode custom slash-command (/command) configuration problems in the ZCode client; tasks that involve Internationalization; tasks that involve Hooks and plugins.

How do I install Diagnosing Commands in Claude Code?

Run `npx skills add zai-org/ZCode --skill diagnosing-commands -a claude-code`. Or copy the skill folder (apps/zcode-cli/packages/zcode-guide-plugin/skills/diagnosing-commands in zai-org/ZCode) into .claude/skills/diagnosing-commands in your project. Claude Code loads it when a task matches its description.

How do I install Diagnosing Commands in Codex?

Run `npx skills add zai-org/ZCode --skill diagnosing-commands -a codex`. Or copy the skill folder (apps/zcode-cli/packages/zcode-guide-plugin/skills/diagnosing-commands in zai-org/ZCode) into .agents/skills/diagnosing-commands in your project. Codex loads it when a task matches its description.

Can I use Diagnosing Commands in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add zai-org/ZCode --skill diagnosing-commands -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/diagnosing-commands, .gemini/skills/diagnosing-commands, .github/skills/diagnosing-commands and .opencode/skills/diagnosing-commands in your project.

What does Diagnosing Commands need to run?

SKILL.md names no scripts, command-line tools or credentials: Diagnosing Commands is instructions for the agent only.

Does Diagnosing Commands access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Diagnosing Commands safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Diagnosing Commands use?

Diagnosing Commands is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Diagnosing Commands use?

About 1.8k tokens (SKILL.md is roughly 7.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Diagnosing Commands?

Skills that share tags, products or a category with Diagnosing Commands: Wp Plugin Development (jorgerosal/wordpress-skills, 103 stars), Ckeditor5 Plugin Development (TriliumNext/Trilium, 38k stars), Wp Plugin Development (jorgerosal/wordpress-skills, 103 stars) and Fba (Zhongye1/KnowAgenticRAG, 135 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Diagnosing Commands?

zai-org (a GitHub organization) maintains it in zai-org/ZCode, which has 7,659 GitHub stars. The repository holds 5 skills in this directory. The repository was last updated on October 10, 2026.

Source: zai-org/ZCode on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.