refactor: extract skills from commands across 8 plugins

Refactored commands to extract reusable skills following the
Commands → Skills separation pattern. Each command is now <50 lines
and references skill files for detailed knowledge.

Plugins refactored:
- claude-config-maintainer: 5 commands → 7 skills
- code-sentinel: 3 commands → 2 skills
- contract-validator: 5 commands → 6 skills
- data-platform: 10 commands → 6 skills
- doc-guardian: 5 commands → 6 skills (replaced nested dir)
- git-flow: 8 commands → 7 skills

Skills contain: workflows, validation rules, conventions,
reference data, tool documentation

Commands now contain: YAML frontmatter, agent assignment,
skills list, brief workflow steps, parameters

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-30 17:32:24 -05:00
parent aad02ef2d9
commit 7c8a20c804
71 changed files with 3896 additions and 3690 deletions

View File

@@ -1,106 +1,43 @@
---
name: branch-start
description: Create a new feature/fix/chore branch with consistent naming
agent: git-assistant
---
# /branch-start - Start New Branch
## Visual Output
## Skills
When executing this command, display the plugin header:
```
┌──────────────────────────────────────────────────────────────────┐
│ 🔀 GIT-FLOW · Branch Start │
└──────────────────────────────────────────────────────────────────┘
```
Then proceed with the workflow.
- skills/visual-header.md
- skills/branch-naming.md
- skills/git-safety.md
- skills/environment-variables.md
## Purpose
Create a new feature/fix/chore branch with consistent naming conventions.
Create a new branch with consistent naming conventions, based on the configured base branch.
## Usage
## Parameters
```
/branch-start [description]
```
| Parameter | Description |
|-----------|-------------|
| `<description>` | Brief description for branch name |
| `--type` | Branch type: feat, fix, chore, docs, refactor |
| `--issue` | Issue number to include in branch name |
## Behavior
## Workflow
### Step 1: Determine Branch Type
```
What type of change is this?
1. feat - New feature
2. fix - Bug fix
3. chore - Maintenance task
4. docs - Documentation
5. refactor - Code refactoring
```
### Step 2: Get Description
If not provided, ask:
```
Brief description (2-4 words):
> add user authentication
```
### Step 3: Generate Branch Name
Convert to kebab-case:
- `feat/add-user-authentication`
- `fix/login-timeout-error`
- `chore/update-dependencies`
### Step 4: Create Branch
```bash
# Ensure base branch is up-to-date
git checkout <base-branch>
git pull origin <base-branch>
# Create and switch to new branch
git checkout -b <new-branch>
```
### Step 5: Confirm
```
Created branch: feat/add-user-authentication
Based on: development (abc1234)
Ready to start coding!
```
## Environment Variables
| Variable | Default | Description |
|----------|---------|-------------|
| `GIT_DEFAULT_BASE` | `development` | Branch to create from |
| `GIT_BRANCH_PREFIX` | `true` | Use type/ prefix |
## Naming Rules
- Lowercase only
- Hyphens for spaces
- No special characters
- Max 50 characters
## Validation
```
Branch name validation:
✓ Lowercase
✓ Valid prefix (feat/)
✓ Descriptive (3+ words recommended)
✗ Too long (52 chars, max 50)
Suggested: feat/add-user-auth
Use this instead? (y/n)
```
1. **Display header** - Show GIT-FLOW Branch Start header
2. **Determine type** - Prompt for branch type if not provided
3. **Get description** - Prompt for description if not provided
4. **Generate name** - Convert to kebab-case (per branch-naming.md)
5. **Validate** - Check naming rules, truncate if needed
6. **Update base** - Checkout and pull base branch
7. **Create branch** - `git checkout -b <new-branch>`
8. **Confirm** - Display created branch info
## Output
On success:
```
Branch: feat/add-user-authentication
Base: development @ abc1234