Agent skill
commit
Creates commits with conventional format and validation. Use when committing changes or generating commit messages.
Install this agent skill to your Project
npx add-skill https://github.com/yonatangross/orchestkit/tree/main/plugins/ork/skills/commit
Metadata
Additional technical details for this skill
- category
- workflow-automation
SKILL.md
Smart Commit
Simple, validated commit creation. Run checks locally, no agents needed for standard commits.
Note: If
disableSkillShellExecutionis enabled (CC 2.1.91), the git repository check won't run. This skill requires a git repository.
Quick Start
/ork:commit
/ork:commit fix typo in auth module
Argument Resolution
COMMIT_MSG = "$ARGUMENTS" # Optional commit message, e.g., "fix typo in auth module"
# If provided, use as commit message. If empty, generate from staged changes.
# $ARGUMENTS[0] is the first token (CC 2.1.59 indexed access)
Workflow
Phase 1: Pre-Commit Safety Check
# CRITICAL: Verify we're not on dev/main
BRANCH=$(git branch --show-current)
if [[ "$BRANCH" == "dev" || "$BRANCH" == "main" || "$BRANCH" == "master" ]]; then
echo "STOP! Cannot commit directly to $BRANCH"
echo "Create a feature branch: git checkout -b issue/<number>-<description>"
exit 1
fi
Phase 2: Run Validation Locally
Run every check that CI runs:
# Backend (Python)
poetry run ruff format --check app/
poetry run ruff check app/
poetry run mypy app/
# Frontend (Node.js)
npm run format:check
npm run lint
npm run typecheck
Fix any failures before proceeding.
Phase 3: Review Changes
git status
git diff --staged # What will be committed
git diff # Unstaged changes
Phase 3b: Agent Attribution (automatic)
Before committing, check for the branch activity ledger at .claude/agents/activity/{branch}.jsonl.
If it exists and has entries since the last commit, include them in the commit message:
- Read
.claude/agents/activity/{branch}.jsonl(one JSON object per line) - Filter entries where
tsis after the last commit timestamp (git log -1 --format=%cI) - Skip agents with
duration_ms < 5000(advisory-only agents go in PR, not commits) - Add an "Agents Involved:" section between the commit body and the Co-Authored-By trailer
- Add per-agent
Co-Authored-Bytrailers:Co-Authored-By: ork:{agent} <noreply@orchestkit.dev>
If the ledger doesn't exist or is empty, skip this step — commit normally.
Phase 4: Stage and Commit
# Stage files
git add <files>
# Or all: git add .
# Commit with conventional format (with agent attribution if ledger exists)
git commit -m "<type>(#<issue>): <brief description>
- [Change 1]
- [Change 2]
Agents Involved:
backend-system-architect — API design + data models (2m14s)
security-auditor — Dependency audit (0m42s)
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: ork:backend-system-architect <noreply@orchestkit.dev>
Co-Authored-By: ork:security-auditor <noreply@orchestkit.dev>"
# Verify
git log -1 --stat
Handoff File
After successful commit, write handoff:
Write(".claude/chain/committed.json", JSON.stringify({
"phase": "commit", "sha": "<commit-sha>",
"message": "<commit-message>", "branch": "<branch>",
"files": [<staged-files>]
}))
Commit Types
| Type | Use For |
|---|---|
feat |
New feature |
fix |
Bug fix |
refactor |
Code improvement |
docs |
Documentation |
test |
Tests only |
chore |
Build/deps/CI |
Rules
- Run validation locally - Don't spawn agents to run lint/test
- NO file creation - Don't create MD files or documentation
- One logical change per commit - Keep commits focused
- Reference issues - Use
#123format in commit message - Subject line < 72 chars - Keep it concise
Quick Commit
For trivial changes (typos, single-line fixes):
git add . && git commit -m "fix(#123): Fix typo in error message
Co-Authored-By: Claude <noreply@anthropic.com>"
Verification Gate
Before committing, apply the 5-step gate: Read("${CLAUDE_PLUGIN_ROOT}/skills/shared/rules/verification-gate.md"). Run tests fresh. Read the output. Only commit if tests pass. "Should be fine" is not evidence.
Related Skills
ork:create-pr: Create pull requests from commitsork:review-pr: Review changes before committingork:fix-issue: Fix issues and commit the fixesork:issue-progress-tracking: Auto-updates GitHub issues with commit progress
Rules
Each category has individual rule files in rules/ loaded on-demand:
| Category | Rule | Impact | Key Pattern |
|---|---|---|---|
| Atomic Commits | ${CLAUDE_SKILL_DIR}/rules/atomic-commit.md |
CRITICAL | One logical change per commit, atomicity test |
| Branch Protection | ${CLAUDE_SKILL_DIR}/rules/branch-protection.md |
CRITICAL | Protected branches, required PR workflow |
| Commit Splitting | ${CLAUDE_SKILL_DIR}/rules/commit-splitting.md |
HIGH | git add -p, interactive staging, separation strategies |
| Conventional Format | ${CLAUDE_SKILL_DIR}/rules/conventional-format.md |
HIGH | type(scope): description, breaking changes |
| History Hygiene | ${CLAUDE_SKILL_DIR}/rules/history-hygiene.md |
HIGH | Squash WIP, fixup commits, clean history |
| Issue Reference | ${CLAUDE_SKILL_DIR}/rules/issue-reference-required.md |
HIGH | Reference issue #N in commits on issue branches |
| Merge Strategy | ${CLAUDE_SKILL_DIR}/rules/merge-strategy.md |
HIGH | Rebase-first, conflict resolution, force-with-lease |
| Stacked PRs | ${CLAUDE_SKILL_DIR}/rules/stacked-pr-workflow.md |
HIGH | Stack planning, PR creation, dependency tracking |
| Stacked PRs | ${CLAUDE_SKILL_DIR}/rules/stacked-pr-rebase.md |
HIGH | Rebase management, force-with-lease, retargeting |
Total: 9 rules across 7 categories
References
Load on demand with Read("${CLAUDE_SKILL_DIR}/references/<file>"):
| File | Content |
|---|---|
references/conventional-commits.md |
Conventional commits specification |
references/recovery.md |
Recovery procedures |
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
expect
Diff-aware AI browser testing — analyzes git changes, generates targeted test plans, and executes them via agent-browser. Reads git diff to determine what changed, maps changes to affected pages via route map, generates a test plan scoped to the diff, and runs it with pass/fail reporting. Use when testing UI changes, verifying PRs before merge, running regression checks on changed components, or validating that recent code changes don't break the user-facing experience.
github-operations
GitHub CLI operations for issues, PRs, milestones, and Projects v2. Covers gh commands, REST API patterns, and automation scripts. Use when managing GitHub issues, PRs, milestones, or Projects with gh.
chain-patterns
Chain patterns for CC 2.1.71 pipelines — MCP detection, handoff files, checkpoint-resume, worktree agents, CronCreate monitoring. Use when building multi-phase pipeline skills. Loaded via skills: field by pipeline skills (fix-issue, implement, brainstorm, verify). Not user-invocable.
storybook-mcp-integration
Storybook MCP server integration for component-aware AI development. Covers 6 tools across 3 toolsets (dev, docs, testing): component discovery via list-all-documentation/get-documentation, story previews via preview-stories, and automated testing via run-story-tests. Use when generating components that should reuse existing Storybook components, running component tests via MCP, or previewing stories in chat.
component-search
Search 21st.dev component registry for production-ready React components. Finds components by natural language description, filters by framework and style system, returns ranked results with install instructions. Use when looking for UI components, finding alternatives to existing components, or sourcing design system building blocks.
ai-ui-generation
AI-assisted UI generation patterns for json-render, v0, Bolt, and Cursor workflows. Covers prompt engineering for component generation, review checklists for AI-generated code, design token injection, refactoring for design system conformance, and CI gates for quality assurance. Use when generating UI components with AI tools, rendering multi-surface MCP visual output, reviewing AI-generated code, or integrating AI output into design systems.
Didn't find tool you were looking for?