skill-git-workflow
- Repo stars 435
- Author updated Live
- Author repo nvim
- Domain
- Engineering
- Compatible agents
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- Trust score
- 88 / 100 · community maintained
- Author / version / license
- @benbrastmckie · no license declared
- Token usage
- Lean
- Setup complexity
- Guided setup
- External API key
- Not required
- Operating systems
- Unspecified (assume cross-platform)
- Runtime requirements
- No special requirements
- Permissions
-
- Read-only
- Write / modify
- Shell exec
- Env read
- Network behavior
- Local-only
- Install commands
- 26 variants
Profile is derived at build time from SKILL.md and install vectors. Subject to drift from author intent.
Heads up: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: skill-git-workflow
description: Create scoped git commits for task operations. Invoke after task status changes or artifact crea…
category: engineering
runtime: no special runtime
---
# skill-git-workflow output preview
## PART A: Task fit
- Use case: Create scoped git commits for task operations. Invoke after task status changes or artifact creation. Create properly scoped git commits for task operations. Load context on-demand when needed: runs entirely locally. Works with Claude Code, Cursor, Cline and 23 more..
- Inputs: target material, constraints, expected output, and acceptance criteria.
- Evidence boundary: follow “Context Loading / Trigger Conditions / Commit Message Formats” and do not present inference as author intent.
## PART B: Execution result
- **01** The card summarizes the use case; runtime output centers on “Create scoped git commits for task operations. Invoke after task status changes or artifact creation. Create properly scoped git commits for task operations. Load context on-demand when needed: runs entirely locally. Works with Claude Code, Cursor, Cline and 23 more.”.
- **02** When the source has headings, the agent prioritizes “Context Loading / Trigger Conditions / Commit Message Formats” so the result follows the author’s structure.
- **03** Typical output includes task judgment, concrete steps, required commands or file edits, validation, and follow-up options.
- **04** Risk context follows the fingerprint: read files, write/modify files, run shell commands, read environment variables; mostly runs locally; usually needs no extra API key.
## Running Rules
- read files, write/modify files, run shell commands, read environment variables; mostly runs locally; usually needs no extra API key.
- Validate with a small sample before expanding scope.
- Return the result, validation criteria, and next iteration options. The source does not require a stable slash command. After installation, invoke the skill by name and describe the task.
Name target files or source material, expected output, forbidden changes, and whether network or shell access is allowed. Permission fingerprint: read files, write/modify files, run shell commands, read environment variables.
Start with a small task and check whether the result follows “Context Loading / Trigger Conditions / Commit Message Formats”. Inspect diffs, logs, previews, or tests before expanding scope.
Confirm the final output includes a concrete result, evidence, and next action. If it stays generic, tighten inputs, boundaries, and acceptance criteria.
---
name: skill-git-workflow
description: Create scoped git commits for task operations. Invoke after task status changes or artifact crea…
category: engineering
source: benbrastmckie/nvim
---
# skill-git-workflow
## When to use
- Create scoped git commits for task operations. Invoke after task status changes or artifact creation. Create properly…
- Use it when the task has clear inputs, repeatable steps, and validation criteria.
## What to provide
- Target material, scope, expected result, and forbidden changes.
- Whether network, commands, file writes, or external services are allowed.
## Execution rules
- Organize steps around “Context Loading / Trigger Conditions / Commit Message Formats” and keep inference separate from source facts.
- read files, write/modify files, run shell commands, read environment variables; mostly runs locally; usually needs no extra API key.
- Validate with a small sample before expanding the task.
## Output requirements
- Return the deliverable, key evidence, validation method, and next action.
- Mark missing information as unknown; do not invent commands, platforms, or dependencies. The author source anchors workflow facts; repository files anchor sources and commands; Fluxly only adds fit, limitations, and quality judgment.
skill "skill-git-workflow" {
input -> user goal + target files + boundaries + acceptance criteria
context -> Context Loading / Trigger Conditions / Commit Message Formats
rules -> SKILL.md triggers / order / output contract
runtime -> no special runtime | read files, write/modify files, run shell commands, read environment variables | mostly runs locally
guardrails -> usually needs no extra API key + small-sample validation + diff/log review
output -> copyable result + checklist + next iteration
} Git Workflow Skill
Create properly scoped git commits for task operations.
Context Loading
Load context on-demand when needed:
@.claude/context/standards/git-safety.md- Git safety rules and best practices@.claude/context/index.json- Full context discovery index
Trigger Conditions
This skill activates when:
- Task status changes (research, plan, implement complete)
- Artifacts are created
- Task lifecycle operations occur
Commit Message Formats
Task Operations
| Operation | Format | CI Triggered |
|---|---|---|
| Create task | task {N}: create {title} |
No |
| Complete research | task {N}: complete research |
No |
| Create plan | task {N}: create implementation plan |
No |
| Complete phase | task {N} phase {P}: {phase_name} |
No |
| Complete task | task {N}: complete implementation |
No |
| Complete task (with CI) | task {N}: complete implementation [ci] |
Yes |
| Revise plan | task {N}: revise plan (v{V}) |
No |
System Operations
| Operation | Format |
|---|---|
| Archive tasks | todo: archive {N} completed tasks |
| Error fixes | errors: create fix plan for {N} errors |
| Code review | review: {scope} code review |
| State sync | sync: reconcile TODO.md and state.json |
Execution Flow
1. Receive commit request:
- operation_type
- task_number (if applicable)
- scope (files to include)
- message_template
2. Stage appropriate files:
- git add {scope}
3. Create commit:
- Format message
- Add co-author
- Execute commit
4. Verify success:
- Check exit code
- Log result
5. Return result
Commit Scope Rules
Task-Specific Commits
Include only task-related files:
specs/TODO.md
specs/state.json
specs/{NNN}_{SLUG}/**
Implementation Commits
Include source files modified:
Logos/**/*.lean (for Lean tasks)
src/**/* (for general tasks)
Phase Commits
Scope to phase changes only:
Files modified in that phase
Updated plan with phase status
Safety Checks
Before Commit
1. git status - verify staged files
2. Check no sensitive files staged (.env, credentials)
3. Verify commit message format
Never Run
git push --forcegit reset --hard(without explicit request)git rebase -i
Message Template
{scope}: {action} {description}
CI Triggering
Overview
CI is skipped by default on push events. To trigger CI, add [ci] marker to the commit message.
trigger_ci Parameter
When creating commits, the trigger_ci parameter controls whether CI runs:
| Value | Behavior | Use Case |
|---|---|---|
false (default) |
No CI marker added | Routine commits, research, planning |
true |
Append [ci] to message |
Lean changes, implementation completion |
CI Decision Criteria
Trigger CI (trigger_ci: true) when:
- Lean files modified (.lean) - Ensures build passes
- Implementation completed - Final verification before merge
- CI configuration changed (.github/workflows/) - Validate workflow changes
- Mathlib dependencies updated (lakefile.lean, lake-manifest.json) - Ensure compatibility
- Critical bug fixes - Verify fix works
Skip CI (default) when:
- Documentation changes only (.md files)
- Research/planning artifacts
- Configuration changes (non-CI)
- Routine task management operations
Commit Message with CI Marker
task {N}: complete implementation [ci]
When CI Always Runs
CI runs regardless of marker on:
- Pull request events (all PRs run CI)
- Manual workflow_dispatch trigger
- Commits with
[ci]marker
Execution Commands
Standard Commit
git add {files}
git commit -m "$(cat <<'EOF'
{message}
EOF
)"
Task Commit
git add specs/
git commit -m "$(cat <<'EOF'
task {N}: {action}
EOF
)"
Return Format
{
"status": "completed|failed",
"summary": "Created commit: {short_message}",
"commit_hash": "abc123",
"files_committed": [
"path/to/file1",
"path/to/file2"
],
"message": "Full commit message",
"ci_triggered": true|false
}
Error Handling
Nothing to Commit
{
"status": "committed",
"summary": "No changes to commit",
"commit_hash": null
}
Pre-Commit Hook Failure
{
"status": "failed",
"error": "Pre-commit hook failed",
"recovery": "Fix issues and retry (do not use --no-verify)"
}
Git Error
{
"status": "failed",
"error": "Git command failed: {error}",
"recovery": "Check git status and resolve manually"
}
Non-Blocking Behavior
Git failures should NOT block task operations:
- Log the failure
- Continue with task
- Report to user that commit failed
- Task state is preserved regardless
Decide Fit First
Design Intent
How To Use It
Boundaries And Review