python-project-setup — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited python-project-setup (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Ask:
src-layout (recommended for libraries):
my-project/
src/
my_package/
__init__.py
main.py
models.py
tests/
__init__.py
conftest.py
test_main.py
pyproject.toml
README.md
.pre-commit-config.yaml
.github/
workflows/
ci.ymlflat-layout (simpler, for apps):
my-project/
my_package/
__init__.py
main.py
tests/
conftest.py
test_main.py
pyproject.toml
README.mdUse src-layout by default. It prevents accidental imports of the source during testing.
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "my-package"
version = "0.1.0"
description = "A brief description of the project"
readme = "README.md"
license = "MIT"
requires-python = ">=3.11"
authors = [
{ name = "Your Name", email = "[email protected]" },
]
dependencies = []
[project.optional-dependencies]
dev = [
"pytest>=8.0",
"pytest-cov>=5.0",
"ruff>=0.4",
"mypy>=1.10",
"pre-commit>=3.7",
]
[project.scripts]
my-cli = "my_package.main:cli"
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = [
"--strict-markers",
"--strict-config",
"-ra",
]
[tool.ruff]
target-version = "py311"
line-length = 88
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
"SIM", # flake8-simplify
]
[tool.ruff.lint.isort]
known-first-party = ["my_package"]
[tool.mypy]
python_version = "3.11"
strict = true
warn_return_any = true
warn_unused_configs = true
[tool.coverage.run]
source = ["src/my_package"]
branch = true
[tool.coverage.report]
fail_under = 80
show_missing = true
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
]Ruff (recommended - replaces flake8, isort, black):
Add to pyproject.toml (shown above). Ruff handles both linting and formatting:
# Lint
ruff check .
# Format
ruff format .
# Fix auto-fixable issues
ruff check --fix .Type checking with mypy:
mypy src/For strict mode, address these common issues:
from __future__ import annotations for modern syntaxpy.typed marker file for library packagesconftest.py with common fixtures:
import pytest
@pytest.fixture
def sample_data():
"""Provide sample test data."""
return {"name": "test", "value": 42}
@pytest.fixture
def tmp_config(tmp_path):
"""Create a temporary config file."""
config_file = tmp_path / "config.toml"
config_file.write_text('[app]\ndebug = true\n')
return config_fileRun tests with coverage:
pytest --cov --cov-report=term-missing --cov-report=html.pre-commit-config.yaml:
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.4
hooks:
- id: ruff
args: [--fix]
- id: ruff-format
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.10.0
hooks:
- id: mypy
additional_dependencies: []
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-toml
- id: check-added-large-filesInstall: pre-commit install
Provide a Makefile or document these commands:
.PHONY: install lint format test typecheck all
install:
pip install -e ".[dev]"
pre-commit install
lint:
ruff check .
format:
ruff format .
test:
pytest --cov --cov-report=term-missing
typecheck:
mypy src/
all: lint typecheck testUser says: "Set up a new Python CLI tool project"
Response:
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.