Add /diff and /template commands
- /diff command to compare config with backups - Shows added/removed/changed files - JSON-aware comparison for config files - List available backups - /template command for session templates - Built-in templates: daily-standup, code-review, troubleshoot, deploy - Each template includes checklist, initial commands, prompt - Create custom templates interactively or non-interactively - Updated shell completions with 21 aliases total - Test suite now covers 29 tests 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -22,6 +22,8 @@ Slash commands for quick actions. User-invoked (type `/command` to trigger).
|
||||
| `/workflow` | `/workflows`, `/wf` | List and describe workflows |
|
||||
| `/skill-info` | `/skill`, `/skills-info` | Show skill information |
|
||||
| `/agent-info` | `/agent`, `/agents` | Show agent information |
|
||||
| `/diff` | `/config-diff`, `/compare` | Compare config with backup |
|
||||
| `/template` | `/templates`, `/session-template` | Manage session templates |
|
||||
| `/maintain` | `/maintenance`, `/admin` | Configuration maintenance |
|
||||
| `/programmer` | | Code development tasks |
|
||||
| `/gcal` | `/calendar`, `/cal` | Google Calendar access |
|
||||
|
||||
34
commands/diff.md
Normal file
34
commands/diff.md
Normal file
@@ -0,0 +1,34 @@
|
||||
---
|
||||
name: diff
|
||||
description: Compare configuration with backup
|
||||
aliases: [config-diff, compare]
|
||||
invokes: command:diff
|
||||
---
|
||||
|
||||
# Diff Command
|
||||
|
||||
Compare current configuration with a backup to see what changed.
|
||||
|
||||
## Usage
|
||||
|
||||
```
|
||||
/diff # Compare with latest backup
|
||||
/diff --backup <file> # Compare with specific backup
|
||||
/diff --list # List available backups
|
||||
/diff --json # Output as JSON
|
||||
```
|
||||
|
||||
## Implementation
|
||||
|
||||
```bash
|
||||
python3 ~/.claude/automation/config-diff.py [options]
|
||||
```
|
||||
|
||||
## Output
|
||||
|
||||
Shows changes grouped by type:
|
||||
- **Added** - New files in current config
|
||||
- **Removed** - Files that existed in backup but not now
|
||||
- **Changed** - Modified files with details
|
||||
|
||||
For JSON files, shows which keys were added/removed/changed.
|
||||
44
commands/template.md
Normal file
44
commands/template.md
Normal file
@@ -0,0 +1,44 @@
|
||||
---
|
||||
name: template
|
||||
description: Manage session templates for common workflows
|
||||
aliases: [templates, session-template]
|
||||
invokes: command:template
|
||||
---
|
||||
|
||||
# Template Command
|
||||
|
||||
Create and use session templates for repeatable workflows.
|
||||
|
||||
## Usage
|
||||
|
||||
```
|
||||
/template # List all templates
|
||||
/template --use <name> # Display template for use
|
||||
/template --create <name> # Create new template
|
||||
/template --delete <name> # Delete a template
|
||||
```
|
||||
|
||||
## Implementation
|
||||
|
||||
```bash
|
||||
python3 ~/.claude/automation/session-template.py [options]
|
||||
```
|
||||
|
||||
## Built-in Templates
|
||||
|
||||
| Name | Category | Description |
|
||||
|------|----------|-------------|
|
||||
| `daily-standup` | routine | Morning status check and planning |
|
||||
| `code-review` | development | Review code changes in a project |
|
||||
| `troubleshoot` | debugging | Debug an issue systematically |
|
||||
| `deploy` | operations | Deploy application to environment |
|
||||
|
||||
## Template Contents
|
||||
|
||||
Each template includes:
|
||||
- **Description** - What the template is for
|
||||
- **Category** - Grouping for organization
|
||||
- **Context level** - How much context to gather
|
||||
- **Initial commands** - Commands to run at start
|
||||
- **Checklist** - Steps to follow
|
||||
- **Prompt template** - Suggested starting prompt
|
||||
Reference in New Issue
Block a user