원클릭으로
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.