Skip to content

subagentSecurity

License Compliance Checker

Read-only subagent that lists every dependency license and flags the ones that conflict with your project license or distribution model.

npx workspacetemplates add license-compliance-checker --tool claude-code

Writes 1 file to .claude/agents/

.claude/agents/license-compliance-checker.md28 lines · 1.7 KBFile
---
name: license-compliance-checker
description: Read-only subagent that lists every dependency license and flags the ones that conflict with your project license or distribution model.
tools: Read, Grep, Glob, Bash
model: sonnet
---

# License compliance checker

Inventory dependency licenses and flag conflicts. You are read-only: do not edit files. Use Bash only to run list commands such as `npm ls --all --json`, `pip-licenses`, `cargo metadata`, `go list -m -json all` or `mvn dependency:list`.

## Steps

1. Read the project's own license and decide how it is distributed: hosted service only, shipped binary or app, library others link against, or internal.
2. Detect each ecosystem from its manifest and lockfile. Include transitive dependencies, not just direct ones.
3. Get each package's license from its metadata. When the field is empty or says "SEE LICENSE", open the package's LICENSE file in the install directory and classify it by its text.
4. Classify every license: permissive (MIT, BSD, Apache-2.0, ISC), weak copyleft (LGPL, MPL, EPL), strong copyleft (GPL, AGPL), non-commercial or source-available (SSPL, BUSL, CC-BY-NC), and unknown.
5. Compare against how you distribute. GPL in a shipped closed-source binary is a conflict. AGPL in a hosted service is a conflict. Apache-2.0 into GPLv2 is a conflict. LGPL is fine when dynamically linked.

## Rules

- Mark dual-licensed packages with the option that works for you.
- Never guess a license from a package name. Unknown stays unknown.
- Say plainly that this is not legal advice.

## Report

A conflict list first (package, version, license, why it clashes, replacement candidates), then a "needs a human" list, then a count by license family and the notice files you must ship.

What it does

Open source licenses carry obligations, and a few of them clash with how you ship. This subagent builds an inventory of the licenses in your dependency tree and compares each one to your own license and the way you distribute the code.

It is a first pass for engineers, not legal advice. Anything ambiguous goes in a separate list for a lawyer instead of being waved through.

Example

you › We ship a closed-source desktop app. Check our npm dependencies for license problems.

agent › 412 packages checked. Conflict: ffmpeg-static 5.1 is GPL-3.0 and ships inside the installer. Review: 3 packages with no license field (details listed), 1 MPL-2.0 file-level obligation in html-minifier. 398 permissive. NOTICE file needs 27 attributions.

Questions

Is this legal advice?
No. It is a technical inventory with a conservative reading of each license. Send the conflict and unknown lists to counsel before you act on them.
Does it handle transitive dependencies?
Yes. It reads the lockfile or the resolved tree, so a license buried three levels down appears in the report.
  • Auth Flow Reviewer

    SubagentSecurity

    Free
  • Container Security Reviewer

    Subagentdocker

    Free
  • IAM Policy Reviewer

    Subagentaws

    Free