mj-agent-git-commit

Creates Git commits enforcing type(scope) message format and branch-type discipline.

1|Updated Mar 4, 2026
One-click install
npx skills add https://github.com/MJ-AgentLab/mj-agent --skill mj-agent-git-commit-mj-agentlab
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: mj-agent-git-commit
Source: https://github.com/MJ-AgentLab/mj-agent/tree/main/.claude/skills/mj-agent-git-commit
Command: npx skills add https://github.com/MJ-AgentLab/mj-agent --skill mj-agent-git-commit-mj-agentlab

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Committing code in the mj-agent repository requires strict adherence to a commit message convention (type(scope): summary), a closed 12-scope allowlist, and a branch-type compatibility matrix. Manual commits often violate these rules, causing rework at push time, and risk accidentally staging secrets like .env files or private keys. ## Core Features & Use Cases - Six-step pre-commit workflow: Verifies working location, reviews changes, composes the commit message, enforces type/branch discipline, evaluates split necessity, and executes the commit. - Secret and file exclusion guardrails: Hard-blocks staging of .env, decrypted secrets, and private keys (*.pem, *.key, *.p12), and warns on files over 10 MB. - Scope inference and split guidance: Derives the correct scope from modified file paths using the 12-scope closed allowlist and recommends splitting commits that span unrelated scopes or mix feat with refactor. - Use Case: You finished a bugfix on branch bugfix/qcm-yaml-encoding and ask to commit. The skill checks the branch, stages only the intended files, validates that type fix is allowed on a bugfix branch, and produces a compliant message like fix(sql): handle Chinese qcm names in yaml parsing. ## Quick Start Ask the assistant to stage my current changes and create a compliant commit for this branch in mj-agent.

Frequently Asked Questions about mj-agent-git-commit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write a conventional commit message with type and scope?▼

Use the format type(scope): summary, where type is one of feat, fix, perf, refactor, test, docs, or infra, and scope comes from a closed 12-item allowlist such as agent, sql, or config. The summary must be under 72 characters with no trailing period.

How do I split a large Git change into multiple commits?▼

Split when staged files span two or more unrelated scopes, mix feat with refactor, or exceed roughly 300 lines across five files. Stage and commit each logical unit separately, keeping functional code together with its tests.

Which commit types are allowed on each Git branch type?▼

Feature branches allow feat, perf, refactor, test, and docs; bugfix branches allow fix, test, and docs; documentation branches allow only docs; maintain branches allow infra and docs; hotfix branches allow only fix. Mismatches trigger a warning with options to adjust the type.

Why is git add -A discouraged when staging files?▼

git add -A stages all untracked files, which can accidentally include secrets like .env, decrypted key material, or local artifacts. Staging files individually by name or using git add -u for tracked modifications is safer.

What happens if I try to commit directly on main or develop?▼

The commit is hard-blocked with no override option. You must switch to a temporary working branch such as feature, bugfix, documentation, maintain, or hotfix before committing.

Can I commit changes to in-source SKILL.md or system prompt files?▼

Yes, but these changes trigger a mandatory human review checkpoint because they are canonical behavior definitions. The recommended path is to propose the diff through the skill-doc improvement workflow and get review before committing.