Index of every page on this site: llms.txt
All skills
boshu2 avatar

/ergonomics

@596942d
by Boboshu2/agentops460 stars
44
Run it yourself

Audit CLI, API, MCP or SDK discovery, first use and error recovery. Use when: designing an agent-facing tool or investigating misuse, including one command.

Use this Skill: https://skilld.dev/gh/boshu2/agentops/ergonomics

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referenceserror-contract.md

≈1.1k tokens on demand. Your agent reads this file only when SKILL.md points to it.

Error contract

Use this when checking an observed failure, or a failure path a design introduces, against the nine items in Ergonomics. Judge meaning, not spelling: a field named differently that carries the same fact satisfies the item.

Which items apply

Failure class Example Items that apply
Rejected before any work unknown flag, missing argument, invalid value what, next step, code, no secrets, channel. Retry is implied: fix the input and run again.
Environment missing dependency, expired login, absent config all items except unknown-outcome; next step may be a precise request to a human.
Partial or uncertain mutation timeout after an upload began, one of five writes failed all items; side effects and how to check the outcome are mandatory.
Unexpected crash, unhandled exception all items, plus a pointer to the full trace (a file path, or a request id for a remote service).

In a proposed design, an item left unspecified on a failure path the design introduces is a fail. For a built tool, a failure class you never triggered or saw in supplied output is not observed; do not extrapolate from the paths you did see.

Channel by surface

  • CLI: the message on stderr and a non-zero exit code that differs by class when the caller would act differently. In machine mode, stdout holds one parseable error object with the same facts and nothing else.
  • HTTP API: an error status that matches the class (never 200 with an error body) and a structured body with the code and the offending parameter. A remote service returns a request id instead of internal traces.
  • MCP or agent tool: an error result the model can read, with the code, next step and offending input in its text or structured content. Never a success result whose text describes a failure.
  • SDK or library: a typed error carrying the code and fields as attributes, so a caller can branch without parsing the message.
  • Docs and help: the documented error lists the code and the fix; channel does not apply.

Health and diagnostic commands

A health command is itself a surface. Keep three outcomes apart: a check that could not run (tool not installed, binary failed to launch), a check that ran and failed, and a check deliberately skipped. Report the checked tool's own exit status, not the status of a pipe, filter or parser that read its output. A missing optional tool is an absence with an install hint, not a failure of the whole check. When any check could not run, say so instead of reporting the remainder as healthy.

Worked example

A command uploads a batch and the connection drops partway.

Weak, exit 0:

Error: request failed

The agent sees exit 0 and moves on, or sees the text and reruns the upload, creating duplicates. Findings: channel (failure reported as success), what (no batch named), why (no underlying cause), next step, retry safety (no word on side effects), unknown outcome (no way to check), code, context (no version or config).

Repaired, exit 75 (EX_TEMPFAIL: transient, but retry only after the status check), with the next step on the last line:

notes push: batch 41 (12 files) timed out after 30s while uploading to notes.example.net [PUSH_TIMEOUT]
  effects: unknown; some files may be stored, so a plain rerun may duplicate them
  context: notes 3.2.0, config ./notes.toml, env NOTES_ENDPOINT set
  docs: notes explain PUSH_TIMEOUT
  next: notes status --batch 41; if it shows "incomplete", notes push --batch 41 --resume (safe to repeat)

Machine mode prints the same facts on stdout:

{"ok": false, "code": "PUSH_TIMEOUT", "docs": "notes explain PUSH_TIMEOUT",
 "message": "batch 41 (12 files) timed out after 30s while uploading to notes.example.net",
 "input": {"batch": 41, "files": 12}, "effects": "unknown", "retry_safe": false,
 "check": "notes status --batch 41",
 "next": {"if": "status shows incomplete", "run": "notes push --batch 41 --resume", "repeat_safe": true},
 "context": {"version": "3.2.0", "config": "./notes.toml", "env": ["NOTES_ENDPOINT"]}}

The env var is named, not printed. The next step is a command the reader can run as written, and blind retry is ruled out until the outcome is checked.

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 warning10d3 checks · Risk SAFE
  • Gen Agent Trust Hub10d

    The ergonomics skill provides a structured framework for auditing command-line interfaces and APIs from an AI agent's perspective. It incorporates strong security practices, specifically requiring the use of isolated sandboxes for tool execution and warning agents not to follow untrusted instructions found in tool outputs.

  • Socket13d

    No alerts

  • Snyk10d

    Risk: MEDIUM · 1 issue

Signed by skilld at 596942d. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub last week.

Activeupdated 2 weeks ago
hexagonal_role
driven-adapter
consumes
[
  "repo-context",
  "interface-design"
]
produces
[
  "ergonomics-findings"
]
Other metadata
practices
[
  "ai-assisted-dev",
  "design-by-contract",
  "twelve-factor-app",
  "pragmatic-programmer"
]
context_rel
[
  {
    "kind": "supplier-to",
    "with": "implement"
  },
  {
    "kind": "partnership",
    "with": "doc"
  }
]
skill_api_version
1
user-invocable
true
metadata
{
  "graph_root": true,
  "tier": "product",
  "dependencies": [],
  "capabilities": [
    "audit_interface_ergonomics",
    "review_interface_design",
    "exercise_tool_surface",
    "check_error_contract"
  ],
  "effects": [
    "run_target_in_disposable_environment"
  ],
  "canonical_status": "canonical",
  "disposition": "keep_specialist"
}
output_contract
located findings with literal reproduction, agent consequence and smallest fix, plus exercised and not-exercised scope; no score or verdict

README badge

README badge for boshu2/agentops/ergonomics