Best for
- Design slash-command architecture for a coding-agent CLI or REPL
- Add commands from built-ins, skills, plugins, workflows, or MCP-backed sources
- Define command kinds such as prompt, local text, and local JSX or TUI commands
vasilyu1983/AI-Agents-public/frameworks/shared-skills/skills/ai-coding-agents-command-runtime/SKILL.md
Designs slash-command runtimes for coding-agent CLIs. Use when modeling command registries, lazy loading, aliases, forked commands, or remote-safe dispatch.
Decision brief
Use this skill to design or review the slash-command layer of a coding-agent CLI: command registry shape, typed command kinds, lazy loading, source-aware discovery, and safe dispatch across local, remote, and bridge modes.
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Declared | Source record | Install path and trigger |
| Claude Code | Declared | Source record | Install path and trigger |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/vasilyu1983/AI-Agents-public --skill "frameworks/shared-skills/skills/ai-coding-agents-command-runtime"Inspect the Agent Skill "ai-coding-agents-command-runtime" from https://github.com/vasilyu1983/AI-Agents-public/blob/53f6cb73ea53a2646e3e7d4665062ad66f3683ac/frameworks/shared-skills/skills/ai-coding-agents-command-runtime/SKILL.md at commit 53f6cb73ea53a2646e3e7d4665062ad66f3683ac. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
1. Classify command surfaces. Separate prompt-expansion commands from local text commands and local JSX or TUI commands. 2. Define the registry contract. Keep one typed command interface with stable fields for names, aliases, source, availability, and enablement. 3. Model load o…
Review the “ASCII Flow” section in the pinned source before continuing.
Review the “Quick Reference” section in the pinned source before continuing.
Design slash-command architecture for a coding-agent CLI or REPL
Review the “Use Other Skills” section in the pinned source before continuing.
Permission review
The documentation asks the agent to run terminal commands or scripts.
**Bridge-safe filtering is a trust-boundary control, not a UX nicety.** A remote or mobile client that can invoke a `local-jsx` command is, in effect, being handed a slice of local code execution surface — Ink rendering, filesystem side effEvidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 94/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 80 | Source | Repository attention, not individual Skill quality |
| Compatibility | 2 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Use this skill to design or review the slash-command layer of a coding-agent CLI: command registry shape, typed command kinds, lazy loading, source-aware discovery, and safe dispatch across local, remote, and bridge modes.
This skill owns command-runtime architecture for coding agents. For broader agent creation, start with ../ai-coding-agents/SKILL.md.
command sources
built-ins + skills + plugins + workflows + dynamic discoveries
|
v
registry composition
typed command contract + source tags + deterministic precedence
plugin-namespaced skills: plugin-name:skill-name
|
v
availability + enablement
feature gates + auth + mode filters + aliases
/agents as first-class tabbed command surface (background agent management)
|
v
dispatch
prompt command | local text | local UI | forked subagent | remote-safe
/reload-skills (in-session reload) | SessionStart reloadSkills hook
--safe-mode (disables CLAUDE.md, plugins, skills, hooks, MCP)
|
v
execution result or unavailable-command error
| Question | Read | Outcome |
|---|---|---|
| How should commands be represented and discovered? | references/command-registry-and-discovery.md | Registry model, command kinds, load order, source precedence |
| How should commands execute across inline, forked, and remote flows? | references/command-dispatch-forking-and-remote-safety.md | Dispatch rules, forked execution, remote-safe filtering, bridge gating |
| How does OpenAI Codex model slash-command availability? | references/openai-codex-command-state-machine.md | Command metadata, inline-arg support, active-task availability, side-conversation availability |
| Need | Use Instead |
|---|---|
| Broader coding-agent architecture | ../ai-coding-agents/SKILL.md |
| Plugin package and extension architecture | ../ai-coding-agents-plugins/SKILL.md |
| Tool registry and tool execution semantics | ../ai-coding-agents-tools/SKILL.md |
| Session lifecycle and resume | ../ai-coding-agents-sessions/SKILL.md |
| Terminal REPL interaction design | ../ai-coding-agents-terminal-ui/SKILL.md |
| Generic CLI design outside agent runtimes | ../software-devtools/SKILL.md |
/reload-skills (shipped Claude Code v2.1.152, May 2026) is a first-class in-session reload command that re-discovers and re-registers all skills from their source directories without restarting the runtime, preserving transcript, loaded files, and task list — a reload, not a restart. The equivalent programmatic path is a SessionStart hook whose return value sets reloadSkills: true; this exists specifically so a hook that fetches, generates, or installs skills before the first turn can make them available in the same session instead of only on the next launch. Both paths belong in the same "invalidation and reload" command kind alongside /reload-plugins.
--safe-mode (and the equivalent CLAUDE_CODE_SAFE_MODE env var, shipped v2.1.169) is a degraded-mode startup flag that disables CLAUDE.md loading, plugins, skills, hooks, and MCP servers — the same five customization layers, together, every time. It is the canonical remote-safe / hardened-bootstrap entry point for CI, sandboxed pipelines, or diagnostic "is it my config or the product" triage where third-party extension code must not run. It does not disable auth, the configured model or base URL, conversation history, or the project trust dialog — those are separate availability axes, not folded into this flag. Commands that depend on skills or plugins should be filtered out of the model-visible command set when --safe-mode is active; this is an availability class (feature-gated by mode flag) distinct from auth-gated or environment-gated.
Skills shipped inside plugins are namespaced by plugin name for slash-command purposes: plugin-name:skill-name (mirroring the existing commands/ namespacing), while legacy un-namespaced invocation is kept for backward compatibility. This is a distinct naming tier in the precedence model, and the namespace separator is :, not / — do not parse it as a path. Treat the exact cross-tier resolution order (built-in vs. project-local vs. plugin-namespaced) as implementation-specific: verify it against the current source or docs for your target runtime before hard-coding a precedence assumption, since this is the kind of internal ordering detail that changes without a changelog entry.
claude agents) as a full-screen dashboard surfaceclaude agents opens Agent View, a full-screen dashboard for every background session on the machine — it is a CLI subcommand, not a /agents in-session slash command; do not register /agents in a slash-command table. Sessions are grouped by urgency, not by a flat state enum: Pinned, Ready for review (open PR), Needs input, Working, and Completed (finished, failed, and stopped sessions collapsed together). /bg backgrounds an active session into this view; claude --bg launches directly into the background from the shell.
Design lesson for your own registry even though /agents is not a literal command: a background-agent manager is a distinct command-surface kind — full-screen, non-modal, state-grouped by actionability rather than by lifecycle stage — and it composes with, but is architecturally separate from, the /plugin, /model, /permissions style single-purpose tabbed commands. If you enumerate command-surface kinds in a registry, add "dashboard surface" as its own kind rather than forcing it into the local-jsx command contract used for simple TUI commands; a dashboard has its own refresh, selection, and cross-session dispatch semantics that a modal command does not.
Goose introduces a different kind of command: recipes, YAML-serialized parameterized workflows with their own extension manifest. This is a distinct point in the design space from Claude Code's frontmatter-plus-prompt slash commands.
A Goose recipe carries version / title / description / instructions / author / extensions / activities / prompt / parameters where each parameter declares {key, input_type, requirement, description, default}. The "command" is a versioned artifact that travels between machines with its dependencies stated.
artifact_ref variant — the command is a reference to a recipe-style artifact. Discovery reads the artifact; validation happens at registration, not execution.A Goose recipe lists its required extensions. The command cannot run if they are absent — this is an install/activation check, not a runtime tool-call failure.
require_tool("github.pr_create") inside their body and discover unavailability only mid-execution.requires_extensions: Vec<ExtensionRef> to the command type. Unavailable-dependency state is a first-class command availability class (beside auth-gated and feature-gated).These are the calls a non-expert gets wrong even after reading the patterns above, because the patterns describe what to build, not when the trade-off actually bites.
local-jsx command is, in effect, being handed a slice of local code execution surface — Ink rendering, filesystem side effects, terminal-only state mutation — from a network hop away. Model the remote-safe/bridge-safe allowlist as a security boundary with the same rigor as a permission gate, not as "which commands happen to render okay on a small screen." If a command's safety depends on "the bridge client will just not send that," you have not actually gated it.isEnabled() staleness is worse than a missing command. A command that silently disappears because a feature flag flipped is confusing but recoverable — the user tries again later. A command that appears available, is dispatched, and then fails mid-execution because isEnabled() was stale at menu-render time but re-checked at dispatch time is a worse experience. If you cannot guarantee the enablement check is consistent between "shown in the menu" and "actually dispatched," fail closed at dispatch and surface why, rather than trusting the menu-time snapshot.references/command-registry-and-discovery.md — Typed command contracts, source composition, and discovery orderreferences/command-dispatch-forking-and-remote-safety.md — Dispatch rules, forked command execution, and remote or bridge safetyreferences/openai-codex-command-state-machine.md — OpenAI Codex slash-command metadata, ordering, aliases, and state-dependent availabilitydata/sources.json — Primary documentation and implementation references for command-runtime guidance../ai-coding-agents/SKILL.md — Broader coding-agent architecture../ai-coding-agents-plugins/SKILL.md — Plugin-provided commands and reload semantics../ai-coding-agents-tools/SKILL.md — Tool registry and execution path designclaude_code source snapshot; that architecture (typed command contract, source composition order, availability vs. enablement) is stable in intent but re-check upstream code or docs before relying on exact internal ordering./reload-skills, --safe-mode, /fork, and Agent View (claude agents) claims in this file were re-verified against current Claude Code product docs and changelog entries as of 2026-07-11 (see data/sources.json → verified_2026_07_11). Re-verify version gates before citing them, since Claude Code ships weekly and these flags/commands are young enough to still be moving.Before applying this skill on a non-trivial task, read learnings.consolidated.md in this directory (and learnings.md if present).
After applying it, if you encountered a pattern worth remembering, a mistake worth preventing, or a domain fact that surprised you, append one dated bullet to learnings.md via agents-skills-feedback-loop/scripts/append_learning.py. Do not modify SKILL.md itself.
Frequently asked questions
Use this skill to design or review the slash-command layer of a coding-agent CLI: command registry shape, typed command kinds, lazy loading, source-aware discovery, and safe dispatch across local, remote, and bridge modes.
The source record exposes this install command: npx skills add https://github.com/vasilyu1983/AI-Agents-public --skill "frameworks/shared-skills/skills/ai-coding-agents-command-runtime". Inspect the command and pinned source before running it.
The pinned source record declares support for: codex, claude code.
Static rules flagged exec-script in the source; the page lists the matching lines and excerpts.
Alternatives
vasilyu1983/AI-Agents-public
Configures Claude Code hooks and Codex hooks.json/notify callbacks. Use when adding guardrails, preflight, audit trails, worktree automation, or budget enforcement.
vasilyu1983/AI-Agents-public
Guides iOS testing with XCTest, XCUITest, Swift Testing, simctl, and xcresult. Use when choosing destinations, controlling flakes, or parsing test artifacts for native apps.
vasilyu1983/AI-Agents-public
Guides multi-GPU pre-training: DDP, FSDP2, ZeRO, tensor/pipeline/expert parallelism, fp8/Muon. Use when scaling a run, training MoE, or reproducing GPT-2 on rented GPUs.
vasilyu1983/AI-Agents-public
Scans public GitHub repos for agent skills, dev practices, and code patterns. Use when enriching skills, setting team policy, or researching a build domain.