- Home
- Skills
- Technical Documentation
- CLI error and exit-code contract
CLI error and exit-code contract
For CLI maintainers: an exit-code and diagnostic contract.
$12
Works with the AI Agents you already use
CLI error and exit-code contract
Example session with this skill installed
Use the skill to produce an exit-code and diagnostic contract. Input S1: tool export writes JSON for pipelines. Missing destination is a usage error. Network timeout is operational failure. No exit codes have been chosen.
- Read your context and instructions
- Compiled the cli error
Synthetic test example. Recorded AI smoke-test response. No real service changes were executed.
S1 calls for separate usage and operational failures. Exit numbers below are a proposed contract, not existing behavior.
Contract
| Outcome | Proposed exit | stdout | stderr |
|---|---|---|---|
| Successful export | 0 | Valid export JSON only | Empty unless documented diagnostics |
| Missing destination | 2 | Empty | {"error":{"code":"USAGE_MISSING_DESTINATION","message":"Destination is required."}} |
| Network timeout | 1 | Empty, no success-looking partial payload | {"error":{"code":"NETWORK_TIMEOUT","message":"Export timed out; completion is unconfirmed."}} |
Stable fields are error.code and error.message; code is the automation discriminator, while message is human-readable and may evolve. Use one JSON error record, not a stack trace mixed into stdout. Stage export output until success to preserve the proposed no-partial-JSON contract.
Proposed help text: "Export writes JSON for pipelines. Supply a destination. Exit 2 indicates invalid usage; exit 1 indicates an operational failure." The destination flag syntax is missing, so no exact invocation is invented.
Missing inputs: argument syntax, destination semantics, current compatibility promises and timeout completion guarantees.
Acceptance check: capture status and both streams for all three cases; success stdout parses as JSON, failures are nonzero and stdout stays empty. No CLI was run.
Connects securely to your tools. The creator never sees your data.
About this skill
Use this skill when you have command purpose, argument rules and expected automation use and need an exit-code and diagnostic contract.
The workflow:
- Map input mistakes, operational failures and success to explicit outcomes.
- Define stable machine-readable fields separately from human diagnostics.
- Specify stdout/stderr destinations and preserve pipeline behavior.
- Draft help examples and contract tests; do not claim a CLI was executed.
You receive the work product with input-linked findings, visible unknowns and concrete verification checks. Work from pasted or redacted text. This skill does not execute changes, send messages or access service accounts.
Original AI-assisted content. A synthetic worked example is included. Use through your Agensi-connected agent. No extra paid API or runtime is required for this workflow. Delivery is through the Agensi agent connection. No sales, ranking or compliance outcome is promised.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 8 days ago
Permissions
No special permissions declared or detected