agentleFS
augchan42augchan42/inkstone/skills/oss-licence-audit/SKILL.md

oss-licence-audit

Skill5 starsChanged 5 months agoMITView on GitHub

Use when a codebase needs an open-source licence inventory — pre-release checks, funding or M&A diligence, or answering whether commercial use of OSS dependencies is compliant. Produces an SBOM-style inventory with copyleft triage, never a legal opinion. For prose rhythm checks, see analyze-variation.

The file

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 7 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before a commercial release, to check what licences ship with the product.

    line 25
  2. Distinctive:

    When diligence asks (funding, acquisition): produce the SBOM and flag list.

    line 26
  3. Distinctive:

    When someone asks "are we allowed to sell this given the open source in it": run the inventory, triage, and hand the flags to a lawyer.

    line 27
  4. Distinctive:

    Always execute the bundled script — never compile the inventory by hand.

    line 33
  5. Distinctive:

    REVIEW items need a human to open the actual licence text: Do this in the same run where possible: read the LICENCE file in the installed …

    line 67
  6. Very specific:

    Read references/licence-classes.md for the full taxonomy: permissive, weak copyleft, strong copyleft, network copyleft / source-available, …

    line 87
  7. Distinctive:

    When flags exist, present the standard options and let the client (and their lawyer) choose: replace the component with a …

    line 94
  8. Distinctive:

    Every engagement ends with the handoff filled in: this inventory, the repo at a pinned commit, and the distribution model (SaaS-only?

    line 103

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

OSS Licence Audit

Builds a manifest-based open-source licence inventory of a codebase and triages it for legal review. The output is a technical input to a lawyer's opinion — the skill states this in every report and never concludes whether a use is compliant.

Why this is a skill with a script, not a prompt: the inventory must be deterministic. Licence fields are read from installed packages by the bundled Node script — this skill tells the agent to run it, how to read the output, and what the script cannot see. Do not eyeball licences from memory; run the script.

When to use

  • Before a commercial release, to check what licences ship with the product.
  • When diligence asks (funding, acquisition): produce the SBOM and flag list.
  • When someone asks "are we allowed to sell this given the open source in it": run the inventory, triage, and hand the flags to a lawyer.
  • On any repo you inherit: first audit before first deploy.

How to run

Always execute the bundled script — never compile the inventory by hand.

The script lives at scripts/oss-licence-audit.mjs inside this skill's own directory. Resolve that directory however your harness exposes it, then run the absolute path with Node:

  • Claude Code: $CLAUDE_PLUGIN_ROOT/skills/oss-licence-audit/scripts/oss-licence-audit.mjs
  • opencode / other Agent Skills hosts: use the absolute path to this SKILL.md's directory + /scripts/oss-licence-audit.mjs (the env var above is Claude-Code-only).
SCRIPT="$CLAUDE_PLUGIN_ROOT/skills/oss-licence-audit/scripts/oss-licence-audit.mjs"

# inventory of a repo, Markdown to stdout
node "$SCRIPT" /path/to/repo

# machine-readable, or write a version-tracked report
node "$SCRIPT" /path/to/repo --json
node "$SCRIPT" /path/to/repo --write licence-audit.md

Dependency-free (Node built-ins). No network calls — safe on private repos. Reads package.json, the lockfile's presence, node_modules (pnpm store and flat layouts), and checks for NOTICE/attribution files. Other ecosystems found in the repo (Python, Go, Rust, Docker) are reported as present-but-unscanned — v1 is npm-only.

Reading the output

  • Counts first: how many packages, in what scope (prod / dev / transitive), in which licence class. A clean bill is boring. Say so.
  • Flags are triage, not verdicts. HIGH means "counsel must see this before ship", never "this is infringing". Keep that wording.
  • REVIEW items need a human to open the actual licence text. Do this in the same run where possible: read the LICENCE file in the installed package, check for dual-licence or commercial-exception terms, and record what you found.
  • HYGIENE flags (no NOTICE file, no lockfile) are the cheapest fixes in the report. Say that.

The two hard rules

  1. Inventory, never opinion. The report answers "what licences are in the build and where the sharp edges are". It never answers "are we compliant". If the user asks for the second question, the answer is the lawyer handoff section, filled in.
  2. State the gaps out loud. The script prints what it cannot see (vendored code, bundled JS, containers, dual-licensing, the combined-work question). Repeat the relevant ones to the client in plain words. Named gaps are expertise; silent gaps are negligence.

Classification

Read references/licence-classes.md for the full taxonomy: permissive, weak copyleft, strong copyleft, network copyleft / source-available, and the trigger table (SaaS-only vs distributed). The script applies it; you interpret the flags with it.

Remediation menu (options, not advice)

When flags exist, present the standard options and let the client (and their lawyer) choose: replace the component with a permissively-licensed alternative · isolate it behind a process or service boundary (confirm the boundary counts, with counsel) · check for dual-licence or paid commercial terms · vendor it properly with attribution · accept and comply (publish notices, offer source). Cost order is roughly as listed. Say that.

Lawyer handoff

Every engagement ends with the handoff filled in: this inventory, the repo at a pinned commit, and the distribution model (SaaS-only? on-prem? mobile? containers? OEM?) plus how each flagged component is integrated (linked, vendored, separate process, API). No handoff, no done.

Non-goals (v1)

Binary/container scanning, non-npm ecosystems, licence-change monitoring over time, and CI integration. Each is a stated gap, not a silent one.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.