All skills
mblode avatar

/dx-audit

@b690e67
by Matthew Blodemblode/agent-skills134 stars
12

Audits libraries, CLIs, and SDKs using 38 rules for public contracts, package exports, piped output, errors, and configuration. Use when asked to "audit my CLI", "review my SDK", or diagnose package type resolution. For public site or docs agent scores use agent-ready; for agentic product trust use ax-audit; for docs prose use ghostwriter.

Use this Skill: https://skilld.dev/gh/mblode/agent-skills/dx-audit

This session only. Nothing lands on disk.

rulescli-structured-io.md

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

Accept and Emit Structured JSON, Errors Included

An agent drives a CLI by piping a JSON payload in and parsing JSON out, so accept a --json or stdin payload instead of forcing an interactive prompt, and in structured mode emit either the result or a { error, code, message, details } envelope on stdout with the human hint on stderr and a non-zero exit. This complements cli-pipes-tty-and-json (which owns the output and TTY side), reuses the code from err-stable-error-codes, and puts the remedy from err-suggest-the-fix on stderr.

Incorrect (input only from a prompt, prose error mixed into stdout, exit 0):

const title = await text({ message: "Issue title?" }); // hangs under a pipe
try {
  const issue = await createIssue({ title });
  console.log(`Created ${issue.id}`);
} catch {
  console.log("Oops, something went wrong"); // prose on stdout, no code, still exits 0
}

Correct (structured payload in, JSON envelope out, hint to stderr, non-zero exit):

const payload = flags.json ? JSON.parse(flags.json) : JSON.parse(await readStdin());
try {
  const issue = await createIssue(payload);
  process.stdout.write(JSON.stringify(issue)); // clean, parseable result
} catch (err) {
  process.stdout.write(
    JSON.stringify({ error: true, code: "CREATE_FAILED", message: String(err), details: {} }),
  );
  console.error("Hint: run `mytool schema issues.create` to check the payload."); // stderr
  process.exitCode = 1;
}

Source: SKILL.md on GitHub

No alerts9d3 checks · Risk SAFE
  • Gen Agent Trust Hub9d

    The dx-audit skill is a developer experience auditing tool designed to review public APIs, CLIs, and SDKs. It demonstrates a strong security posture by including explicit instructions to validate inputs against path traversal and shell injection, and by warning the agent to inspect potentially malicious lifecycle scripts in audited repositories before running packaging probes. All external tools mentioned are industry-standard utilities.

  • Socket9d

    No alerts

  • Snyk9d

    Risk: LOW · No issues

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

Last checked against GitHub 2 days ago.

Activeupdated last week

README badge

README badge for mblode/agent-skills/dx-audit