Agent skill
shebangpython
Validates Python shebangs and PEP 723 inline script metadata. Use when creating or validating standalone executable Python scripts. Ensures shebang matches script type.
Stars
33
Forks
4
Install this agent skill to your Project
npx add-skill https://github.com/Jamie-BitFlight/claude_skills/tree/main/plugins/python-engineering/skills/shebangpython
SKILL.md
Shebang & PEP 723 Validation
Validate the shebang for ALL Python scripts based on their dependencies.
Input
File: $ARGUMENTS
Rules
| Script Type | Shebang | PEP 723 |
|---|---|---|
| Stdlib-only | #!/usr/bin/env python3 |
None (nothing to declare) |
| With dependencies | #!/usr/bin/env -S uv --quiet run --active --script |
Required (lists deps) |
| Package executables | #!/usr/bin/env python3 |
None (deps via package manager) |
| Library modules | No shebang | None |
Actions
- Analyze imports to determine dependency type
- Correct shebang if wrong
- Add PEP 723 metadata if external deps detected
- Remove PEP 723 metadata if stdlib-only
- Set execute bit if needed
Didn't find tool you were looking for?