Make Program Tutorial
Inputs to Collect (ask if missing)
- Target topic:
- Library/SDK name (version optional), or
- The specific functions/classes/modules to cover
- Target audience (beginner vs experienced) and target language/runtime (Python/JS/etc.)
- Execution environment assumptions (OS, GPU/CPU, required services)
- Output directory (default:
<workspace>/tmp/tutorials/<tutorial-name>; if the user specifies a dir, prefer the user-provided one)
- Any constraints (no network, no secrets, offline-only, time budget, etc.)
Outputs (what to produce)
Default output directory:
<workspace>/tmp/tutorials/<tutorial-name>
Create the output directory with:
tut-<what>.md
scripts/ (end-to-end runnable scripts for this tutorial)
inputs/ (small tutorial-specific inputs, if applicable)
outputs/ (tutorial-specific outputs, if applicable)
In tut-<what>.md, include a YAML front matter block that records the runtime environment at the time the tutorial is created, including the base git commit hash of the workspace/repo.
Always provide end-to-end runnable scripts under scripts/ and have the tutorial instruct users to run those scripts (instead of embedding long code blocks in the doc).
Workflow
1) Identify the canonical sources
- Determine the authoritative docs/repo for the target API/library.
- Do not pin versions unless the user asks for it.
- If the tutorial is for a set of functions/classes in a local repo, read the source and identify:
- Import paths, initialization patterns, and required config
- Any side effects (I/O, network calls, GPU usage)
2) Choose a minimal “happy path”
- Define the smallest end-to-end example that demonstrates value:
- Inputs → processing → outputs
- Prefer real inputs if available; otherwise synthesize minimal inputs that satisfy the API contract.
- Record the exact commands used to run the example and the resulting artifacts.
3) Implement end-to-end scripts in scripts/
- Create one or more runnable scripts under
scripts/ that demonstrate the full “happy path”.
- Scripts must:
- Read inputs from
inputs/ (prefer real files; synthesize only if necessary and explain why)
- Write artifacts to
outputs/
- Print a concise success summary (paths written, key shapes/counts)
- Keep scripts as small as practical but runnable; prefer a single
scripts/run.py unless multiple steps are clearer.
4) Write tut-<what>.md (tutorial doc)
Choose a short, specific <what> (e.g., tut-httpx-basics.md, tut-onnxruntime-infer.md).
Follow the template in templates/tut-what.md:
- Start with a concrete Question (“How do I … using …?”).
- Add a Prerequisites checklist (do not teach setup in detail; assume prerequisites are already met).
- Add an Implementation Idea section with a short, high-level approach.
- Add Critical Example Code that is copy/pasteable and heavily commented to explain the usage step-by-step.
- Add Input and Output sections documenting the contract and showing representative examples (requests/responses, logs, artifacts).
- Keep code blocks self-contained and small; for the full implementation, point to
scripts/... and show the exact command(s) to run.
- Add YAML front matter capturing:
created_at (ISO8601), tutorial_name, topic
base_commit (workspace git commit hash)
runtime (OS, CPU/GPU, Python version, key package versions if relevant)
5) Include tutorial inputs/outputs
- Place tutorial-ready inputs under
inputs/.
- Place tutorial outputs under
outputs/.
- Keep them minimal and (when relevant) redistributable.
6) Add troubleshooting and verification
- Add a short “Troubleshooting” section with the top failure modes:
- Missing deps, version mismatches, device selection issues, path errors
- Add a “Verification” section:
- Exactly how to confirm outputs are correct (shapes, counts, sample prints, checksums)
Guardrails
- Do not include secrets/tokens or require users to paste credentials into the tutorial.
- Avoid “works on my machine” ambiguity: always include the exact commands and expected outputs/paths.
- Prefer stable, minimal dependencies; if multiple installation methods exist, pick one and mention alternatives briefly.
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: make-program-tutorial3description: Manual invocation only; use only when the user explicitly requests `make-program-tutorial` by exact name, OR when the user asks to use a skill to create an SDK/API/library tutorial. Create a clear, reproducible, step-by-step tutorial for a specific API/SDK/library (or a set of functions/classes), with runnable examples, expected outputs, and basic troubleshooting. Use when this capability is needed.4---56# Make Program Tutorial78## Inputs to Collect (ask if missing)910- Target topic:11 - Library/SDK name (version optional), or12 - The specific functions/classes/modules to cover13- Target audience (beginner vs experienced) and target language/runtime (Python/JS/etc.)14- Execution environment assumptions (OS, GPU/CPU, required services)15- Output directory (default: `<workspace>/tmp/tutorials/<tutorial-name>`; if the user specifies a dir, prefer the user-provided one)16- Any constraints (no network, no secrets, offline-only, time budget, etc.)1718## Outputs (what to produce)1920Default output directory:2122- `<workspace>/tmp/tutorials/<tutorial-name>`2324Create the output directory with:2526- `tut-<what>.md`27- `scripts/` (end-to-end runnable scripts for this tutorial)28- `inputs/` (small tutorial-specific inputs, if applicable)29- `outputs/` (tutorial-specific outputs, if applicable)3031In `tut-<what>.md`, include a YAML front matter block that records the runtime environment at the time the tutorial is created, including the base git commit hash of the workspace/repo.3233Always provide end-to-end runnable scripts under `scripts/` and have the tutorial instruct users to run those scripts (instead of embedding long code blocks in the doc).3435## Workflow3637### 1) Identify the canonical sources3839- Determine the authoritative docs/repo for the target API/library.40- Do not pin versions unless the user asks for it.41- If the tutorial is for a set of functions/classes in a local repo, read the source and identify:42 - Import paths, initialization patterns, and required config43 - Any side effects (I/O, network calls, GPU usage)4445### 2) Choose a minimal “happy path”4647- Define the smallest end-to-end example that demonstrates value:48 - Inputs → processing → outputs49- Prefer real inputs if available; otherwise synthesize minimal inputs that satisfy the API contract.50- Record the exact commands used to run the example and the resulting artifacts.5152### 3) Implement end-to-end scripts in `scripts/`5354- Create one or more runnable scripts under `scripts/` that demonstrate the full “happy path”.55- Scripts must:56 - Read inputs from `inputs/` (prefer real files; synthesize only if necessary and explain why)57 - Write artifacts to `outputs/`58 - Print a concise success summary (paths written, key shapes/counts)59- Keep scripts as small as practical but runnable; prefer a single `scripts/run.py` unless multiple steps are clearer.6061### 4) Write `tut-<what>.md` (tutorial doc)6263Choose a short, specific `<what>` (e.g., `tut-httpx-basics.md`, `tut-onnxruntime-infer.md`).6465Follow the template in `templates/tut-what.md`:66- Start with a concrete **Question** (“How do I … using …?”).67- Add a **Prerequisites** checklist (do not teach setup in detail; assume prerequisites are already met).68- Add an **Implementation Idea** section with a short, high-level approach.69- Add **Critical Example Code** that is copy/pasteable and heavily commented to explain the usage step-by-step.70- Add **Input and Output** sections documenting the contract and showing representative examples (requests/responses, logs, artifacts).71- Keep code blocks self-contained and small; for the full implementation, point to `scripts/...` and show the exact command(s) to run.72- Add YAML front matter capturing:73 - `created_at` (ISO8601), `tutorial_name`, `topic`74 - `base_commit` (workspace git commit hash)75 - `runtime` (OS, CPU/GPU, Python version, key package versions if relevant)7677### 5) Include tutorial inputs/outputs7879- Place tutorial-ready inputs under `inputs/`.80- Place tutorial outputs under `outputs/`.81- Keep them minimal and (when relevant) redistributable.8283### 6) Add troubleshooting and verification8485- Add a short “Troubleshooting” section with the top failure modes:86 - Missing deps, version mismatches, device selection issues, path errors87- Add a “Verification” section:88 - Exactly how to confirm outputs are correct (shapes, counts, sample prints, checksums)8990## Guardrails9192- Do not include secrets/tokens or require users to paste credentials into the tutorial.93- Avoid “works on my machine” ambiguity: always include the exact commands and expected outputs/paths.94- Prefer stable, minimal dependencies; if multiple installation methods exist, pick one and mention alternatives briefly.9596---97> Converted and distributed by [TomeVault](https://tomevault.io/claim/igamenovoer) — claim your Tome and manage your conversions.98<!-- tomevault:4.0:skill_md:2026-04-11 -->