feat(git-flow): add /gitflow setup with auto-config and CLAUDE.md injection

New gitflow-setup.md command auto-detects Gitea system config from
~/.config/claude/gitea.env, configures workflow settings, and injects
Git Workflow section into project CLAUDE.md. Moved
claude-md-integration.md to skills/ for programmatic use.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-08 19:13:34 -05:00
parent 271e0210a5
commit f87fc2537d
5 changed files with 189 additions and 55 deletions

View File

@@ -0,0 +1,70 @@
# CLAUDE.md Git-Flow Section Template
## Purpose
Template for the Git Workflow section that `/gitflow setup` injects into a project's CLAUDE.md.
## When to Use
- During `/gitflow setup` to inject the Git Workflow section
- As reference for the expected CLAUDE.md structure
## Template
The following template uses placeholders that `/gitflow setup` replaces with actual values:
```markdown
## Git Workflow
This project uses the git-flow plugin for git operations.
### Workflow Style
**Style:** {GIT_WORKFLOW_STYLE}
**Base Branch:** {GIT_DEFAULT_BASE}
### Branch Naming
Use the format: `<type>/<description>`
Types: feat, fix, chore, docs, refactor, test, perf
Examples:
- `feat/add-user-auth`
- `fix/login-timeout`
- `chore/update-deps`
### Commit Messages
Use conventional commits:
```
<type>(<scope>): <description>
[body]
[footer]
```
### Commands
| Command | Use Case |
|---------|----------|
| `/gitflow commit` | Smart commit with optional --push, --merge, --sync |
| `/gitflow commit --push` | Commit and push to remote |
| `/gitflow commit --merge` | Commit and merge into target branch |
| `/gitflow branch-start` | Start new branch |
| `/gitflow status` | Enhanced status |
### Protected Branches
Do not commit directly to: {GIT_PROTECTED_BRANCHES}
```
## Placeholder Reference
| Placeholder | Source | Default |
|-------------|--------|---------|
| `{GIT_WORKFLOW_STYLE}` | Step 5 selection | `feature-branch` |
| `{GIT_DEFAULT_BASE}` | Step 5 selection | `development` |
| `{GIT_PROTECTED_BRANCHES}` | Step 5 selection | `main,staging` |

View File

@@ -75,6 +75,13 @@ Standard header format for consistent visual output across all git-flow commands
+----------------------------------------------------------------------+
```
### /gitflow setup
```
+----------------------------------------------------------------------+
| GIT-FLOW Setup |
+----------------------------------------------------------------------+
```
## Usage
Display header immediately after command invocation, before any workflow steps.