Extract Python examples from markdown docs and run them (including LLM examples). Use when validating documentation, after doc changes, or to verify all doc examples execute correctly.
88
82%
Does it follow best practices?
Impact
100%
1.51xAverage score across 3 eval scenarios
Passed
No known issues
Extracts Python code blocks from markdown files and runs each example. LLM examples (llmPrompt, LLMPrompt, etc.) run as-is—they make real API calls when Ollama/OpenAI/Anthropic are configured.
Use .venv. Run via .venv/bin/python or activate with source .venv/bin/activate.
Recommended (pytest): Run from the project root:
pytest tests/test_doc_examples.py -vAlternative (CLI):
run_doc_examplesOr via the skill script:
.venv/bin/python .cursor/skills/run-documentation-examples/scripts/run_documentation_examples.pyWhen running via the agent: Request full_network permissions so the sandbox allows connections to localhost (Ollama) and external APIs (OpenAI, Anthropic).
The pytest approach gives standard test output; run-doc-examples extracts examples, generates extracted_examples.py, and runs it (supports resume via .extracted_examples_fail_index).
.venv/bin/python scripts/extract_documentation_examples.py
.venv/bin/python extracted_examples.pyTo skip doc examples when Ollama is unavailable: pytest tests/ -m "not requires_ollama"
ollama serve running; ollama pull llama3.2 (and mxbai-embed-large for embedding examples)TALKPIPE_openai_api_key or configpip install talkpipe[ollama] (or [openai], [anthropic], [all])The runner exits on first failure and writes .extracted_examples_fail_index with the failed example index. Run again to retry from that point. Delete the file to start from the beginning.
0cf1686
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.