Skip to content
Back to skills

Framework Audit

ASecurity

Audit a repository against the principles of the leyman framework, for the judgment calls a script can't make (package design, READMEs, comments, tests and versions), after `leyman-framework audit` has run

  • 9 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 9, 2026
ai-agentsnodegitapi

Works with

  • api

Security analysis

A100/100

Scanned November 9, 2026

npx -y skills add JacobLey/leyman --skill framework-audit --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Framework Audit?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Framework Audit
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/jacobley-framework-audit/badge)](https://www.skillsdirectory.com/skills/jacobley-framework-audit)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: framework-audit
description: Audit a repository against the principles of the leyman framework, for the judgment calls a script can't make (package design, READMEs, comments, tests and versions), after `leyman-framework audit` has run
---

# Framework audit

A brief for a coding agent, run in the repository being audited. Start fresh: everything you need is linked here.

## First

1. Run `pnpm dlx @leyman/framework audit` from the repository root. It decides what a script can, and reports the [tier](https://jacobley.github.io/leyman/framework/adoption) the repository meets. Don't repeat its checks: list its failures in your report as they are.
2. Read the [principles](https://jacobley.github.io/leyman/framework/principles). They are the bar for every finding below, and each finding names the one it misses.

Audit the packages the prompt names, or else every package that isn't `private`. Report; don't change code unless the prompt asks you to.

## What to check

### Package design

A package is simple, deterministic, predictable and, most of all, useful.

- **Useful:** each export earns its place for a caller. A feature that confuses more than it helps is a finding, and so is a natural extension that belongs in a package of its own.
- **Deterministic:** the same input gives the same output. Look for unstable ordering (object keys, `Set`s, file listings), unseeded randomness, and output that depends on the time, the locale or the machine.
- **Predictable:** no hidden state, silent fallbacks or surprising defaults. An error says what went wrong and what to do instead.
- **Dependencies:** each runtime dependency of a published package is justified, with nothing lighter that does the job.
- **Support floor:** `engines.node` is the oldest Node.js the package can support without losing functionality, and no lower than any runtime dependency's.

### README

Install the package from its tarball (`pnpm pack`) in a scratch project and do one realistic task with only its README and type declarations. Every place you had to guess is a finding.

- The first paragraph is the `package.json` `description`.
- Install, with every peer dependency and whether it is optional.
- The example compiles as written.
- Each option's type, default and whether it is required. Each error a caller can see, and when.

### Comments

- A comment states what the code does and why. Surprising behaviour links its justification: a spec, or a permalink to the upstream lines.
- No history ("this used to…"): that belongs in commit messages.
- Every workaround in code says what ends it: `@ts-expect-error`, a skipped test, a version pinned in code, a disabled check.

### Tests

- Tests import the package by its name and test behaviour through its public API.
- Errors and edge values (empty, `null`, 0, the limits) are covered, not only the happy path.
- Coverage comes from assertions on behaviour, not from calls that assert nothing.
- No sleeps, wall-clock time or order between tests.

### Versions

- Pending changesets bump by what changed: a major only for a meaningful change, a bug fix a patch.
- A breaking change offers an `unsafe`-prefixed option that restores the old behaviour, and data written by an earlier version stays readable.

## Report

Per package, most important first: each finding with its file and line, the principle it misses, and the change that fixes it. Then what you checked and found fine. Plain text, nothing else.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.