All skills
mblode avatar

/dx-audit

@b690e67
by Matthew Blodemblode/agent-skills136 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-agent-input-hardening.md

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

Harden Inputs Against Hallucinated and Hostile Values

An agent will confidently pass a plausible but wrong value, and the CLI is the last checkpoint before that value reaches a filesystem, URL, shell, or API. Validate according to the actual sink: contain filesystem paths, reject control characters where the target format forbids them, percent-encode URL path segments, and pass shell arguments as discrete values rather than concatenated command strings. This extends err-fail-fast-validation from shape checks to concrete trust-boundary sinks.

Incorrect (agent input flows straight into a path and a URL):

const id = argv.id; // "../../.ssh/id_rsa", or "42?admin=true"
const data = readFileSync(join(baseDir, id)); // escapes baseDir via ../
const res = await fetch(`https://api.example.com/items/${id}`); // splices raw input

Correct (validate, contain, and encode before use):

if (!/^[a-z0-9-]+$/.test(id)) {
  throw new TypeError(`invalid id ${JSON.stringify(id)}: expected [a-z0-9-]`);
}
const full = resolve(baseDir, id);
if (!full.startsWith(resolve(baseDir) + sep)) {
  throw new Error(`path ${JSON.stringify(id)} escapes ${baseDir}`);
}
const res = await fetch(`https://api.example.com/items/${encodeURIComponent(id)}`);

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 4 hours ago.

Activeupdated last week

README badge

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