KaairosGet the kit
Guide · 6 min read

License hygiene for Claude Code agents

The .md files you copy into .claude/ carry licenses like source code does. The safe allowlist, the traps, and how to verify a licence at the exact commit you pulled from.

Yes — the Markdown files you copy into .claude/ carry licenses exactly like source code, and "it is just a prompt in a text file" is not a legal exemption. A subagent, a SKILL.md, or a slash command from someone else's repository is a copyrightable work. If the repo has no LICENSE file you have no permission to redistribute it, and if it is under a copyleft or non-commercial licence — GPL, AGPL, CC-BY-SA, CC-BY-NC — you inherit obligations most people never read. This guide is the safe allowlist, the traps to stop on, how to verify a licence at the exact commit you pulled from, and a pre-flight checklist you can run before anything enters your kit.

A prompt file has a licence

Copyright attaches to original creative expression the moment it is written, whether that is a C++ file or the carefully-worded system prompt of an agent. "It is public because it is on GitHub" is a common and expensive misconception: publishing code publicly does not place it in the public domain, and it does not grant you the right to copy, modify or redistribute it. That right comes only from a licence. The absence of a LICENSE file is not permission — it is the default, which is all rights reserved.

No LICENSE file means no permissionA GitHub repo with no LICENSE is not "free to use." Under default copyright the author retains all rights; you may view it, but you have no grant to redistribute it inside your own kit. Treat missing-licence as excluded, not as a minor gap.

The allowlist: safe to ship

These permissive licences let you redistribute and modify with light, well-understood obligations. They are the only families a cleanly-shippable kit should contain:

LicenceSPDX idRedistribute?Your obligation
MITMITYesPreserve the copyright line + licence text
MIT No AttributionMIT-0YesNone
Apache 2.0Apache-2.0YesPreserve NOTICE; state significant changes
BSD 2-ClauseBSD-2-ClauseYesPreserve copyright + licence text
BSD 3-ClauseBSD-3-ClauseYesAs BSD-2, plus no-endorsement clause
CC0 1.0CC0-1.0YesNone (public-domain dedication)

If a component's licence is on this list and you meet the obligation in the last column, you can ship it. Anything else goes through the traps section before it gets anywhere near your kit.

The traps: stop and check

Each of these is a reason to exclude a component or to accept a real obligation. Do not wave any of them through because "it is only a Markdown file."

Licence / stateWhy it is a trap
No LICENSE fileDefault all-rights-reserved; you have no redistribution grant
GPL-2.0 / GPL-3.0Strong copyleft; can force your combined distribution open
AGPL-3.0Copyleft that also reaches users over a network
CC-BY-SA-4.0Share-alike; your derivative must adopt the same licence
CC-BY-NC-4.0Non-commercial; incompatible with a paid — arguably any commercial — kit
CC-BY-4.0Usable but attribution is mandatory; excluded from strict permissive-only kits
Custom / "do what you want" textNo SPDX match means no clear terms; treat as unknown = exclude

The two that catch people most often are CC-BY-NC and no-licence. Creative-Commons NonCommercial is popular on prompt and agent repos because it feels generous, but it forbids commercial use and its definition of "commercial" is broad enough to make even internal company use questionable. And a repo with hundreds of stars and no LICENSE file is still all-rights-reserved no matter how freely people are copying from it.

Verify at the source commit, not the README badge

A licence badge in a README, or a licence column in an awesome-list, is a claim — not proof. Badges go stale, get copied from templates, and describe the repo's stated intent rather than the file you are actually taking. Even a well-run list like hesreallyhim/awesome-claude-code can only report what a source repo declares; it cannot guarantee the LICENSE at the commit you pull. Verify the real thing:

# Read the actual licence at the exact commit you are vendoring — not a badge.
gh repo clone owner/repo && cd repo
git log -1 --format=%H            # record the exact commit you are copying from
cat LICENSE                       # confirm the full text, not just its presence
grep -rI "SPDX-License-Identifier" .   # per-file headers can override the repo root
git log -1 -- path/to/agent.md    # confirm the file itself, and when it last changed
SPDX identifiers are your source of truthMatch the LICENSE text to a canonical id on the SPDX License List (spdx.org/licenses). If the text does not map cleanly to a known SPDX identifier, treat the licence as unknown and exclude the component. choosealicense.com is the plain-English companion for what each one requires.

Record the commit hash alongside the licence. Licences change between commits — a maintainer can relicense, or add a LICENSE that was missing, or remove one — so "MIT when I checked" is only meaningful with the commit it was true at.

Attribution obligations you must actually meet

Permissive does not mean obligation-free. Meeting the terms is the difference between a clean redistribution and a licence violation:

  • MIT / BSD: preserve the original copyright notice and the licence text somewhere in your distribution. A single CREDITS file that reproduces them is the standard way.
  • Apache-2.0: preserve any NOTICE file from the source, include the licence, and state significant changes you made to the file. The NOTICE requirement is the one people miss.
  • CC0 / MIT-0: no attribution is required — but recording the source anyway keeps your own audit trail intact.
  • Any component you modified: note that you changed it, and from which source commit, so a future reader can tell your edits from the original.

The practical form of all this is one attribution file — a CREDITS.md — with a row per component: its name, source repository, exact commit, SPDX licence id, and whether you changed it. That single file satisfies MIT and BSD attribution, gives Apache-2.0 somewhere to carry the NOTICE, and turns a pile of copied Markdown into something you can defend if anyone ever asks. It is the same discipline covered from the buyer's side in whether a paid, audited kit is worth it, and it is what separates a real curation effort from the big unaudited repos.

The pre-flight audit checklist

Run this on every agent, skill or command before it enters your .claude/ for anything beyond throwaway experiments. It takes minutes per component and saves the argument you would otherwise have later.

  1. Find the LICENSE at the source — the file in the repo, not the README badge and not an awesome-list column.
  2. Record the exact commit hash you are copying the component from.
  3. Match the licence text to an SPDX id (spdx.org/licenses). If it does not map cleanly, treat it as unknown and exclude it.
  4. Check per-file SPDX headers — a header inside the file overrides the repository root licence.
  5. Confirm it is on your allowlist — MIT, Apache-2.0, BSD-2/3, CC0 or MIT-0. Anything else, stop and decide deliberately.
  6. For Apache-2.0, copy the NOTICE file and note any significant changes you made.
  7. Add a CREDITS row — component, source repo, commit, SPDX licence, modified yes/no.
  8. Re-verify on update — when you pull a newer version, re-check the licence at the new commit, because it can have changed.

The mistake to avoid

The costly mistake is treating community .md files as licence-exempt because they are short, prompt-shaped and freely shared. They are copyrighted works, and "everyone copies these" is not a defence. Whether you are assembling a personal setup or shipping a kit to a team, the rule is the same: verify at the source commit, keep to a permissive allowlist, meet the attribution obligations, and write it all down. Do that and your .claude/ is not just useful — it is clean, and it stays clean. If you have not yet decided which primitives you even need, keep the footprint small from the start with the guide to skills, subagents and commands; fewer components is also fewer licences to audit.

Sources

Keep reading