بنقرة واحدة
doc-codeblock-tests
Validate Python code blocks in Markdown documentation using pytest-codeblock.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Validate Python code blocks in Markdown documentation using pytest-codeblock.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Migrate Python repositories from mypy to ty for static type checking.
Bootstrap repository governance by creating AGENTS.md and a standard set of SKILL.md files.
Create and modify repository-specific SKILL.md policy files in strict compliance with AGENTS.md and existing project skills.
Migrate Python repositories from virtualenv, virtualenvwrapper, pip-tools, requirements files, setup.py, or setup.cfg to a uv-managed pyproject.toml and uv.lock workflow.
Keep project documentation aligned with code by detecting and auto-fixing mismatches using agent-based analysis.
| name | doc-codeblock-tests |
| description | Validate Python code blocks in Markdown documentation using pytest-codeblock. |
This skill enforces correctness of Python code examples in Markdown (.md) files
by executing them as tests using pytest-codeblock.
Broken documentation examples are treated as test failures.
*.md).rst) is explicitly out of scopeAll Python code blocks in Markdown MUST:
test_… prefixExample (guaranteed-valid, stdlib-only):
```python name=test_pathlib_basics
from pathlib import Path
p = Path("example.txt")
assert p.name == "example.txt"
assert p.suffix == ".txt"
assert p.parent == Path(".")
```
Unnamed Python code blocks are invalid.
Each grouped example still requires named blocks and must be valid when concatenated.
pytest-codeblockNo special configuration is required unless the project explicitly defines it.
This skill is not standalone.
When modifying documentation:
This integrates automatically with the repository’s dev-workflow (or similar)
definition of “done”.
You must NOT:
test_… names to avoid collectionDocumentation correctness is enforced, not optional.
Documentation is treated as a first-class, executable contract. If users can copy it, it must run.