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:
@@ -1,94 +1,49 @@
|
||||
---
|
||||
name: commit-merge
|
||||
description: Commit current changes and merge branch into target
|
||||
agent: git-assistant
|
||||
---
|
||||
|
||||
# /commit-merge - Commit and Merge
|
||||
|
||||
## Visual Output
|
||||
## Skills
|
||||
|
||||
When executing this command, display the plugin header:
|
||||
|
||||
```
|
||||
┌──────────────────────────────────────────────────────────────────┐
|
||||
│ 🔀 GIT-FLOW · Commit & Merge │
|
||||
└──────────────────────────────────────────────────────────────────┘
|
||||
```
|
||||
|
||||
Then proceed with the workflow.
|
||||
- skills/visual-header.md
|
||||
- skills/commit-conventions.md
|
||||
- skills/merge-workflow.md
|
||||
- skills/git-safety.md
|
||||
- skills/environment-variables.md
|
||||
|
||||
## Purpose
|
||||
|
||||
Commit current changes, then merge the current branch into a target branch.
|
||||
|
||||
## Behavior
|
||||
## Parameters
|
||||
|
||||
### Step 1: Run /commit
|
||||
| Parameter | Description |
|
||||
|-----------|-------------|
|
||||
| `--target` | Target branch (default: GIT_DEFAULT_BASE) |
|
||||
| `--squash` | Squash commits on merge |
|
||||
| `--no-delete` | Keep branch after merge |
|
||||
|
||||
Execute the standard commit workflow.
|
||||
## Workflow
|
||||
|
||||
### Step 2: Identify Target Branch
|
||||
|
||||
Check environment or ask:
|
||||
|
||||
```
|
||||
Merge into which branch?
|
||||
1. development (Recommended - GIT_DEFAULT_BASE)
|
||||
2. main
|
||||
3. Other: ____
|
||||
```
|
||||
|
||||
### Step 3: Merge Strategy
|
||||
|
||||
```
|
||||
How should I merge?
|
||||
1. Merge commit (preserves history)
|
||||
2. Squash and merge (single commit)
|
||||
3. Rebase (linear history)
|
||||
```
|
||||
|
||||
### Step 4: Execute Merge
|
||||
|
||||
```bash
|
||||
# Switch to target
|
||||
git checkout <target>
|
||||
|
||||
# Pull latest
|
||||
git pull origin <target>
|
||||
|
||||
# Merge feature branch
|
||||
git merge <feature-branch> [--squash] [--no-ff]
|
||||
|
||||
# Push
|
||||
git push origin <target>
|
||||
```
|
||||
|
||||
### Step 5: Cleanup (Optional)
|
||||
|
||||
```
|
||||
Merge complete. Delete the feature branch?
|
||||
1. Yes, delete local and remote (Recommended)
|
||||
2. Delete local only
|
||||
3. Keep the branch
|
||||
```
|
||||
|
||||
## Environment Variables
|
||||
|
||||
| Variable | Default | Description |
|
||||
|----------|---------|-------------|
|
||||
| `GIT_DEFAULT_BASE` | `development` | Default branch to merge into |
|
||||
| `GIT_MERGE_STRATEGY` | `merge` | Default merge strategy |
|
||||
| `GIT_AUTO_DELETE_MERGED` | `true` | Auto-delete merged branches |
|
||||
|
||||
## Safety Checks
|
||||
|
||||
- Verify target branch exists
|
||||
- Check for uncommitted changes before switching
|
||||
- Ensure merge doesn't conflict (preview first)
|
||||
1. **Display header** - Show GIT-FLOW Commit & Merge header
|
||||
2. **Run /commit** - Execute standard commit workflow
|
||||
3. **Identify target** - Prompt for target branch if not specified
|
||||
4. **Select strategy** - Merge commit, squash, or rebase (per merge-workflow.md)
|
||||
5. **Execute merge** - Switch to target, pull, merge, push
|
||||
6. **Handle conflicts** - Guide resolution if needed
|
||||
7. **Cleanup** - Offer to delete merged branch (per git-safety.md)
|
||||
8. **Report** - Show merge summary
|
||||
|
||||
## Output
|
||||
|
||||
On success:
|
||||
```
|
||||
Committed: abc1234
|
||||
feat(auth): add password reset functionality
|
||||
|
||||
Merged feat/password-reset → development
|
||||
Merged feat/password-reset -> development
|
||||
Deleted branch: feat/password-reset
|
||||
|
||||
development is now at: def5678
|
||||
|
||||
Reference in New Issue
Block a user