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.

rulesapi-async-consistency.md

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

Keep Async Contracts Consistent; Always Return a Promise

A function that is sometimes sync and sometimes returns a Promise, or throws synchronously on bad input but rejects everywhere else, forces callers to handle two control-flow paths for one operation. Pick one style: an async operation always returns a Promise and routes every failure through rejection. Do not also ship a callback overload of the same function.

Incorrect (sync-or-async return, split sync-throw and async-reject paths):

function load(id: string) {
  if (!id) throw new Error("id required");   // sync throw
  if (cache.has(id)) return cache.get(id)!;  // sync return
  return fetch(`/x/${id}`).then((r) => r.json()); // async return
}
// caller must both try/catch AND await, depending on input

Correct (always a Promise; every failure rejects):

async function load(id: string): Promise<Item> {
  if (!id) throw new Error("id required"); // becomes a rejection
  if (cache.has(id)) return cache.get(id)!;
  const r = await fetch(`/x/${id}`);
  return r.json();
}

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