Skip to content
Skills Library
Law & compliance · Research

python-packaging-license-finder

/python-packaging-license-finder

Use this skill to deterministically find license information for Python packages by checking PyPI metadata first, then falling back to Git repository LICENSE files using shallow cloning.

Repository
ai-helpers ↗
Licence
Apache-2.0
Last repository change
22.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
2
Scripts
1
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 22.10.2026, without references to retired models or APIs.

Licence

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

What to check before installing
  • 1 scripts in this package. Review them before installing, as Claude may execute them.

Scripts: scripts/find_license.py

What it does and when to use it

Use this skill to deterministically find license information for Python packages by checking PyPI metadata first, then falling back to Git repository LICENSE files using shallow cloning.

Original author description

Use this skill to deterministically find license information for Python packages by checking PyPI metadata first, then falling back to Git repository LICENSE files using shallow cloning.

How it works

  1. Instructions
  2. Usage Examples
  3. Error Handling
  4. Integration Notes
Original SKILL.md headings · 100 lines, 458 words
SKILL.md preview
---
name: python-packaging-license-finder
description: Use this skill to deterministically find license information for Python packages by checking PyPI metadata first, then falling back to Git repository LICENSE files using shallow cloning.
allowed-tools: Bash Skill
---

# Python Package License Finder

This skill helps you deterministically find license information for Python packages using a two-step approach: first checking PyPI metadata, then searching the source repository if needed.

## Instructions

When a user asks to find the license for a Python package, follow this deterministic process:

### Step 0: Source URL Priority

If a source repository URL is provided by the caller, skip PyPI lookup entirely:

1. Pass the URL directly to the `git:shallow-clone` skill
2. Search for LICENSE files in the cloned repository (see Step 2.3-2.4 below)
3. Report the license found

You can also use the script with a source URL to trigger this flow:
```bash
./scripts/find_license.py <package_name> --source-url <url>
```

If no source URL is provided, proceed with Step 1.

### Step 1: Check PyPI Metadata
First, attempt to find the license from PyPI using the package inspection script:

```bash
./scripts/find_license.py <package_name> [version]
```

If the script finds a license in the PyPI metadata, **stop here** and return the license name.

### Step 2: Search Git Repository (if PyPI fails)
If no license is found in PyPI metadata, search the package's source repository:

1. **Get the source repository URL** from the PyPI metadata (the script will provide it)
2. **Use the shallow-clone skill** to clone the repository:
   ```
   Skill: git:shallow-clone
   ```
3. **Search for LICENSE files** in the cloned repository:
   ```bash
   find . -iname "license*" -o -iname "copying*" -o -iname "copyright*" | head -10
   ```
4. **Read the license file** to identify the license type:
   ```bash
   head -20 <license_file>
   ```

### Step 3: Report Results
- **License Found**: Return the license name (e.g., "MIT License", "Apache-2.0", "GPL-3.0")
- **License Not Found**: Report that the license could not be determined

## Usage Examples

### Find License for Popular Package
```bash
./scripts/find_license.py requests
```
**Expected**: Find "Apache-2.0" from PyPI metadata

### Find License for Package with Missing PyPI License
```bash
./scripts/find_license.py some-package
```
**Expected**: Fall back to repository search if PyPI metadata is incomplete

### Specific Version Analysis
```bash
./scripts/find_license.py django 4.2.0
```
**Expected**: Find license for specific Django version

## Error Handling

### Package Not Found
- Verify package name spelling
- Check package availability on PyPI
- Suggest alternative package names

### Repository Access Issues
- Report if source repository is unavailable
- Note private/restricted repositories
- Suggest manual license verification

### License File Parsing
- Handle non-standard license file formats
- Report unclear or multiple licenses
- Recommend manual review for complex cases

## Integration Notes

This skill complements:
- **python-packaging-complexity** - License info helps assess redistribution complexity
- **python-packaging-license-checker** - Provides license names for compatibility assessment
- **python-packaging-source-finder** - Uses similar PyPI metadata analysis

The skill focuses on **finding** license information, while license-checker focuses on **assessing** license compatibility for redistribution.
Files in this package (2)
  • SKILL.md 3 KB
  • scripts/find_license.py 4 KB

Versions

The database has no other skills named python-packaging-license-finder.

Database snapshot: 13.11.2026 · package version cc719becce6d (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 90open-source-license-selection
    Use when the user asks to choose, reconcile, or apply an open-source license and package metadata. Not for readiness auditing.
  • 100python-packaging-license-checker
    Use this skill to check whether a Python package license is compatible with redistribution in Red Hat products, using the Fedora License Data as the authoritative policy source. Produces a structured six-field verdict with escalation guidance for non-trivial cases.
  • 100python-packaging
    Configure Python package metadata, setup.py, and pyproject.toml for distribution using UV or setuptools. Use when setting up Python packages, configuring build systems, or preparing projects for PyPI publication.
  • 95python-packaging
    Create distributable Python packages with proper project structure, setup.py/pyproject.toml, and publishing to PyPI. Use when packaging Python libraries, creating CLI tools, or distributing Python code.
  • 100python-packaging
    Build and publish Python packages with uv. Use when the user mentions building packages, publishing to PyPI, wheel/sdist creation, or entry points.
  • 100license-check
    Use when assessing whether a Python package's license permits redistribution in Red Hat's AI package distribution pipeline (RHAI). Reads package context, identifies the SPDX license, and writes a structured compatibility verdict.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.