Get the FREE Ultimate OpenClaw Setup Guide →

ln-751-command-templates

npx machina-cli add skill levnikolaevich/claude-code-skills/ln-751-command-templates --openclaw
Files (1)
SKILL.md
3.2 KB

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.

ln-751-command-templates

Type: L3 Worker Category: 7XX Project Bootstrap Parent: ln-750-commands-generator

Generates Claude Code commands from templates with variable substitution.


Overview

AspectDetails
InputTemplate name, variable values from ln-750
Output.claude/commands/{command}.md file
TemplatesLocated in references/ directory

Available Templates

TemplateOutput FileRequired
refresh_context_template.mdrefresh_context.mdAlways
refresh_infrastructure_template.mdrefresh_infrastructure.mdAlways
build_and_test_template.mdbuild-and-test.mdAlways
ui_testing_template.mdui-testing.mdIf Playwright
deploy_template.mddeploy.mdIf CI/CD
database_ops_template.mddatabase-ops.mdIf Database

Workflow

  1. Receive template name and variables from ln-750
  2. Load template from references/{template}.md
  3. Substitute all {{VARIABLE}} placeholders
  4. Write to .claude/commands/ directory
  5. Report success/failure to coordinator

Variable Syntax

All templates use Handlebars-style syntax: {{VARIABLE_NAME}}

Common variables:

  • {{PROJECT_NAME}} — Project name
  • {{FRONTEND_ROOT}} — Frontend source path
  • {{BACKEND_ROOT}} — Backend source path
  • {{FRONTEND_PORT}} — Frontend dev server port
  • {{BACKEND_PORT}} — Backend API port
  • {{TECH_STACK}} — Technology stack summary

MANDATORY READ: Load templates from references/ for full variable lists.


Critical Rules

  • Template-driven only: All output generated from references/ templates, never freeform
  • Full substitution: Every {{VARIABLE}} must be replaced; fail if any placeholder unresolved
  • Write to correct path: Output always goes to .claude/commands/, never elsewhere
  • No template modification: Templates in references/ are read-only; only output files are written

Definition of Done

  • Template loaded from references/{template}.md
  • All {{VARIABLE}} placeholders substituted with values from ln-750
  • Output written to .claude/commands/{command}.md
  • Success/failure reported back to coordinator

Reference Files


Version: 2.0.0 Last Updated: 2026-01-10

Source

git clone https://github.com/levnikolaevich/claude-code-skills/blob/master/ln-751-command-templates/SKILL.mdView on GitHub

Overview

Generates Claude Code commands from templates with variable substitution. It loads templates from the references/ directory and writes final .claude/commands/{command}.md files by substituting {{VARIABLE}} placeholders with values provided by ln-750.

How This Skill Works

Receive the template name and variables from ln-750, load the template from references/{template}.md, perform Handlebars-style substitutions for all {{VARIABLE}} placeholders, then write the resulting file to .claude/commands/{command}.md and report the outcome to the coordinator.

When to Use It

  • When you need standardized Claude command definitions for a project using templates located in references/.
  • When you have dynamic values from ln-750 and require consistent, template-driven outputs.
  • When ensuring full substitution of all placeholders to avoid unresolved {{VARIABLE}}s.
  • When you must write outputs strictly to the .claude/commands/ directory and not elsewhere.
  • When generating command files for common tasks like refresh_context, build-and-test, deploy, and UI testing.

Quick Start

  1. Step 1: Provide the template name (e.g., build_and_test_template) and all required variables via ln-750.
  2. Step 2: The system loads references/{template}.md and substitutes all {{VARIABLE}} placeholders.
  3. Step 3: The final file is written to .claude/commands/{command}.md and success/failure is reported.

Best Practices

  • Ensure the required templates exist in references/ before running the workflow.
  • Verify that every {{VARIABLE}} placeholder is replaced; fail if any remain unresolved.
  • Do not modify templates in references/; treat them as read-only sources.
  • Output should always be written to .claude/commands/{command}.md.
  • Provide complete variable values via ln-750 (e.g., PROJECT_NAME, FRONTEND_ROOT, BACKEND_ROOT, ports, TECH_STACK).

Example Use Cases

  • Generate refresh_context.md from references/refresh_context_template.md with PROJECT_NAME and paths, producing .claude/commands/refresh_context.md.
  • Generate refresh_infrastructure.md from references/refresh_infrastructure_template.md to refresh infrastructure commands.
  • Create build-and-test.md from references/build_and_test_template.md for a CI/CD workflow in .claude/commands.
  • Produce ui-testing.md from references/ui_testing_template.md when Playwright is enabled, output to .claude/commands/ui-testing.md.
  • Generate deploy.md from references/deploy_template.md to define deployment steps for CI/CD.

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers