Feature: Skills with typed parameter schemas (structured Bash alternative)
Problem
There's a gap between the two main ways Claude Code calls external tools:
| Mechanism | Typed input | Streaming | Long-running |
|-----------|:-:|:-:|:-:|
| Bash | No — string args | Yes (stderr) | 15 min |
| MCP tools | Yes — JSON schema | No | Broken (no per-tool timeout, progress notifications silently swallowed, streamable HTTP buggy) |
For long-running operations (5+ min) that spawn external processes — like CI pipelines, multi-model AI dispatch, test suites — there's no way to get both typed inputs and streaming output. MCP can't handle these today (competing proposals SEP-1391 and SEP-975 are still unmerged), and Bash has no schema enforcement.
Observation
Skills are 90% of the way to solving this. They already have:
- Definitions Claude reads before invoking (like MCP schemas)
- Descriptions for when to use them (model-invoked)
- Execution via any tool — Bash, MCP, Read, Write (streaming works)
- No timeout limit
The one missing piece: structured parameter schemas.
Proposal
Allow skills to define typed parameters in their SKILL.md frontmatter:
name: dispatch
description: Spawn work to external CLI model worker
parameters:
cli:
type: string
enum: [opencode, gemini, codex]
required: true
prompt:
type: string
required: true
timeout:
type: integer
default: 300
When Claude invokes this skill, parameters would be validated against the schema before execution — similar to how MCP tool calls validate input against JSON schemas. The skill body would access parameters as structured values (not just $ARGUMENTS string).
Why this matters
This creates a "typed Bash" primitive that fills the gap:
| Mechanism | Typed input | Streaming | Long-running |
|-----------|:-:|:-:|:-:|
| Bash | No | Yes | Yes |
| MCP tools | Yes | No | No (today) |
| Skills with schemas | Yes | Yes | Yes |
Use cases unlocked:
- Multi-model AI orchestration — dispatch work to external AI CLIs with validated routing config, stream progress back
- CI/CD integration — typed deploy commands with environment enum validation, streaming build logs
- Database operations — validated migration commands with streaming output
- Any long-running shell process that benefits from input validation before a potentially expensive execution
Current workarounds (and why they're insufficient)
- CLAUDE.md documentation — Claude usually gets args right from docs (~95%), but no enforcement. Mistakes on expensive operations are costly.
- MCP with background job pattern (start + poll) — works but wastes tokens on polling loops, loses real-time streaming, adds complexity.
- Two-step MCP validation → Bash execution — MCP validates input, returns Bash command, Claude runs it. Over-engineered for what a schema declaration should solve.
Implementation scope
This seems like a smaller change than fixing MCP streaming/long-running support:
- Add optional
parametersfield to SKILL.md frontmatter parsing - Validate parameters before skill execution
- Expose structured parameter values to skill body (replacing/augmenting
$ARGUMENTS) - Everything else (Bash streaming, tool access, model-invocation) already works
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗