provider-claude
Skill16 starsChanged 2 months agoMITView on GitHub
Track and maintain the upstream Claude Code CLI contract. Use when Anthropic ships a Claude Code release, when a `claude` flag/output/permission/subcommand behaviour changes, or when an upstream scan flags drift. Process guidance only; `src/upstream-contracts.ts` is the mechanical source of truth.
In this repository19 other files it gives its agents.
- site/agents.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- site/llms.txtllms.txt
- async-job-orchestrationSkill
- implement-review-fixSkill
- least-cost-routingSkill
- multi-llm-reviewSkill
- personal-agent-config-kitSkill
- provider-codexSkill
- provider-cursorSkill
- provider-devinSkill
- provider-geminiSkill
- provider-grokSkill
- provider-mistralSkill
- public-demo-sessionSkill
- retrospective-walkSkill
- secure-orchestrationSkill
- session-workflowSkill
- supply-chain-guardSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 0 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 47
Use claude_request for normal turns and claude_request_async for long-running review, implementation, or analysis.
- Very specific: line 57
Use mcpServers only for gateway-known MCP servers.
- Very specific: line 64
Prefer approvalStrategy:"mcp_managed" over raw dangerouslySkipPermissions.
- Very specific: line 77
Use createNewSession, sessionId, or continueSession for real Claude continuity.
- Very specific: line 101
Follow multi-llm-review's full-access protocol, inspect the current request schema and live capability response, and use a fresh …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Provider: Claude Code CLI
Process guidance for keeping the gateway's Claude (claude) integration aligned
with the upstream CLI. This skill does not define argv/env behaviour; the
single mechanical source of truth is UPSTREAM_CLI_CONTRACTS.claude in
src/upstream-contracts.ts, enforced by validateUpstreamCliArgs /
validateUpstreamCliEnv. Never re-encode flags, output modes, permission modes,
or session rules here or in TOML.
Identity
| Field | Value |
| CliType | claude |
| Executable | claude |
| Package | @anthropic-ai/claude-code (npm) |
| Changelog | https://code.claude.com/docs/en/changelog.md |
| Install docs | https://code.claude.com/docs/en/overview |
| Watch categories | flags, output-formats, permission-modes, session-resume, models |
These values mirror UPSTREAM_CLI_CONTRACTS.claude.upstreamMetadata and
docs/upstream/provider-sources.dag.toml ([providers.claude]). The TypeScript
metadata is authoritative; the TOML is scanner input only.
When to use
- An Anthropic Claude Code release lands and you need to check for contract drift.
- A
clauderequest fails the upstream contract check before spawn. npm run upstream:scan -- --livereports a change on the Claude changelog.
How LLM agents should use Claude through the gateway
- Discover the live gateway/provider surface before relying on provider-specific
controls:
For a cached read-only resource, useprovider_tool_capabilities({cli:"claude"})provider-tools://claude. - Use
claude_requestfor normal turns andclaude_request_asyncfor long-running review, implementation, or analysis. Sync calls may auto-defer; pollllm_job_statusand fetch withllm_job_resultwhen that happens. - Omit
modelunless the caller explicitly asked for a specific variant; the gateway resolves the configured Claude default. - For review or code-reading tasks, keep tool access available. Claude supports
allowedTools,disallowedTools, andtools, but do not pass an empty allowlist for reviews. Undermcp_managed, non-emptyallowedToolsortoolsis a high-risk managed input that requires approval plusLLM_GATEWAY_APPROVAL_ALLOW_BYPASS=1, but remains bounded. - Use
mcpServersonly for gateway-known MCP servers. Under legacy approval,strictMcpConfigdefaults tofalse; set it totruewhen missing MCP access should fail fast. Undermcp_managed, the gateway forcesstrictMcpConfig:true, so Claude uses only the generated configuration and only provisioned gateway-owned local definitions are eligible. Dynamicnpx, ambient-PATH, and Codex-config overrides remain legacy-only; a caller-suppliedfalsecannot weaken that boundary. - Prefer
approvalStrategy:"mcp_managed"over rawdangerouslySkipPermissions. Under managed approval, a directdangerouslySkipPermissionsorpermissionMode:"bypassPermissions"request is honored only with an explicit caller request, approval-manager approval, andLLM_GATEWAY_APPROVAL_ALLOW_BYPASS=1. Settings or setting sources, agents, native forks, plugins, added directories, non-emptysystemPrompt/appendSystemPrompt, prompt-file controls (systemPromptFile/appendSystemPromptFile),safeMode:true,bare:true, anddebugFileare high-risk managed inputs: they require approval and the operator setting, but remain bounded and do not select full permission on their own. A gateway-created worktree is also a high-risk managed input under the same conditions. - Use
createNewSession,sessionId, orcontinueSessionfor real Claude continuity. Undermcp_managed, native continuation is also a high-risk input that requires approval plus the operator setting but remains bounded. Claude also supports structured output viaoutputFormatandjsonSchema. - Select local repository work with
workingDir, a verified registeredworkspace, or gatewayworktree. An unscoped CLI child uses a fresh neutral temporary cwd, not the gateway repository. A cwd-scoped continuation needs a stable selected target. - Claude's ordinary print path, including
promptPartswithout effective cache control, carries the prompt in argv. Oversized UTF-8 input on that path fails before spawn as non-retryableinput_too_large; the gateway does not truncate instructions. Effective cache-control requests requireoutputFormat:"stream-json"and carry the assembled content blocks through stream-json stdin instead. All other caller-controlled argv values are admitted in their final encoded form before spawn. Embedded NUL bytes return non-retryableinvalid_inputwithout exposing the rejected value. The stdin branch completes only after the full payload write callback succeeds; a clean child exit with closed or pending delivery is a fixed non-sensitive failure.
Full-access review handoff
For a user-authorized exhaustive review that needs full provider permissions and
native MCP access, do not infer the launch controls from this maintenance guide.
Follow multi-llm-review's full-access protocol, inspect the current request
schema and live capability response, and use a fresh target-checkout
node dist/index.js --transport=stdio gateway rather than a global process.
Reapply the grant on every new job, preserve native MCP configuration without a
pretend gateway allowlist, send the corrective-program report and exact
diff/file identity, set no caller caps, and honor a user-required 90-second
progress cadence. The reviewer must independently inspect code, docs, tests,
and commands before it can approve.
Scan for upstream change
# Offline summary (no network):
npm run upstream:scan -- --provider claude
# Advisory live check against the changelog (network; manual only):
npm run upstream:scan -- --live --provider claude --fail-on-critical
# Persist a content-hash snapshot + dated report:
npm run upstream:scan -- --live --provider claude --write-snapshot --write-reportA failed fetch is advisory (exit 0) unless --fail-on-critical is passed; it
never breaks the default release gate.
Update procedure when the upstream CLI changes
- Edit the contract in
src/upstream-contracts.ts(UPSTREAM_CLI_CONTRACTS.claude): add/adjust the flag, arity, enumvalues, orpermission/resumerule. This is the only place mechanical behaviour lives. - Add a conformance fixture under
conformanceFixturesproving the new accept/reject behaviour (mirror the existingclaude-*fixtures). - If a source URL or watch category changed, update
upstreamMetadatain the contract, then mirror it intodocs/upstream/provider-sources.dag.toml. - Verify:
npm run build && npm run upstream:contracts(offline fixtures + report + TOML-sync) andnpm test.
Claude-specific notes (see the contract for exact rules)
- Tested against claude 2.1.259. Claude Code is CLI-first with no native ACP entrypoint at this version;
provider-acp://claudereportsnative:false(no methods, no adapter-as-native masquerade) andclaude_requestexposes notransport:"acp"selector. -phasoptionalarity: standalone in slice κ stdin mode, legacy-p <prompt>otherwise.stream-jsonoutput requires--verbosealongside--print; the gateway emits them together.--input-format stream-jsoncarries callercache_controlbreakpoints.- Permission modes and reasoning-effort levels are closed enums. At this target,
manualis an upstream permission mode; gatewaydefaultremains a pseudo-mode that emits no upstream permission flag. Extend the enum in the contract, not here. - Root
gatewaystarts enterprise authentication and telemetry gateway mode. Keep it catalogued as an unexposed server-starting command. agents --all(with--json) includes completed background sessions (2.1.185+). Example:claude agents --json --all- Continuity is real via
--continue/--session-id.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

