安全
validate-python-stack
Validate the Python Template repository or a project generated from it. Use before committing, publishing, deploying, or reviewing a stack to check catalog compilation, rendering, dependencies, formatting, tests, security workflows, skills, and representative runtime behavior.
leynier · 已有静态检查记录
安装与使用
运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。
npx skills add leynier/python-template --skill validate-python-stack技能说明
name: validate-python-stack description: Validate the Python Template repository or a project generated from it. Use before committing, publishing, deploying, or reviewing a stack to check catalog compilation, rendering, dependencies, formatting, tests, security workflows, skills, and representative runtime behavior.
Validate Python Stack
Choose the validation path that matches the current directory and report exact failures without hiding skipped checks.
Template Repository
- Run
uv sync --all-groups. - Run
uv run python scripts/compile_catalog.py --check. - Run
uv run ruff check .anduv run ruff format --check .. - Run
uv run pytest -n auto. Use focused tests first while iterating, but finish with the full suite. - For every directory under
skills/, run the skill-creator validator when available and runnpx --yes skills add . --listto verify discovery. - Generate the changed presets or custom combinations and exercise their real CLI, API, MCP, training, serving, or deployment entry point as applicable.
- If GitHub workflows changed and Docker is available, run the repository's local Actions validation before pushing.
Generated Project
- Read
.copier-answers.yml,readme.md, andpyproject.tomlto identify enabled layers. - Run
uv sync --all-groups,uv run ruff check .,uv run ruff format --check ., anduv run pytest. - Run
npx --yes skills add . --list; expectproject-workflowand only the conditional skills appropriate to the selected stack. - Exercise the primary entry point. For a containerized target, build the Docker image and verify its health route locally when Docker is available.
- Validate generated JSON, TOML, YAML, Python, and HCL as structured data rather than with string-only assertions.
Reporting
Separate passed, failed, and unavailable checks. Include the command, relevant error, and whether the failure belongs to the template, the generated project, local infrastructure, or an external service.