detect-python-version

MacHu-GWU's avatarfrom MacHu-GWU

Detects the Python major and minor version of the current repository

⭐0stars🔀0forks📁View on GitHub🕐Updated Dec 28, 2025

When & Why to Use This Skill

The detect-python-version skill is a specialized utility designed to automatically identify the Python major and minor versions (e.g., 3.11, 3.13) of a given repository. By streamlining environment detection, it helps developers and automated agents ensure compatibility and optimize configuration settings across different coding environments.

Use Cases

  • CI/CD Pipeline Automation: Automatically detect the required Python version to configure build environments and runners in GitHub Actions or GitLab CI.
  • Dependency Compatibility: Verify that the current environment matches the project's requirements before installing or updating packages.
  • Automated Environment Setup: Assist developers in quickly identifying the correct runtime version when onboarding to a new codebase or switching between multiple projects.
  • Scripted Workflows: Use the version output as a variable in shell scripts to handle version-specific syntax or library features dynamically.
namedetect-python-version
descriptionDetects the Python major and minor version of the current repository

detect-python-version

Runs a script that outputs the Python version in major.minor format (e.g., 3.11, 3.13).

Instructions

Run scripts/detect_version.py to detect the Python version.

The script outputs just the version string in major.minor format, nothing else.

Examples

Output: 3.11

Output: 3.13