Skill: athola/nm-scribe-tech-tutorial (version 1.0.2)

--- name: tech-tutorial description: Plan, draft, and refine technical tutorials for developers version: 1.9.5 triggers: - tutorial - technical-writing - code-examples - developer-docs - getting-started metadata: {"openclaw": {"homepage": "https://github.com/athola/claude-night-market/tree/master/plugins/scribe", "emoji": "\ud83e\udd9e", "requires": {"config": ["night-market.scribe:shared", "night-market.scribe:slop-detector"]}}} source: claude-night-market source_plugin: scribe --- > **Night Market Skill** — ported from [claude-night-market/scribe](https://github.com/athola/claude-night-market/tree/master/plugins/scribe). For the full experience with agents, hooks, and commands, install the Claude Code plugin. # Tech Tutorial A good technical tutorial has one goal: move a reader from not knowing how to do something to being able to do it. That requires working code, concrete steps, and honest acknowledgment of where things go wrong. This skill guides you through outlining, drafting, and verifying a tutorial that meets that standard. ## When To Use - Writing a getting-started guide for a library, CLI tool, or API - Creating a step-by-step walkthrough that readers follow at a terminal - Explaining a technical concept through a hands-on exercise - Producing a how-to that complements API reference documentation ## When NOT To Use - Generating API reference docs (use `scribe:doc-generator`) - Cleaning up existing prose (use `scribe:slop-detector`) - Producing high-level architecture overviews without runnable steps - Writing conceptual essays without hands-on components ## Methodology ### Step 1: Scope and Audience Before writing a single line, answer these questions: - Who is this for? (experience level, assumed prior knowledge) - What will they build or accomplish by the end? - What is the single prerequisite the reader must have installed? - What is explicitly out of scope? Write these answers down as a header block in the draft. If you cannot answer the "what will they accomplish" question in one sentence, the scope is too broad. ### Step 2: Outline Load: `@modules/outline-structure.md` Produce a section-by-section outline before drafting prose. Each section entry must include a one-line description of what the reader does or learns in that section. See the outline module for the standard section order and length targets per section type. ### Step 3: Draft Code Examples First Load: `@modules/code-examples.md` Write the code before the prose. Each snippet must run against a real environment before it appears in the tutorial. Annotate only the non-obvious lines. See the code examples module for formatting and error-handling rules. ### Step 4: Draft Prose Around the Code Prose exists to explain what the code does and why. Follow these rules: - One paragraph per step: what to run, what it does, what to expect - State the expected output after each command block - Use second person ("you") consistently throughout - Do not narrate what the reader will do next; just present the next step ### Step 5: Build Complexity Gradually Load: `@modules/progressive-complexity.md` Start with the minimal working example. Introduce variations and edge cases only after the baseline works. See the progressive complexity module for the layering rules and pacing guidance. ### Step 6: Slop Check After drafting, run: ``` Skill(scribe:slop-detector) ``` Fix all tier-1 findings before proceeding. Pay particular attention to: - Tier-1 vocabulary slop (see `scribe:slop-detector` word lists) - Tricolon adjective clusters ("fast, efficient, and reliable") - Participial tail-loading (sentences ending with ", enabling ...") ### Step 7: Quality Gate Verify the completed tutorial against this checklist: - [ ] All code blocks tested and produce the stated output - [ ] Prerequisites section lists exact versions where relevant - [ ] Every step states the expected result - [ ] Troubleshooting section covers at least two common failure modes - [ ] No tier-1 slop words - [ ] Em dash count is under 2 per 1000 words - [ ] Bullet ratio is under 40% - [ ] Line length wraps at 80 characters ## Required TodoWrite Items 1. `tech-tutorial:scope-defined` - Audience, goal, and out-of-scope noted 2. `tech-tutorial:outline-approved` - Section outline confirmed 3. `tech-tutorial:code-tested` - All snippets verified against a real env 4. `tech-tutorial:prose-drafted` - Walkthrough text written 5. `tech-tutorial:slop-scanned` - Slop detector passed 6. `tech-tutorial:quality-verified` - Quality gate checklist cleared 7. `tech-tutorial:user-approved` - Final approval received ## Module Reference - See `modules/outline-structure.md` for section order and length targets - See `modules/code-examples.md` for snippet formatting and annotation rules - See `modules/progressive-complexity.md` for pacing and layering guidance ## Integration with Other Skills | Skill | When to Use | |-------|-------------| | scribe:slop-detector | After drafting, before approval | | scribe:doc-generator | For companion API reference sections | | scribe:style-learner | To match an existing tutorial voice | ## Exit Criteria - Tutorial outline confirmed before drafting begins - All code snippets tested in a real environment - Slop score below 1.5 (clean) - Quality gate checklist passed - User approval received

path: modules/code-examples.md
content: ---
module: code-examples
category: artifact-generation
dependencies: []
estimated_tokens: 550
---

# Writing Effective Code Examples

Code examples are the primary content of a technical tutorial.
Write and run each snippet before embedding it in the document.
A tutorial with untested code is broken.

## The Testing Rule

Every code block that the reader is expected to run must be tested
in a real environment before publication.
This means:

1. Run the command in a clean shell or container
2. Confirm the output matches what you claim
3. Record the exact output to quote in the tutorial
4. Note any version-specific behavior

If you cannot test a snippet, mark it clearly as untested:

```markdown
<!-- Note: untested on Windows; verified on macOS 14.3 -->
```

Never present guessed output as verified.

## Formatting Rules

Use fenced code blocks with a language identifier on every block:

```markdown
```bash
npm install express
```
```

Common language identifiers:

| Content Type | Identifier |
|--------------|------------|
| Shell commands | `bash` |
| Python | `python` |
| JavaScript/Node | `javascript` |
| YAML config | `yaml` |
| JSON output | `json` |
| Generic output | `text` |

Do not use `sh` as an identifier; use `bash` or `zsh` explicitly.

## Output Blocks

Show expected output after every command that produces visible output.
Use a `text` block with the label "Output:" on its own line:

```markdown
Run the server:

```bash
node server.js
```

Output:

```text
Server running on http://localhost:3000
```
```

If output is long, truncate with `...` and show the key lines:

```text
Downloading packages...
...
Successfully installed 14 packages in 2.3s
```

## Annotation Guidelines

Annotate only the non-obvious parts.
Over-annotation creates noise that pushes readers past the code.

Good annotation targets:

- A flag or option whose name does not explain itself
- A value the reader must substitute for their own
- A syntax form they may not have seen before

Mark substitution points with angle brackets:

```bash
git remote add origin [REDACTED_SECRET]:<your-username>/<repo-name>.git
```

Do not annotate things that the code makes self-evident.

## Handling Errors in Examples

When showing an expected error (to teach debugging), be explicit:

```markdown
Running this command before installing dependencies will fail:

```bash
node server.js
```

Output:

```text
Error: Cannot find module 'express'
```

Install dependencies first, then retry.
```

Never silently show error output without explaining it.

## Long Code Example Handling

For files longer than 30 lines, show only the relevant portion:

```markdown
In `config/database.js`, update the connection string (line 12):

```javascript
// config/database.js (excerpt)
const connection = {
  host: process.env.DB_HOST,
  port: 5432,
  database: process.env.DB_NAME,
};
```
```

Provide a link to the full file in a repository if one exists.

## Verify Your Examples Work

Before including any example, run this checklist:

- [ ] Command produces the stated output
- [ ] Tested in the same environment as the reader will use
- [ ] Language identifier is present on the fenced block
- [ ] Output block follows every command with visible output
- [ ] Substitution points use angle bracket notation
- [ ] Untested blocks carry an explicit disclaimer


path: modules/outline-structure.md
content: ---
module: outline-structure
category: artifact-generation
dependencies: []
estimated_tokens: 500
---

# Tutorial Outline and Structure

A tutorial outline is a contract with the reader: it says what they
will do and in what order.
Write the outline before drafting any prose.
If an outline entry is hard to describe in one line, the section
is too large and needs splitting.

## Standard Section Order

Most technical tutorials follow this sequence:

1. **Title** - What the reader will build or accomplish
2. **Prerequisites** - What they must have installed or know
3. **What You Will Build** - One paragraph, concrete outcome
4. **Setup** - Environment configuration steps
5. **Core Steps** - The numbered sequence of actions
6. **Verify It Works** - How to confirm success
7. **Troubleshooting** - Two to four common failure modes
8. **Next Steps** - One or two natural follow-on tasks

Not every tutorial needs all eight sections.
Short tutorials (under 500 words) can omit Next Steps and
merge Verify with the final core step.

## Length Targets per Section

| Section | Target Length |
|---------|---------------|
| Title | 5-10 words |
| Prerequisites | 30-60 words |
| What You Will Build | 50-100 words |
| Setup | 50-150 words |
| Each Core Step | 30-80 words |
| Verify It Works | 30-60 words |
| Troubleshooting | 50-150 words |
| Next Steps | 20-40 words |

## Prerequisite Section Rules

State prerequisites as a list of specific, verifiable items.
Vague prerequisites waste the reader's time.

```markdown
BAD:
- Basic programming knowledge
- Familiarity with the command line

GOOD:
- Python 3.11 or later (`python3 --version`)
- A GitHub account with SSH access configured
- `curl` available on your system
```

Each prerequisite should be verifiable in under 30 seconds.
If the reader cannot confirm it with a single command, add
the command.

## Core Steps Structure

Each step in the numbered sequence should follow this pattern:

1. One sentence describing what the reader does
2. The command or code block to run
3. The expected output or result (required for commands)
4. One optional sentence explaining why, if non-obvious

Keep explanatory prose after the code, not before it.
The reader runs first, then reads why.

## Troubleshooting Section

Cover the two to four errors most likely to occur.
Structure each entry as:

```markdown
### Error: [exact error message or symptom]

**Cause**: [one sentence]

**Fix**: [one to three steps]
```

Do not include every possible error.
Focus on the errors that newcomers hit in the first ten minutes.

## Outline Validation Checklist

Before drafting:

- [ ] Every section has a one-line description of reader action
- [ ] Prerequisites are specific and verifiable
- [ ] Core steps are numbered and ordered
- [ ] Troubleshooting has at least two entries planned
- [ ] Total planned length is under 2000 words for a starter guide


path: modules/progressive-complexity.md
content: ---
module: progressive-complexity
category: artifact-generation
dependencies: []
estimated_tokens: 480
---

# Building Complexity Gradually

The most common tutorial failure is starting too hard.
The reader gets lost before the baseline works, gives up, and
blames the tool.
Start with the minimum that produces a visible result.
Add variation only after that baseline is solid.

## The Minimal Example First

The first working example should be the shortest possible program
that demonstrates the core concept.
It need not be production-quality; it must be correct and runnable.

```markdown
BAD: Start with a full web server including auth, logging,
and database connections.

GOOD: Start with a server that returns "Hello, World!" on port 3000.
```

The minimal example answers one question: does this thing work?
Once the reader sees it working, they are ready to learn more.

## The Layering Model

Introduce complexity in layers.
Each layer adds one new concept or one new component.
A reader should be able to stop at any layer and have
a working system.

Layer pattern:

1. **Baseline** - The minimal working example
2. **First extension** - Add one realistic feature
3. **Second extension** - Add error handling or configuration
4. **Production pattern** - Show what the real thing looks like

Not every tutorial needs all four layers.
A focused tutorial may only need baseline plus one extension.

## Pacing Rules

- Complete one layer before describing the next
- State what you are about to add before adding it
- Do not introduce two new concepts in a single step
- Run the code after each layer to show it still works

```markdown
BAD:
"Now we will add authentication, a database connection,
and rate limiting..."

GOOD:
"The server works. Now add a database connection.
Authentication comes in the next section."
```

## When to Introduce Alternatives

Introduce alternative approaches only after the primary path works.
The reader needs one good path before they can evaluate tradeoffs.

```markdown
BAD: "You could use Redis or Memcached or an in-memory store here."

GOOD: "We use Redis here. Once this works, see [link] for
the Memcached variant."
```

## Complexity Signals to Watch For

Signs that a section has become too complex:

- A step has more than one code block with no "run this" between them
- You are explaining a concept that requires another concept first
- The expected output section requires more prose than the step itself
- You find yourself writing "before we continue, you should know..."

When you see these signals, split the section or move the prerequisite
knowledge into the Prerequisites section.

## End-State Clarity

The reader must know what they are building toward before they start.
State the end state in the "What You Will Build" section as a concrete
description, not a list of features:

```markdown
BAD:
"You will learn authentication, sessions, and middleware."

GOOD:
"By the end of this tutorial, you will have a Node.js server
that accepts a username and password, issues a signed JWT,
and rejects requests without a valid token."
```

The end state should be verifiable: the reader can check that they
achieved it by running one command or visiting one URL.


Security scan verdicts — ClawScan: clean | static analysis: clean | VirusTotal: clean | SkillSpector: clean (LOW)