skills/dx-audit/SKILL.md
Audits the smallest relevant developer-facing surface of a library, CLI, SDK, or npm package across API contracts, errors, CLI behavior, public types, onboarding, and config. Uses candidate-first rule loading, bounded local evidence, and compact root-cause findings. Use when asked to "audit my CLI", "make this CLI agent-friendly", "is this API ergonomic", "review the developer experience", "improve these errors", "simplify first run", or "review my SDK". For end-user UI use ui-audit, for agentic-app trust use ax-audit, for docs prose use docs-writing, for README work use readme-creator, and for repo architecture use define-architecture. Inside a product that also ships a UI, this is the skill for the developer-facing half, so pick it when the complaint is about an import, command, error string, exported type, or config rather than a screen.
npx skillsauth add mblode/agent-skills dx-auditInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Audit or improve what developers import, run, configure, or read when something fails.
ui-audit), agent trust review
(ax-audit), prose rewrite (docs-writing), README rewrite (readme-creator), or repository
architecture review (define-architecture).Choose the narrowest mode supported by the request:
Before exploration, write a one-line scope receipt:
Scope: <mode>; surfaces: <commands/exports/config>; prefixes: <err-, cli->; excludes: <UI/docs/architecture/private internals>
If several skills are invoked, keep only the developer-facing surfaces above. Let sibling skills own their areas without duplicating their search or findings. "DX", "gold standard", and "review holistically" do not by themselves authorize a multi-repo or whole-package sweep.
DX audit progress:
- [ ] 1. Lock intent, public surfaces, and exclusions
- [ ] 2. Trace the minimum local evidence path
- [ ] 3. Select prefixes and candidate rule files
- [ ] 4. Confirm and rank material findings
- [ ] 5. Report, or fix only when requested
- [ ] 6. Re-run the same checks and record evidence
Default to git diff against the repository's normal base, then keep only changed files reachable
through a public entry point. With no useful diff, use the command, export, package, error, or config
named by the user.
Public reachability comes from evidence such as package.json exports/bin, a command registry,
an exported type, a documented config loader, or an observed error path. Do not audit a private
helper unless a public caller exposes its behavior.
Take these rungs in order:
--help, --version, one success path, and
one invalid-input path. Do not trigger a real mutation merely to test DX.Stop when the behavior is proven, disproven, private, or outside scope. Do not browse general best practice articles, inventory unrelated apps, build static repo maps, or spawn overlapping scouts. External research is for an explicit comparison request or a named uncertainty local evidence cannot resolve. In an explicit exhaustive audit, parallel work may partition disjoint public surfaces; it must not run several generic whole-repo reviews.
Read rules/_sections.md, then select only prefixes applicable to the locked surface:
| Priority | Prefix | Category | Default impact | Rules |
|----------|--------|----------|----------------|-------|
| 1 | api- | Public API and SDK | CRITICAL | 7 |
| 2 | err- | Developer-facing errors | CRITICAL | 5 |
| 3 | cli- | CLI UX | HIGH | 13 |
| 4 | types- | Exported type ergonomics | HIGH | 5 |
| 5 | onboard- | Install and first run | HIGH | 4 |
| 6 | config- | Config ergonomics | MEDIUM | 3 |
Map surfaces to prefixes: a public API entry point uses api-, types-, and reached err-
paths; a CLI uses cli- and reached err- paths; exported declarations use types-, plus
api- only when behavior changes; install and first run use onboard-; config loaders use
config- and reached err- paths.
Applicability outranks global priority. A CLI-only audit runs applicable err- rules before
cli-; it does not load api- merely because API rules have higher impact.
For a targeted audit:
For an explicit exhaustive audit, read every rule in the selected prefixes. Read
references/dx-principles.md only when the user asks for rationale or a borderline finding needs a
tie-breaker. Read rules/_template.md only when adding or editing a rule.
Capability-gate candidate rules even inside a selected prefix:
stdin applies when the command semantically accepts file or stream data.Audit-only requests are read-only. A request to improve or fix authorizes localized changes inside the scope receipt, not a redesign of adjacent docs, UI, or architecture.
Use this compact output:
## DX Audit
Scope: `tool status` CLI; `err-`, `cli-`; 4 files inspected.
### Findings
- [HIGH] `cli-idempotent-resume` at `src/start.ts:42`: retrying the same target creates a second job.
Fix: return the existing job id and state unless the caller passes `--fresh`.
### Deferred
- 2 lower-impact config candidates were outside the locked CLI scope.
Only list files with findings. If none are material, return one pass line naming the surfaces and
rule files checked. Do not emit a ✓ pass entry for every clean file or repeat a DX principle under
every finding. In exhaustive mode, include every material finding; list clean files only when the
user requests compliance-style evidence.
For fix mode, replace Deferred with Changed and Verification, including the exact commands or
runtime probes that passed.
Before sending the report, check:
Report preflight:
- every cited rule file was opened
- every [IMPACT] exactly matches that file's frontmatter
- the inspected-file count matches the unique files named
- no out-of-scope or per-clean-file filler entered the report
Re-open every touched or cited location, rerun the same safe probes and focused project checks, and reapply the same candidate rules. A clean build alone does not prove CLI behavior; a runtime probe alone does not prove exported types. Verification evidence must match the finding.
| File | Read when |
|------|-----------|
| rules/_sections.md | Every audit, for prefix applicability and priority |
| rules/<prefix>-*.md | A targeted candidate exists, or the user requests exhaustive coverage |
| references/dx-principles.md | Rationale is requested or a finding is borderline |
| references/evaluation-scenarios.md | Evaluating or changing this skill's workflow |
| rules/_template.md | Adding or editing a rule |
npx <pkg> and an existing global install
both resolve the registry copy, so --help, exit codes, and error strings describe a release the
working tree has not changed. Build, then invoke the local entry point (node ./dist/cli.js).ui-audit: rendered end-user frontend quality and accessibilityax-audit: agentic application architecture and trustdocs-writing: documentation prose and information qualityreadme-creator: README structure and first-reader narrativeagents-md: AGENTS.md and CLAUDE.md instruction filesdefine-architecture: repository and module structuredevelopment
Fans out four concurrent review agents over the current diff, then APPLIES fixes directly to the working tree and verifies the build. Mutates code; it does not produce a report. Covers reuse (duplicate logic, hand-rolled stdlib, reinvented platform features), quality (hacky patterns, React/TypeScript hygiene, over-memoisation, exhaustive-deps, `any`, dead code, `CLAUDE.md`/`AGENTS.md` violations), efficiency (unnecessary work, missed concurrency, hot-path bloat), and test discipline (bug fixes without a repro test, useless tests to delete, missing tests only when they prevent a named failure). Use when the user says "tidy this up", "simplify", "clean up this diff", "polish my changes", "check for duplication", or "any reuse opportunities?", i.e. when the intent is to have the changes made automatically. For a read-only report that lists findings without touching files, use `pr-reviewer` instead. This skill edits code; for the PR's title, description, or commit history, use `pr-creator`.
development
Decides what an interface should do before UI is built or audited: interaction choice, action scope and consequence, reachable states, resilience, and accessibility as task completion. Works from a brief, spec, mockup, intent, or existing UI. Use when asked "is this the right interaction", "design the flow", "what control should this use", "what should this action affect", "which states should this have", "make this resilient", or "what breaks here". For building or styling use ui-design; for built-code audits use ui-audit; for copy wording use copywriting.
development
Builds and stress-tests implementation plans in two modes. Create mode scans code and docs, asks one question at a time with a recommended answer, runs a blindspot pass when the user is new to the area, then writes a plan file. Review mode scores completeness, feasibility, scope, testability, risk, and assumptions, verifies checkable claims, and writes resolutions back until every dimension reaches 5/5. Use when asked to "create a plan", "plan this feature", "I want to build X", "grill me", "think this through", "blindspot pass", "unknown unknowns", "this is new to me", "review my plan", "rubber duck this", "stress test this plan", "is this plan ready", "get this plan to 5/5", "what am I missing", "verify this claim", "prove this plan", "fact-check this plan", or when the user explicitly wants a plan artifact before implementation. For code review use pr-reviewer; for architecture briefs use define-architecture.
tools
Reviews the local diff or branch and returns a read-only, severity-tiered findings report. Modes cover standard bugs, structural quality, AI slop, and security audit. Use when asked to run /pr-reviewer, "review my changes", "code review", "thermo-nuclear review", "structural review", "deslop this", "clean up AI code", "security audit", "find vulnerabilities", or before commit, push, or handoff. For fixes use tidy; for PR creation use pr-creator; for CI or review comments use pr-babysitter; for frontend UX, accessibility, layout, state coverage, or rendered quality use ui-audit; for library, CLI, or SDK developer experience use dx-audit; for folder structure and module boundaries outside a diff use define-architecture; for plans use planning.