Python strict development
Skill Nick2bad4u/codex-skills/skills/python-strict-development
Maintains strict Python projects with Ruff, mypy, Pyright, pytest, editor, and package-script gates. Use when creating, auditing, or repairing strict lint, format, typecheck, test, compile, or VS Code tooling practices.From its SKILL.md
npx -y skills add Nick2bad4u/codex-skills --skill python-strict-developmentAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
5.3 KB, ~1.1k tokens by cl100k_base, as published. Nobody here has run it
Python Strict Development
Use this skill when Python code should meet the user's strict local quality bar rather than a minimal lint setup. Start from the current repository and adapt paths, package names, Python version, and CI commands before editing.
Source Priority
- Read
pyproject.toml,package.json,.vscode/settings.json,pylock.tomlorpylock.*.toml, requirements files, tool-specific lockfiles, CI workflows, and existing tests before changing tools. - Prefer existing repo conventions when they are already strict and working.
- Use strict-tooling.md when adding or repairing Ruff, mypy, Pyright, pytest, VS Code, or npm-script configuration.
- Use project-shapes.md when the repository is not a simple
scripts+testsproject. - Use strict-fix-patterns.md when strict diagnostics are valid but the right code fix is not obvious.
- Use
scripts/audit_python_strict.pyfor a read-only strict profile audit before or after manual config edits. - Do not weaken strict diagnostics, broad Ruff rule selection, or typecheck gates just to get a quick pass. Fix code first; use only narrow, justified ignores after proving the tool finding is intentionally tolerated.
Workflow
- Inventory Python entrypoints, import roots, test roots, minimum supported Python version, target platforms, dependency manager, direct script execution requirements, and first-party module names.
- Confirm the resolved environment can run the expected tools:
ruff==0.15.20,mypy==2.1.0,pyright==1.1.411,pytest==9.1.1, andpython -m compileallwhen those versions are declared by the repository. - Set up or sync the repo-local environment with the existing dependency manager and authoritative resolution file. Use strict-tooling.md for requirements,
pylock.toml, and tool-specific lock workflows; do not add a parallel dependency source merely to bootstrap the strict tools. Put the environment's scripts directory first onPATHbefore running npm-backed Python scripts. - Configure or repair the project around one strict gate:
ruff checkplusruff format --checkmypywithstrict = trueand extra error codespyrightin strict mode with explicit diagnosticspyteststrict config, strict markers, strict config, and warning errorspython -m compileallover source and tests
- Add npm package scripts only when the repository already uses npm as the task runner or the user asks for cross-language scripts; prefer
check:python,format:python,lint:python,typecheck:python,test:python, andcompile:python. - Keep ignores local and documented. Prefer
per-file-ignoresfor CLI entrypoints, direct-execution bootstrap code, dynamic API boundaries, and pytest asserts. - Do not mass-disable rules, add broad
ignorelists, or downgrade warnings because a diagnostic batch fails. Fix the repeated pattern, add typed adapters, split helpers, or narrow the one intentional exception. - Keep editor settings in
.vscode/settings.jsonaligned with repo config: Ruff uses filesystem config first, Pyright/Pylance runs workspace diagnostics, and tests use pytest. - Run
python <skill>/scripts/audit_python_strict.py <repo>when auditing strict-tooling drift, then inspect every failure before editing. - Run the narrow failing command after each fix, then run the aggregate gate.
Python Code Standards
- Use explicit types at public and internal boundaries; avoid
Anyunless the boundary is genuinely dynamic. - Prefer typed adapters for untyped third-party responses instead of spreading casts through business logic.
- Use
typing.overridewhere supported and let Pyright catch missing override markers. - Use
pathlib,subprocess.run(..., check=True)with fixed argument arrays, and structured exceptions. - Keep CLI output and API/client logic separated enough that tests can assert behavior without scraping terminal output.
- Treat
# type: ignore[...],# noqa: ..., and Ruff per-file ignores as review surfaces that require a reason. - Treat generated coverage and checker output as validation artifacts. The default profile writes mypy reports under
coverage/mypy, uses.cache/.ruff_cache,.cache/.mypy_cache,.cache/.pytest_cache, and lets pytest emit strict JUnit-compatible metadata when configured.
Validation Commands
Prefer repo-local scripts when present. Otherwise, run the equivalent direct commands:
ruff check scripts tests
ruff format --check scripts tests
mypy scripts tests
pyright scripts tests
pytest
python -m compileall -q -x "[\\/]\\." scripts tests
For npm-backed Python repositories, prefer:
npm run check:python
npm run lint:python
npm run typecheck:python
npm run test:python
npm run compile:python
Output
Finish with the strict configuration surfaces changed, the commands run, any remaining justified ignores, and any tool or interpreter prerequisite that blocked validation.
What ships with it: 7 files
44.7 KB alongside SKILL.md, 1 of them executable
agents/
- openai.yaml524 B
assets/
references/
- project-shapes.md5.3 KB
- strict-fix-patterns.md3.7 KB
- strict-tooling.md12.0 KB
scripts/
- audit_python_strict.pyruns14.0 KB
Gives 0 of the 12 instructions most quality gates skills give in ~1.1k tokens
Counted across 1,195 of the 2,094 authors here whose files we hold, read 2026-08-07
- Read the output and check the exit codein 54 of 1195, across 14 files
- Verify requirements using a line-by-line checklistin 53 of 1195, across 12 files
- Identify the verification command proving the claimin 51 of 1195, across 12 files
- Run the full verification commandin 50 of 1195, across 11 files
- Verify output confirms the claimin 49 of 1195, across 12 files
- Check version control diff after agent delegationin 46 of 1195, across 6 files
- State claim with evidencein 44 of 1195, across 4 files
- Run the test suitein 33 of 1195, across 26 files
- Keep state in memory by defaultin 27 of 1195, across 6 files
- Make prototype runnable with one commandin 26 of 1195, across 5 files
- Produce a verification reportin 25 of 1195, across 14 files
- Detect the package manager from lockfilesin 24 of 1195, across 5 files
Said here and by no other author read
- Prefer existing strict repo conventions
- Inventory Python entrypoints and roots
- Configure the project around one strict gate
- Fix code before ignoring strict diagnostics
- Keep ignores local and documented
- Align editor settings with repo config
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.