Free 40-page Claude guide — setup, 120 prompt codes, MCP servers, AI agents. Download free →
CLSkills
Documentationbeginner

License Picker

Share

Choose and add appropriate LICENSE file

Works with OpenClaude

You are a software licensing expert. The user wants to select and add the correct LICENSE file to their project based on their specific use case and requirements.

What to check first

  • Run ls -la in your project root to see if a LICENSE file already exists
  • Check your package.json or pyproject.toml to see if a license field is already defined
  • Review your project's dependencies with npm list or pip list to understand any license constraints from existing packages

Steps

  1. Identify your project type (library, application, proprietary, open-source) and intended distribution method
  2. Determine your desired permissions (commercial use, modification, distribution, sublicensing) and restrictions (liability, warranty, attribution)
  3. Visit choosealicense.com or review common licenses: MIT (permissive), Apache 2.0 (permissive + patent), GPL v3 (copyleft), BSD 3-Clause (permissive), ISC (minimal), Unlicense (public domain)
  4. Select the license that matches your business goals and open-source philosophy
  5. Download the license text from opensource.org/licenses and save as LICENSE in your project root
  6. Update your package.json "license" field (Node.js) or setup.py license field (Python) with the SPDX identifier (e.g., "MIT", "Apache-2.0")
  7. If using a monorepo or multiple packages, repeat for each package's individual LICENSE file
  8. Add LICENSE to version control with git add LICENSE

Code

#!/bin/bash

# Function to add license to Node.js project
add_nodejs_license() {
  local license_type=$1
  
  # Update package.json with license field
  npm pkg set license="$license_type"
  
  # Create LICENSE file based on type
  case "$license_type" in
    MIT)
      cat > LICENSE << 'EOF'
MIT License

Copyright (c) $(date +%Y) [Your Name/Organization]

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE

Note: this example was truncated in the source. See the GitHub repo for the latest full version.

Common Pitfalls

  • Treating this skill as a one-shot solution — most workflows need iteration and verification
  • Skipping the verification steps — you don't know it worked until you measure
  • Applying this skill without understanding the underlying problem — read the related docs first

When NOT to Use This Skill

  • When a simpler manual approach would take less than 10 minutes
  • On critical production systems without testing in staging first
  • When you don't have permission or authorization to make these changes

How to Verify It Worked

  • Run the verification steps documented above
  • Compare the output against your expected baseline
  • Check logs for any warnings or errors — silent failures are the worst kind

Production Considerations

  • Test in staging before deploying to production
  • Have a rollback plan — every change should be reversible
  • Monitor the affected systems for at least 24 hours after the change

Quick Info

Difficultybeginner
Version1.0.0
AuthorClaude Skills Hub
documentationlicenselegal

Install command:

curl -o ~/.claude/skills/license-picker.md https://claude-skills-hub.vercel.app/skills/documentation/license-picker.md

Related Documentation Skills

Other Claude Code skills in the same category — free to download.

Want a Documentation skill personalized to YOUR project?

This is a generic skill that works for everyone. Our AI can generate one tailored to your exact tech stack, naming conventions, folder structure, and coding patterns — with 3x more detail.