home / skills / first-fluke / fullstack-starter / commit

commit skill

/.agent/skills/commit

This skill helps you create conventional commits with project-specific branch rules and proper scope, ensuring consistent history across the monorepo.

npx playbooks add skill first-fluke/fullstack-starter --skill commit

Review the files below or copy the command above to add this skill to your agents.

Files (3)
SKILL.md
3.1 KB
---
name: commit
description: Create git commits following Conventional Commits specification with project-specific branch naming rules
---

# Commit Skill - Conventional Commits

## When to use
- When user requests "commit this", "commit", "save changes"
- When `/commit` command is invoked

## Configuration
Project-specific settings: `.agent/skills/commit/config/commit-config.yaml`

## Commit Types
| Type | Description | Branch Prefix |
|------|-------------|---------------|
| feat | New feature | feature/ |
| fix | Bug fix | fix/ |
| refactor | Code improvement | refactor/ |
| docs | Documentation changes | docs/ |
| test | Test additions/modifications | test/ |
| chore | Build, configuration, etc. | chore/ |
| style | Code style changes | style/ |
| perf | Performance improvements | perf/ |

## Commit Format
```
<type>(<scope>): <description>

[optional body]

Co-Authored-By: First Fluke <[email protected]>
```

## Workflow

### Step 1: Analyze Changes
```bash
git status
git diff --staged
git log --oneline -5
```

### Step 1.5: Split by Feature (if needed)
If changed files span multiple features/domains, **split commits by feature**.

**Split criteria:**
- Different scopes (e.g., workflows vs skills vs docs)
- Different types (e.g., feat vs fix vs docs)
- Logically independent changes

**Example:**
```
# Changed files:
.agent/workflows/*.md (7 files)     → fix(workflows): ...
.agent/skills/**/*.md (4 files)     → fix(skills): ...
USAGE.md, USAGE-ko.md               → docs: ...

# Split into 3 commits
```

**Do NOT split when:**
- All changes belong to a single feature
- Few files changed (5 or fewer)
- User requested a single commit

### Step 2: Determine Commit Type
Analyze changes → Select appropriate type:
- New files added → `feat`
- Bug fixed → `fix`
- Refactoring → `refactor`
- Documentation only → `docs`
- Tests added → `test`
- Build/config changes → `chore`

### Step 3: Determine Scope
Use changed module/component as scope:
- `feat(auth)`: Authentication related
- `fix(api)`: API related
- `refactor(ui)`: UI related
- No scope is also valid: `chore: update dependencies`

### Step 4: Write Description
- Under 72 characters
- Use imperative mood (add, fix, update, remove...)
- Lowercase first letter
- No trailing period

### Step 5: Confirm with User
```
📝 Commit message preview:

feat(orchestrator): add multi-CLI agent mapping support

- Add user-preferences.yaml for CLI configuration
- Update spawn-agent.sh to read agent-CLI mapping
- Update memory schema with CLI field

Co-Authored-By: First Fluke <[email protected]>

Proceed with this commit? (Y/N/Edit)
```

### Step 6: Execute Commit
After user confirmation:
```bash
git add <specific-files>
git commit -m "<message>"
```

## References
- Configuration: `config/commit-config.yaml`
- Guide: `resources/conventional-commits.md`

## Important Notes
- **NEVER** commit without user confirmation
- **NEVER** use `git add -A` or `git add .` without explicit permission
- **NEVER** commit files that may contain secrets (.env, credentials, etc.)
- **ALWAYS** use specific file names when staging
- **ALWAYS** use HEREDOC for multi-line commit messages

Overview

This skill creates git commits that follow the Conventional Commits specification and enforces project-specific branch naming rules. It analyzes repository changes, suggests one or more well-formed commit messages, and asks for confirmation before staging and committing. The skill is tuned for a production-ready fullstack monorepo using Next.js, FastAPI, Flutter, Terraform, and mise.

How this skill works

The skill inspects git status, staged diffs, and recent history to determine change scope and appropriate commit type. If changes span multiple features or domains it recommends splitting into separate commits and maps types to branch prefixes (e.g., feat → feature/). It assembles a Conventional Commit message with optional body and Co-Authored-By lines and prompts the user to confirm or edit before executing git add for specific files and git commit. It refuses to stage or commit secrets and will never run mass-add without explicit permission.

When to use it

  • User asks to save or commit changes (e.g., “commit this”, “save changes”)
  • When the /commit command is invoked in the agent
  • Preparing commits in a monorepo with multiple modules or languages
  • Enforcing consistent commit messages and branch naming across the project

Best practices

  • Stage only specific files; avoid git add -A or git add . without permission
  • Split commits by logical feature/scope when changes touch multiple domains
  • Use concise imperative descriptions under 72 characters and lowercase first letter
  • Include scope when it clarifies the area affected (e.g., auth, api, ui)
  • Never commit secrets or environment files; confirm with user before committing

Example use cases

  • Make a single bugfix commit: analyze diff, choose fix(api), create message, confirm, commit specific files
  • Add a new feature in a subpackage: detect new files → suggest feat(orchestrator) and branch prefix feature/
  • Split a mixed change set into multiple commits by scope (workflows, skills, docs)
  • Prepare a commit with co-author attribution for pair programming or external contributions
  • Create chore commits for dependency or build config updates while avoiding accidental secret commits

FAQ

Will the skill commit without asking me?

No. It always displays a preview and requires explicit confirmation before staging or committing.

How does it decide to split changes into multiple commits?

It recommends splitting when changes span different scopes, types, or logically independent features; it won’t split when changes belong to a single feature, are few files, or the user requested one commit.