file-license
Skill1 starsChanged 5 months agoMITView on GitHub
Create or update LICENSE files and third-party attribution. Pre-stored texts for MIT, Apache-2.0, BSD-2/3-Clause, ISC, Unlicense. Covers license selection, SPDX IDs, and compliance.
In this repository26 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- audit-legalSkill
- audit-securitySkill
- echartsSkill
- explainSkill
- file-changelogSkill
- file-claudeSkill
- file-projectSkill
- file-readmeSkill
- frontendSkill
- hooksSkill
- lean-reviewSkill
- loopSkill
- masterpromptSkill
- mcpSkill
- mermaidSkill
- new-projectSkill
- outputstyleSkill
- proofreadSkill
- rulesSkill
- settingsSkill
- skillsSkill
- sotaSkill
- subagentsSkill
- tasksSkill
- toonSkill
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 6 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 32
Never leave them unfilled.
- Distinctive: line 34
Verify the fetched content matches the SPDX expected text before writing.
- Very specific: line 47
All derivative software must be open source → GPL-3.0-only
- Very specific: line 56
Default for new open source software: MIT.
- Distinctive: line 77
All pre-stored texts are the canonical SPDX versions.
- Distinctive: line 107
Use one convention per project consistently:
- Distinctive: line 116
Do not ask the user to run these manually:
- Very specific: line 141
Ask: copyright holder (full legal name or organization), year, project type (library, app, SaaS, data).
- Very specific: line 147
Write LICENSE to the project root.
- Distinctive: line 148
Add the SPDX identifier to package manifests.
≈ “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.
Files
License Create
1§ Purpose
Produce a correct, GitHub-detectable LICENSE file and the required third-party
attribution documents. Output is plain text — never markdown-formatted.
GitHub license detection fuzzy-matches the file against canonical SPDX texts and requires ≥90% similarity. Any wrapper text, formatting, or custom annotation in the LICENSE file body reduces the match score and causes detection to fail.
2§ Use when
- A project has no
LICENSEfile or has one with incorrect formatting. - User asks "which license should I use?", "add a license", or "Lizenz erstellen".
- A new version of the project requires updating the copyright year.
- Third-party dependencies need attribution documentation.
3§ Hard constraints
- Filename:
LICENSE— no extension, at the project root. GitHub recognizesLICENSE,LICENSE.md,LICENSE.txt, andCOPYING; plainLICENSEhas the highest detection reliability. - File content: plain text only. No markdown headers, no links, no commentary anywhere in the file body. The entire file must be the canonical license text.
- Canonical text only: load from
assets/for pre-stored licenses. Never paraphrase, reorder, or annotate the license body. YEARandFULLNAMEare the only fields to fill (MIT, ISC, BSD variants). Never leave them unfilled. Ask the user if unknown.- For licenses not pre-stored: fetch from the SPDX canonical URL listed in §5. Verify the fetched content matches the SPDX expected text before writing.
- SPDX identifier: after writing
LICENSE, add the SPDX ID to all package manifests that have alicensefield (package.json, Cargo.toml[package],pyproject.toml [tool.poetry]/[project],go.modcomment).
4§ Decision gate
Work through these questions in order. Stop at the first match.
- Commercial only, source not to be shared → no open source license; add a
proprietary notice:
Copyright (c) YEAR COMPANY. All rights reserved. - Non-commercial or ShareAlike required →
CC-BY-NC-SA-4.0(creative/app work) orAGPL-3.0-only(software, all uses must share source) - SaaS / network use must trigger source sharing →
AGPL-3.0-only - All derivative software must be open source →
GPL-3.0-only - Library: modifications to the library open, but linking is allowed →
LGPL-3.0-only - File-level copyleft: modified files open, rest can be proprietary →
MPL-2.0 - Need patent protection in addition to copyright →
Apache-2.0 - Maximum simplicity, most ecosystems →
MIT - Minimal text, npm default →
ISC - Public domain for software →
Unlicense - Public domain for data or content →
CC0-1.0
Default for new open source software: MIT.
5§ License catalog
| SPDX ID | Fill fields | Badge color | Storage |
MIT | YEAR, FULLNAME | green | assets/mit.txt |
Apache-2.0 | none | blue | Fetch: https://spdx.org/licenses/Apache-2.0.txt |
BSD-2-Clause | YEAR, FULLNAME | blue | assets/bsd-2-clause.txt |
BSD-3-Clause | YEAR, FULLNAME | blue | assets/bsd-3-clause.txt |
ISC | YEAR, FULLNAME | green | assets/isc.txt |
Unlicense | none | lightgrey | assets/unlicense.txt |
GPL-3.0-only | none | red | Fetch: https://spdx.org/licenses/GPL-3.0-only.txt |
LGPL-3.0-only | none | orange | Fetch: https://spdx.org/licenses/LGPL-3.0-only.txt |
LGPL-2.1-only | none | orange | Fetch: https://spdx.org/licenses/LGPL-2.1-only.txt |
AGPL-3.0-only | none | red | Fetch: https://spdx.org/licenses/AGPL-3.0-only.txt |
MPL-2.0 | none | orange | Fetch: https://spdx.org/licenses/MPL-2.0.txt |
CC0-1.0 | none | lightgrey | Fetch: https://spdx.org/licenses/CC0-1.0.txt |
CC-BY-4.0 | none | blue | Fetch: https://spdx.org/licenses/CC-BY-4.0.txt |
CC-BY-NC-SA-4.0 | none | purple | Fetch: https://spdx.org/licenses/CC-BY-NC-SA-4.0.txt |
All pre-stored texts are the canonical SPDX versions. They do not change within a version number. Apache 2.0 has been unchanged since 2004; MIT since OSI approval in 1999. Do not re-fetch pre-stored texts unless the user reports a GitHub detection failure.
Shields.io badge format (for-the-badge style):
6§ Third-party license compliance
Third-party compliance is a legal requirement in distributed software, not an optional good practice.
6.1§ What each license requires from users
| Their license | Your obligation when distributing |
| MIT, ISC | Preserve their copyright notice and license text in any binary or bundle |
| BSD-2-Clause | Same as MIT |
| BSD-3-Clause | Same as BSD-2; also: do not use their name to endorse your product |
| Apache-2.0 | Include their NOTICE file if they provide one; preserve copyright, patent, and trademark notices; note any file modifications |
| GPL-2.0/3.0 | Your entire distributed work becomes GPL; provide full source code |
| LGPL-2.1/3.0 | Library source for modifications; larger work can be proprietary |
| AGPL-3.0 | Same as GPL but also triggered by users interacting via a network |
| MPL-2.0 | Modified MPL files must stay MPL; rest of the project may use another license |
| CC licenses | Attribution required; ShareAlike requires same license on derivatives |
6.2§ Attribution file conventions
Use one convention per project consistently:
THIRD_PARTY_LICENSES.md — Markdown, readable on GitHub, recommended for web/app projects.
See assets/third-party-licenses.template.md for the format.
NOTICES — plain text, Apache-style, preferred for Apache-2.0 licensed projects or
CLI tools distributed as binaries.
6.3§ Automation — run these via Claude's tools
Do not ask the user to run these manually:
| Ecosystem | Tool | Command |
| npm / Node | license-checker | npx license-checker --json > third-party.json |
| Rust / Cargo | cargo-license | cargo license --json |
| Python | pip-licenses | pip-licenses --format=json |
| Multi-language | LicenseFinder | license_finder report |
6.4§ When to create an attribution file
Always create when:
- Any dependency uses Apache-2.0 (NOTICE file may be required by upstream)
- Any dependency uses GPL/LGPL/AGPL (source obligations apply to the full project)
- The project is distributed as a compiled binary or bundled package
- Any dependency license is other than MIT, ISC, or BSD
6.5§ License compatibility
Combining code with incompatible licenses creates a legal conflict:
- Permissive (MIT, BSD, ISC, Apache-2.0) → can be combined with almost anything
- Apache-2.0 → compatible with GPL-3.0, incompatible with GPL-2.0
- GPL-3.0 → incoming MIT/Apache code is fine; the combined work is GPL-3.0
- GPL code in a proprietary project → forbidden
- LGPL → proprietary code can link to the library; modifications to the library must be open
7§ Workflow
- Ask: copyright holder (full legal name or organization), year, project type
(library, app, SaaS, data). If the project has a package manifest, read it first
to check for an existing
licensefield. - Apply §4 decision gate to select or confirm the license.
- Load the pre-stored text from
assets/, or fetch from the SPDX URL (§5). FillYEARandFULLNAMEwhere required. Verify no other text is altered. - Write
LICENSEto the project root. Plain text, no extension. - Add the SPDX identifier to package manifests.
- Check third-party compliance (§6):
a. Read package manifests for dependency lists.
b. Run the ecosystem tool via Claude's tools to get license data.
c. If attribution is required: create or update
THIRD_PARTY_LICENSES.mdusingassets/third-party-licenses.template.md. - Deliver:
LICENSE, updated manifests,THIRD_PARTY_LICENSES.mdif applicable. Report: license chosen (SPDX ID), fill fields used, third-party licenses found and actions taken.
8§ Output contract
Must include:
LICENSEat project root — plain text, no extension, exact canonical textYEARandFULLNAMEfilled where the license requires them- SPDX identifier in package manifests
THIRD_PARTY_LICENSES.mdwhen any dependency requires attribution
Must not include:
- Markdown, HTML, or any formatting inside the
LICENSEfile body - Modified or paraphrased license text
- Unfilled
YEARorFULLNAMEin the delivered file - Two licenses in one
LICENSEfile — useLICENSE-MIT+LICENSE-APACHEfor dual-licensing, and state the dual-license inREADME.md
9§ Associated documents
Stored assets only — licenses marked Fetch in 5§ are retrieved from their SPDX URLs at runtime and are intentionally not stored here.
- [assets/mit.txt] — MIT License (YEAR, FULLNAME)
- [assets/bsd-2-clause.txt] — BSD 2-Clause License (YEAR, FULLNAME)
- [assets/bsd-3-clause.txt] — BSD 3-Clause License (YEAR, FULLNAME)
- [assets/isc.txt] — ISC License (YEAR, FULLNAME)
- [assets/unlicense.txt] — The Unlicense (no fill fields)
- [assets/third-party-licenses.template.md] — THIRD_PARTY_LICENSES.md template
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
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.

