ln-161-skill-creator
Creates slash commands from procedural doc sections. Use when transforming documentation prose into executable commands.
What this skill does
> **Paths:** File paths (`references/`, `../ln-*`) are relative to this skill directory.
# 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/templates/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`:
1. Read `references/procedural_extraction_rules.md`, `references/procedural_skill_sop_guide.md`, `references/markdown_read_protocol.md`, and `references/docs_quality_contract.md`
2. Scan docs-first sources:
- `docs/**/*.md`
- `tests/README.md`
- `tests/manual/**/*`
- `README.md`
- `CONTRIBUTING.md`
3. Use `AGENTS.md`, `CLAUDE.md`, and `docs/project/.context/doc_registry.json` only to route discovery
4. Classify candidate sections with the shared procedural extraction rules
5. Present the extraction plan to the user for approval
6. Create approved commands
---
## Workflow
### Phase 1: Prepare
Receive or build this normalized input:
```json
{
"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/templates/command_template.md` and `references/procedural_skill_sop_guide.md`
### Phase 2: Transform and Create
For each approved section:
1. Read the source section using the shared markdown read protocol
2. 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`
3. 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 |
4. 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 |
5. Write `.claude/commands/{command_name}` if the file does not already exist
### Phase 3: Report
Return:
```yaml
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/templates/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
- [ ] Approved sections received or discovered
- [ ] Source sections read with section-first protocol
- [ ] Allowed-tools detected per command
- [ ] Content transformed into imperative workflow steps
- [ ] Risky procedural steps include action, key point, why, evidence, exception, and automation/guard where applicable
- [ ] Standard doc shell content removed from command output
- [ ] Source provenance included in each created command
- [ ] Existing command files not overwritten
- [ ] Creation report returned
---
**Version:** 1.0.0
**Last Updated:** 2026-03-26
Related in Writing & Docs
jax-development
IncludedUse this skill when the user is writing, debugging, profiling, refactoring, reviewing, benchmarking, parallelising, exporting, or explaining JAX code, or when they mention JAX, jax.numpy, jit, grad, value_and_grad, vmap, scan, lax, random keys, pytrees, jax.Array, sharding, Mesh, PartitionSpec, NamedSharding, pmap, shard_map, Pallas, XLA, StableHLO, checkify, profiler, or the JAX repo. It helps turn NumPy or PyTorch-style code into pure functional JAX, fix tracer/control-flow/shape/PRNG bugs, remove recompiles and host-device syncs, choose transforms and sharding strategies, inspect jaxpr/lowering/IR, and benchmark compiled code correctly.
nature-article-writer
IncludedDrafts, rewrites, diagnostically critiques, and style-calibrates primary research manuscripts for Nature and Nature Portfolio journals. Use when the user wants a Nature-style title, summary paragraph or abstract, introduction, results, discussion, methods, figure legends, presubmission enquiry, cover letter, reviewer response, or when a scientific draft sounds generic, jargon-heavy, structurally weak, or AI-ish and needs precise, broad-reader-friendly prose without inventing data, analyses, or references. Best for primary research articles and letters rather than reviews or press releases unless explicitly adapting one.
deckrd
IncludedDocument-driven framework that derives requirements, specifications, implementation plans, and executable tasks from goals through structured AI dialogue. Use when user says "write requirements", "create spec", "plan implementation", "derive tasks", "structure this feature", "break down into tasks", or "document this module". Also use for reverse engineering existing code into docs (/deckrd rev). Do NOT use for direct code writing — use /deckrd-coder after tasks are generated. Do NOT use when the user only wants to run or fix existing code without planning.
clinical-decision-support
IncludedGenerate professional clinical decision support (CDS) documents for pharmaceutical and clinical research settings, including patient cohort analyses (biomarker-stratified with outcomes) and treatment recommendation reports (evidence-based guidelines with decision algorithms). Supports GRADE evidence grading, statistical analysis (hazard ratios, survival curves, waterfall plots), biomarker integration, and regulatory compliance. Outputs publication-ready LaTeX/PDF format optimized for drug development, clinical research, and evidence synthesis.
handling-sf-data
IncludedSalesforce data operations with 130-point scoring. Use this skill to create, update, delete, bulk import/export, generate test data, and clean up org records using sf CLI and anonymous Apex. TRIGGER when: user creates test data, performs bulk import/export, uses sf data CLI commands, needs data factory patterns for Apex tests, or needs to seed/clean records in a Salesforce org. DO NOT TRIGGER when: SOQL query writing only (use querying-soql), Apex test execution (use running-apex-tests), or metadata deployment (use deploying-metadata).
accelint-ac-to-playwright
IncludedConvert and validate acceptance criteria for Playwright test automation. Use when user asks to (1) review/evaluate/check if AC are ready for automation, (2) assess if AC can be converted as-is, (3) validate AC quality for Playwright, (4) turn AC into tests, (5) generate tests from acceptance criteria, (6) convert .md bullets or .feature Gherkin files to Playwright specs, (7) create test automation from requirements. Handles both bullet-style markdown and Gherkin syntax with JSON test plan generation and validation.