Paths: File paths (shared/, references/, ../ln-*) are relative to skills repo root. If not found at CWD, locate this SKILL.md directory and go up one level for repo root. If shared/ is missing, fetch files via WebFetch from https://raw.githubusercontent.com/levnikolaevich/claude-code-skills/master/skills/{path}.
ln-161-skill-creator
Type: L3 Worker (standalone-capable)
Category: 1XX Documentation Pipeline
Creates .claude/commands/*.md slash command files from procedural documentation sections. It converts procedural prose into imperative command instructions without changing the source docs.
Overview
| Aspect |
Details |
| Input |
Approved procedural sections or standalone docs scan |
| Output |
.claude/commands/*.md files in target project |
| Template |
references/command_template.md |
| Read mode |
Section-first markdown reading |
Input Modes
| Mode |
Trigger |
Behavior |
| Provided sections |
Context contains approved_sections |
Use supplied sections directly |
| Standalone |
Invoked directly with $ARGUMENTS |
Self-discover, classify, and create commands |
Standalone Discovery
When invoked without approved_sections:
- Read
shared/references/procedural_extraction_rules.md, shared/references/procedural_skill_sop_guide.md, shared/references/markdown_read_protocol.md, and shared/references/docs_quality_contract.md
- Scan docs-first sources:
docs/**/*.md
tests/README.md
tests/manual/**/*
README.md
CONTRIBUTING.md
- Use
AGENTS.md, CLAUDE.md, and docs/project/.context/doc_registry.json only to route discovery
- Classify candidate sections with the shared procedural extraction rules
- Present the extraction plan to the user for approval
- Create approved commands
Workflow
Phase 1: Prepare
Receive or build this normalized input:
{
"approved_sections": [
{
"source_file": "docs/project/runbook.md",
"section_header": "Deployment",
"line_range": [45, 92],
"command_name": "deploy.md",
"doc_kind": "how-to",
"doc_role": "canonical"
}
]
}
MANDATORY READ: Load references/command_template.md and shared/references/procedural_skill_sop_guide.md
Phase 2: Transform and Create
For each approved section:
- Read the source section using the shared markdown read protocol
- Ignore standardized doc shell content if it appears in the selected range:
- header markers such as
DOC_KIND, DOC_ROLE, READ_WHEN, SKIP_WHEN, PRIMARY_SOURCES
Quick Navigation
Agent Entry
Maintenance
- Detect
allowed-tools
| Content Pattern |
Tool |
shell commands or fenced bash / sh blocks |
Bash |
| file reads or config inspection |
Read |
| file updates |
Edit |
| search steps |
Grep, Glob |
| skill calls |
Skill |
| approval gates |
AskUserQuestion |
- Transform the content with these rules:
| Rule |
From |
To |
| Voice |
Declarative prose |
Imperative instructions |
| Code blocks |
Source shell blocks |
Preserve when executable |
| Numbered lists |
Doc prose |
Ordered workflow steps |
| Verification |
Implicit expectations |
Explicit verification checks |
| Risky procedural steps |
Hidden assumptions |
Action, key point, why, evidence, exception, automation/guard |
| Decision points |
Blended into prose |
Explicit IF/ELSE branch with evidence required per branch |
| Dependencies/preflight |
Assumed environment |
First executable self-check before mutation or external invocation |
| Exceptions |
Implied troubleshooting |
Concrete pause/retry/ask path |
| Doc shell |
Metadata and navigation |
Remove |
| Source provenance |
Implied only |
Explicit Source section |
| Related docs |
Inline refs |
Related Documentation section |
- Write
.claude/commands/{command_name} if the file does not already exist
Phase 3: Report
Return:
created:
- file: .claude/commands/deploy.md
source: docs/project/runbook.md#Deployment
lines: 85
tools: [Bash, Read]
summary: "Created 1 command from 1 procedural section"
Critical Rules
- Template-driven: All output follows
references/command_template.md.
- Preserve source: Never modify or delete source docs.
- No invention: Do not add commands, steps, or paths absent from the source.
- Imperative voice: Every retained instruction must be actionable.
- SOP/TWI extraction: Preserve action, decision point, exception, validation, dependency/preflight, and why for risky procedural steps.
- No copied doc shell: Do not copy
DOC_KIND, DOC_ROLE, Quick Navigation, Agent Entry, or Maintenance into commands.
- Source provenance: Every generated command must point back to its source doc and section.
- Relative paths: File references must stay relative to project root.
- Idempotent: Skip existing command files; do not overwrite them.
Definition of Done
Version: 1.0.0
Last Updated: 2026-03-26
1---2name: ln-161-skill-creator-23description: Creates slash commands from procedural doc sections. Use when transforming documentation prose into executable commands.4license: MIT5---6
7> **Paths:** File paths (`shared/`, `references/`, `../ln-*`) are relative to skills repo root. If not found at CWD, locate this SKILL.md directory and go up one level for repo root. If `shared/` is missing, fetch files via WebFetch from `https://raw.githubusercontent.com/levnikolaevich/claude-code-skills/master/skills/{path}`.
8
9# ln-161-skill-creator
10
11**Type:** L3 Worker (standalone-capable)
12**Category:** 1XX Documentation Pipeline
13
14Creates `.claude/commands/*.md` slash command files from procedural documentation sections. It converts procedural prose into imperative command instructions without changing the source docs.
15
16---
17
18## Overview
19
20| Aspect | Details |
21|--------|---------|
22| **Input** | Approved procedural sections or standalone docs scan |
23| **Output** | `.claude/commands/*.md` files in target project |
24| **Template** | `references/command_template.md` |
25| **Read mode** | Section-first markdown reading |
26
27---
28
29## Input Modes
30
31| Mode | Trigger | Behavior |
32|------|---------|----------|
33| **Provided sections** | Context contains `approved_sections` | Use supplied sections directly |
34| **Standalone** | Invoked directly with `$ARGUMENTS` | Self-discover, classify, and create commands |
35
36### Standalone Discovery
37
38When invoked without `approved_sections`:
391. Read `shared/references/procedural_extraction_rules.md`, `shared/references/procedural_skill_sop_guide.md`, `shared/references/markdown_read_protocol.md`, and `shared/references/docs_quality_contract.md`
402. Scan docs-first sources:
41 - `docs/**/*.md`
42 - `tests/README.md`
43 - `tests/manual/**/*`
44 - `README.md`
45 - `CONTRIBUTING.md`
463. Use `AGENTS.md`, `CLAUDE.md`, and `docs/project/.context/doc_registry.json` only to route discovery
474. Classify candidate sections with the shared procedural extraction rules
485. Present the extraction plan to the user for approval
496. Create approved commands
50
51---
52
53## Workflow
54
55### Phase 1: Prepare
56
57Receive or build this normalized input:
58
59```json
60{
61 "approved_sections": [
62 {
63 "source_file": "docs/project/runbook.md",
64 "section_header": "Deployment",
65 "line_range": [45, 92],
66 "command_name": "deploy.md",
67 "doc_kind": "how-to",
68 "doc_role": "canonical"
69 }
70 ]
71}
72```
73
74**MANDATORY READ:** Load `references/command_template.md` and `shared/references/procedural_skill_sop_guide.md`
75
76### Phase 2: Transform and Create
77
78For each approved section:
79
801. Read the source section using the shared markdown read protocol
812. Ignore standardized doc shell content if it appears in the selected range:
82 - header markers such as `DOC_KIND`, `DOC_ROLE`, `READ_WHEN`, `SKIP_WHEN`, `PRIMARY_SOURCES`
83 - `Quick Navigation`
84 - `Agent Entry`
85 - `Maintenance`
863. Detect `allowed-tools`
87
88| Content Pattern | Tool |
89|----------------|------|
90| shell commands or fenced `bash` / `sh` blocks | Bash |
91| file reads or config inspection | Read |
92| file updates | Edit |
93| search steps | Grep, Glob |
94| skill calls | Skill |
95| approval gates | AskUserQuestion |
96
974. Transform the content with these rules:
98
99| Rule | From | To |
100|------|------|----|
101| Voice | Declarative prose | Imperative instructions |
102| Code blocks | Source shell blocks | Preserve when executable |
103| Numbered lists | Doc prose | Ordered workflow steps |
104| Verification | Implicit expectations | Explicit verification checks |
105| Risky procedural steps | Hidden assumptions | Action, key point, why, evidence, exception, automation/guard |
106| Decision points | Blended into prose | Explicit IF/ELSE branch with evidence required per branch |
107| Dependencies/preflight | Assumed environment | First executable self-check before mutation or external invocation |
108| Exceptions | Implied troubleshooting | Concrete pause/retry/ask path |
109| Doc shell | Metadata and navigation | Remove |
110| Source provenance | Implied only | Explicit `Source` section |
111| Related docs | Inline refs | `Related Documentation` section |
112
1135. Write `.claude/commands/{command_name}` if the file does not already exist
114
115### Phase 3: Report
116
117Return:
118
119```yaml
120created:
121 - file: .claude/commands/deploy.md
122 source: docs/project/runbook.md#Deployment
123 lines: 85
124 tools: [Bash, Read]
125summary: "Created 1 command from 1 procedural section"
126```
127
128---
129
130## Critical Rules
131
132- **Template-driven:** All output follows `references/command_template.md`.
133- **Preserve source:** Never modify or delete source docs.
134- **No invention:** Do not add commands, steps, or paths absent from the source.
135- **Imperative voice:** Every retained instruction must be actionable.
136- **SOP/TWI extraction:** Preserve action, decision point, exception, validation, dependency/preflight, and why for risky procedural steps.
137- **No copied doc shell:** Do not copy `DOC_KIND`, `DOC_ROLE`, `Quick Navigation`, `Agent Entry`, or `Maintenance` into commands.
138- **Source provenance:** Every generated command must point back to its source doc and section.
139- **Relative paths:** File references must stay relative to project root.
140- **Idempotent:** Skip existing command files; do not overwrite them.
141
142## Definition of Done
143
144- [ ] Approved sections received or discovered
145- [ ] Source sections read with section-first protocol
146- [ ] Allowed-tools detected per command
147- [ ] Content transformed into imperative workflow steps
148- [ ] Risky procedural steps include action, key point, why, evidence, exception, and automation/guard where applicable
149- [ ] Standard doc shell content removed from command output
150- [ ] Source provenance included in each created command
151- [ ] Existing command files not overwritten
152- [ ] Creation report returned
153
154---
155
156**Version:** 1.0.0
157**Last Updated:** 2026-03-26