commit

Stages changes, runs pre-commit checks, and commits code to a branch.

9|8|Updated Jun 28, 2024
One-click install
npx skills add https://github.com/MetaMask/ocap-kernel --skill commit-metamask
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: commit
Source: https://github.com/MetaMask/ocap-kernel/tree/main/.claude/skills/commit
Command: npx skills add https://github.com/MetaMask/ocap-kernel --skill commit-metamask

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers consistently create commits with optional pre-checks, ensuring that code changes are validated before being recorded in the history.

Core Features & Use Cases

  • Optional checks before commit (lint, tests, build) to ensure code health
  • Commit on the current branch or automatically create a new feature branch
  • Draft conventional commit messages and log the commit metadata for traceability
  • Guard against committing sensitive data and encourage clean change history

Quick Start

Use the commit skill to stage your changes, run pre-checks, and emit a formatted commit message on the target branch.

Frequently Asked Questions about commit

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

FAQPage Schema
How do I automate git commits with pre-commit checks for linting and tests?

You can automate git commits by staging changes, running pre-commit checks for linting and tests, and committing code only if validations pass, ensuring code health before changes are recorded in history.

Can I automatically create a new feature branch when committing code changes?

Yes, you can commit code changes directly to the current branch or automatically create a new feature branch, streamlining branching workflows while applying required pre-checks before saving the commit.

What is the best way to generate conventional commit messages for version control?

The best way to generate conventional commit messages is to automate drafting them during the staging process, logging commit metadata for traceability to maintain a clean and consistent version control history.

How does this workflow prevent committing secrets or sensitive data to git?

This workflow guards against committing sensitive data by checking staged changes before finalizing the git commit, preventing secrets from being recorded in your version control history.

Do I need to run builds locally before committing code to a feature branch?

You can configure the commit process to run builds locally as a pre-check; the commit will only proceed if the build passes, ensuring code changes are validated before being saved to the branch.

Why does my code commit fail when linting checks do not pass?

Your code commit fails because pre-commit checks for linting and tests validate code health before saving changes, preventing unvalidated or broken code from being recorded in the version control history.