l-commit
Automates the git commit process using structured conventional commit standards.
Install
mkdir -p .claude/skills/l-commit && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/12186" && unzip -o skill.zip -d .claude/skills/l-commit && rm skill.zipInstalls to .claude/skills/l-commit
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Stage and commit changes with conventional commit format. Smart analysis groups changes, proposes splits, and writes structured commit descriptions. Use when committing code changes.Key capabilities
- →Stage and commit changes using conventional commit format
- →Group changes into logical commits
- →Propose commit messages and types
- →Track time spent on commits
- →Push commits to remote repository
How it works
The skill analyzes current Git changes, groups them by concern, proposes conventional commit messages, and then executes the commits, optionally tracking time and pushing to the remote.
Inputs & outputs
When to use l-commit
- →Stage and commit changes
- →Track time spent on feature
- →Group commit changes
- →Follow conventional commit format
About this skill
Commit Changes
Stage and commit with conventional commit format: {type}({scope}): {message}
Arguments
-p— Push after committing$Xh/$Xm— Time spent on this commit (e.g.,$1h,$30m,$2.5h,$2h $30m). Placed as a footer on the first commit only.- Any other text is treated as commit guidance (e.g.,
/l-commit fix the build issue)
Time Tracking
Extract $Xh / $Xm patterns from the arguments up front. Valid forms: $1h, $30m, $2.5h, $2h $30m (combined). The matched text becomes the time footer for the first commit; anything else in the arguments is commit guidance.
If no time pattern is found in the arguments, include a "Time spent?" question in the same AskUserQuestion call that presents the commit proposal (step 4.3). Only add the footer to the first commit — subsequent split commits don't get it.
Instructions
1. Gather State (parallel)
Run these in a single bash call to minimize round-trips:
echo "===BRANCH==="
git branch --show-current
echo "===STATUS==="
git status --porcelain
echo "===STAGED==="
git diff --cached --stat
echo "===UNSTAGED==="
git diff --stat
echo "===RECENT==="
git log --oneline -5
If no changes: say "Nothing to commit." and stop.
2. Branch Check
If on main or develop, prompt:
Question: "You're on {branch}. Create a new branch?"
Header: "Branch"
Options:
- label: "Create branch"
description: "Suggest a branch name based on the changes"
- label: "Stay on {branch}"
description: "Commit directly"
If "Create branch": create and checkout the suggested branch.
3. Read Diffs
Read the actual diffs to understand the changes:
git diff --cached
git diff
If the diffs are very large, use --stat and selectively read key files.
4. Analyze and Propose
Perform all analysis silently, then present one single question to the user.
4.1 Determine commit grouping
Group changes by concern:
- Different types (
fixvsfeatvschorevsrefactorvsdocs) should be separate commits - Unrelated changes within the same type should be separate
- Related files (component + its test) stay together
Commit types: feat, fix, chore, refactor, docs, test
Scope: Use the lowdefy package name without the @lowdefy/ prefix (e.g., build, engine, helpers, blocks-antd). For cross-package changes, use the primary package. For repo-level changes (CI, root config), omit the scope.
4.2 Check for changeset need
If any modified packages would need a changeset (functional changes to packages/), note it in the proposal. Don't auto-generate — the user can run /l-changeset separately.
4.3 Present proposal
Single commit:
Question: "Proposed commit:"
Header: "Commit"
Options:
- label: "Looks good"
description: "fix(build): Handle dotted payload keys in validation. [auth.js, validate.js, +2 more]"
- label: "Skip"
description: "Don't commit right now"
Multiple commits:
Question: "Changes address multiple concerns:"
Header: "Commits"
Options:
- label: "Split as proposed"
description: "1: fix(build): Handle dotted keys. (2 files) | 2: chore: Update deps. (1 file)"
- label: "Combine into one"
description: "Single commit with all changes"
The user can always select "Other" to provide custom feedback — no need for an explicit "Adjust" option.
File list rules:
- List only substantive files (skip lock files, auto-generated, formatting-only)
- Use short basenames unless disambiguation needed
- Max 15 files per commit, then
(+N more)
Time question (only if not already in arguments):
Include as a second question in the same AskUserQuestion call so the user answers commit split + time in one prompt:
Question: "Time spent?"
Header: "Time"
multiSelect: false
Options:
- label: "No time"
description: "Skip time tracking"
- label: "$30m"
description: ""
- label: "$1h"
description: ""
- label: "$2h"
description: ""
Users can select "Other" to enter any $Xh / $Xm / combined value.
If the user provides custom feedback: incorporate it and proceed (don't re-prompt).
5. Build Commit Descriptions
For each commit, review the conversation history and build a structured description:
Request: {what the user asked for, in their words}
Motivation: {why this change was needed}
Decisions:
- {decision}: {rationale}
Changes:
- {file}: {what changed and why}
Tags: {3-8 comma-separated lowercase keywords for git log --grep}
Rules:
- Preserve the user's own language in Request/Motivation
- Keep concise: 1-2 lines for Request/Motivation, one line per Decision/Change
- Max 15 files in Changes — skip trivial, formatting-only, lock files
- Focus on "why" over "what"
- Tags: lowercase, hyphenated. Include entity names, feature areas, technology. Include user's terminology AND normalized synonyms
- Omit empty sections (e.g., skip Decisions if none were made)
6. Execute Commits
For each commit:
Time footer: If a time value was supplied (either in $ARGUMENTS or via the AskUserQuestion), append it as a blank-line-separated footer to the first commit only. Subsequent split commits omit the footer. If the user selected "No time", omit the footer entirely.
Single commit (with time):
git add -A
git commit -m "$(cat <<'EOF'
fix(build): Handle dotted payload keys in validation.
Request: "Fix the crash when payload keys have dots"
Motivation: Dotted keys like "user.name" were incorrectly split during validation.
Changes:
- validate.js: Use bracket notation for dotted key access
- auth.js: Updated payload key iteration
Tags: payload, validation, dotted-keys, build
$1h
EOF
)"
Split commits — stage specific files only, time footer on the first only:
git add src/validate.js src/auth.js
git commit -m "$(cat <<'EOF'
...body...
$1h
EOF
)"
git add src/other.js
git commit -m "$(cat <<'EOF'
...body for second commit, no time footer...
EOF
)"
For splits, verify no files are left unstaged after the final commit.
Subject line rules:
- Format:
{type}({scope}): {message}. - Keep
{message}under ~50 chars (type/scope don't count) - Drop trailing period if needed for space
7. Post-commit
If a changeset may be needed, remind: "Consider running /l-changeset if this needs a version bump."
Push (if requested):
If $ARGUMENTS contains -p:
git rev-parse --abbrev-ref --symbolic-full-name @{u} 2>/dev/null || git push -u origin $(git branch --show-current)
git push
If -p was not passed, remind: "Run git push when ready, or /l-commit -p next time."
When not to use it
- →When the user explicitly states not to apply commit templates
Limitations
- →Commit messages are limited to ~50 characters for the subject line
- →Only the first commit in a split sequence receives the time footer
- →File lists in commit descriptions are limited to 15 files
How it compares
This skill automates the process of creating conventional commits, including intelligent grouping and time tracking, which is more structured than manual Git commands.
Compared to similar skills
l-commit side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| l-commit (this skill) | 0 | 3mo | Review | Beginner |
| resolve-conflicts | 81 | 8mo | Review | Intermediate |
| openspec-onboard | 10 | 6mo | Review | Beginner |
| codex-cli-bridge | 9 | 9mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
resolve-conflicts
antinomyhq
Use this skill immediately when the user mentions merge conflicts that need to be resolved. Do not attempt to resolve conflicts directly - invoke this skill first. This skill specializes in providing a structured framework for merging imports, tests, lock files (regeneration), configuration files, and handling deleted-but-modified files with backup and analysis.
openspec-onboard
studyzy
Guided onboarding for OpenSpec - walk through a complete workflow cycle with narration and real codebase work.
codex-cli-bridge
alirezarezvani
Bridge between Claude Code and OpenAI Codex CLI - generates AGENTS.md from CLAUDE.md, provides Codex CLI execution helpers, and enables seamless interoperability between both tools
skill-sync
KyleKing
Syncs Claude Skills with other AI coding tools like Cursor, Copilot, and Codeium by creating cross-references and shared knowledge bases. Invoke when user wants to leverage skills across multiple tools or create unified AI context.
github-workflow-automation
ruvnet
Advanced GitHub Actions workflow automation with AI swarm coordination, intelligent CI/CD pipelines, and comprehensive repository management
git-advanced-workflows
wshobson
Master advanced Git workflows including rebasing, cherry-picking, bisect, worktrees, and reflog to maintain clean history and recover from any situation. Use when managing complex Git histories, collaborating on feature branches, or troubleshooting repository issues.