home / skills / levnikolaevich / claude-code-skills / ln-750-commands-generator

ln-750-commands-generator skill

/ln-750-commands-generator

This skill analyzes project structure to generate .claude/commands/*.md using templates and variables, enabling Claude Code workflows.

npx playbooks add skill levnikolaevich/claude-code-skills --skill ln-750-commands-generator

Review the files below or copy the command above to add this skill to your agents.

Files (4)
SKILL.md
3.2 KB
---
name: ln-750-commands-generator
description: Generates project-specific .claude/commands for Claude Code
---

> **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-750-commands-generator

**Type:** L2 Domain Coordinator
**Category:** 7XX Project Bootstrap
**Parent:** ln-700-project-bootstrap

Generates `.claude/commands/` with project-specific Claude Code commands.

---

## Overview

| Aspect | Details |
|--------|---------|
| **Input** | Project structure, tech stack |
| **Output** | .claude/commands/*.md files |
| **Worker** | ln-751-command-templates |

---

## Workflow

1. **Analyze** project structure and detect tech stack
2. **Extract** variables (paths, ports, frameworks)
3. **Delegate** to ln-751 with template name and variables
4. **Verify** generated commands exist

---

## Generated Commands

| Command | Purpose | Condition |
|---------|---------|-----------|
| refresh_context.md | Restore project context | Always |
| refresh_infrastructure.md | Restart services | Always |
| build-and-test.md | Full verification | Always |
| ui-testing.md | UI tests with Playwright | If Playwright detected |
| deploy.md | Deployment workflow | If CI/CD config exists |
| database-ops.md | Database operations | If database detected |

---

## Variables Extracted

| Variable | Source | Example |
|----------|--------|---------|
| `{{PROJECT_NAME}}` | package.json / .csproj | "my-app" |
| `{{TECH_STACK}}` | Auto-detected | "React + .NET + PostgreSQL" |
| `{{FRONTEND_ROOT}}` | Directory scan | "src/frontend" |
| `{{BACKEND_ROOT}}` | Directory scan | "src/MyApp.Api" |
| `{{FRONTEND_PORT}}` | vite.config / package.json | "3000" |
| `{{BACKEND_PORT}}` | launchSettings.json | "5000" |

Templates and full variable list: see `ln-751-command-templates/references/`

---

## Detection Logic

**Frontend:** vite.config.ts, package.json (react/vue/angular)
**Backend:** *.csproj with Web SDK, or express/fastapi in deps
**Database:** docker-compose.yml postgres/mysql, or connection strings
**Playwright:** playwright.config.ts or @playwright/test in deps
**CI/CD:** .github/workflows/, azure-pipelines.yml, Dockerfile

---

## Critical Rules

- **Detect before generate:** Only create commands for detected stack components (no empty templates)
- **Variable completeness:** All `{{VARIABLE}}` placeholders must be resolved before delegation
- **Delegate via Task:** All template rendering goes through ln-751 with context isolation
- **No hardcoded paths:** All paths derived from project structure analysis, not assumptions

## Definition of Done

- Project structure analyzed and tech stack detected
- Variables extracted (project name, ports, roots, stack)
- Commands delegated to ln-751 with correct template name and variables
- All generated `.claude/commands/*.md` files verified to exist
- No unresolved `{{VARIABLE}}` placeholders remain in output

## Reference Files

- **Variables reference:** [references/variables_reference.md](references/variables_reference.md)
- **Questions:** [references/questions_commands.md](references/questions_commands.md)

---

**Version:** 2.0.0
**Last Updated:** 2026-01-10

Overview

This skill generates a project-specific set of Claude Code command files under .claude/commands to bootstrap and standardize developer workflows. It inspects repository layout and tech stack, extracts required variables, then delegates templated command rendering to a secure template worker. The outcome is a verified set of ready-to-run command markdown files tailored to the project.

How this skill works

The skill scans the codebase for indicators (package.json, vite.config, *.csproj, docker-compose, CI configs) to detect frontend, backend, database, test frameworks, and CI/CD. It extracts variables like project name, roots, and ports, validates that all placeholders are resolvable, and calls the template worker ln-751-command-templates with template names plus the filled variables. After rendering it verifies that each .claude/commands/*.md file exists and contains no unresolved placeholders.

When to use it

  • Initializing a new repository to provide team-standard Claude Code commands
  • Adding Claude Code support to an existing project to create reproducible dev tasks
  • Before onboarding new contributors to expose common workflows as commands
  • When adding or detecting new stack components (Playwright, DB, CI) to auto-generate relevant commands

Best practices

  • Run a fresh project scan at root or from known monorepo workspace roots to ensure accurate path detection
  • Commit generated command files to the repo so CI and teammates can reuse them
  • Ensure repository has minimal indicator files (package.json, csproj, docker-compose, CI workflows) for reliable detection
  • Avoid manual edits to templates; modify template variables or source templates in ln-751 to keep consistency
  • Verify variable extraction logs when a command is not generated to understand detection gaps

Example use cases

  • Generate refresh_context.md, refresh_infrastructure.md, and build-and-test.md for a new web app with React and .NET backend
  • Add ui-testing.md automatically when Playwright is present in dev dependencies
  • Create deploy.md only if CI/CD workflows or Dockerfile exist to avoid empty deployment commands
  • Produce database-ops.md when docker-compose or connection strings indicate Postgres/MySQL presence

FAQ

What prevents generating irrelevant commands?

Detection logic requires concrete indicators (files or deps). Commands are only created when the corresponding components are found.

What happens if a variable cannot be resolved?

Generation halts for that template; the skill reports missing variables and does not delegate templates with unresolved placeholders.