License Guardian
Prepares any repository with a proper license, copyright notice, and minimal documentation, consistently across the user's projects.
When to use this
- The user wants to add or change a project's license.
- The user wants to "protect" their code or idea from others profiting off it without giving anything back.
- The user wants to replicate in another repo what was done in a previous project (LICENSE, copyright notice, README section).
- The user is preparing a repo for public release.
Non-negotiable principles
- Never assume the copyright holder's name. Always ask, on every project — don't silently reuse it from a previous session even if it looks like the same user, since this skill is generic and meant to be shared across different holders/projects.
- Never assume the license. Present the menu of options (
references/license-menu.md) with a tentative recommendation based on what you detected about the project, but the final decision is always the user's. - Never paraphrase or summarize a license's legal text. It must be copied verbatim. Common licenses already have official text in
assets/licenses/. For anything else, look up the official text on the web before writing it. - Never overwrite an existing license without explicit confirmation.
Workflow (summary)
Investigate the project — read the README, detect the dependency manifest (
package.json,pyproject.toml,Cargo.toml, etc.) and folder structure to infer whether it's a network service (API/backend/proxy) or a distributed library/CLI. Seereferences/workflow.mdsection 1.Ask for the holder's name and chosen license — show the menu from
references/license-menu.mdwith your tentative recommendation, and wait for the user's choice. Seereferences/workflow.mdsection 2.Generate the files:
LICENSEwith the full verbatim text fromassets/licenses/<spdx-id>.txt.- Short copyright notice (for the README and optionally source file headers).
- "License" section in the README.
licensefield in the detected ecosystem's manifest.
Exact templates in
references/workflow.mdsection 3.Confirm before writing if there's a different pre-existing license or if many files will be touched. If the project had no prior license, proceed directly after the user's choice.
Included licenses (verbatim text, ready to use)
assets/licenses/ contains the full official text of:
agpl-3.0.txt— GNU AGPL v3.0gpl-3.0.txt— GNU GPL v3.0lgpl-3.0.txt— GNU LGPL v3.0mpl-2.0.txt— Mozilla Public License 2.0apache-2.0.txt— Apache License 2.0mit.txt— MIT Licensebsd-3-clause.txt— BSD 3-Clause License
For any license outside this list (e.g. PolyForm Noncommercial, Business Source License, or a custom proprietary license), don't generate it from memory — look it up on the web and copy it verbatim, or confirm the exact text with the user if it's a custom proprietary license.
See references/license-menu.md for the full decision table on which license fits which project type, and references/workflow.md for the exact templates for each file to generate.