# Command Manager

A meta-skill for creating, maintaining, and validating Claude slash commands.

## Features

- **Command Linter** — Automated validation against 12 quality rules
- **Templates** — Ready-to-use command templates (basic + advanced)
- **Reference Docs** — Complete technical guides for all command features
- **Portability** — No project-specific dependencies

## Quick Start

### Lint Commands

```powershell
# Lint all commands
.\scripts\command-lint.ps1 -Path ".claude/commands"

# JSON output for CI
.\scripts\command-lint.ps1 -Path ".claude/commands" -Format json

# Strict mode (warnings = errors)
.\scripts\command-lint.ps1 -Path ".claude/commands" -Strict
```

### Create a Command

1. Copy `templates/command.template.md` to `.claude/commands/{name}.md`
2. Fill in the frontmatter and body
3. Run linter to validate

## Contents

```
command-manager/
├── SKILL.md                    # Main skill file
├── README.md                   # This file
├── scripts/
│   └── command-lint.ps1        # Linter script
├── references/
│   ├── format.md               # Frontmatter syntax
│   ├── variables.md            # $ARGUMENTS, $1, $2
│   ├── context-injection.md    # ! and @ operators
│   ├── permissions.md          # allowed-tools patterns
│   ├── namespacing.md          # Directory organization
│   ├── hooks.md                # Lifecycle hooks
│   └── commands-specification.md
└── templates/
    ├── command.template.md     # Basic command
    └── advanced.template.md    # With hooks/permissions
```

## Linter Rules

| ID | Severity | Description |
|----|----------|-------------|
| CL001 | Error | Frontmatter required |
| CL002 | Error | description field required |
| CL003 | Warning | Description > 256 chars |
| CL004 | Warning | Filename not lowercase-hyphenated |
| CL005 | Warning | Subdirectory not kebab-case |
| CL006 | Error | Invalid allowed-tools syntax |
| CL007 | Warning | Bash injection not in allowed-tools |
| CL008 | Error | @file reference doesn't exist |
| CL009 | Info | Missing argument-hint |
| CL010 | Error | Invalid model identifier |
| CL011 | Error | Invalid hooks configuration |
| CL012 | Error | Empty command body |

## License

MIT
