commit

Automates git commits with targeted formatting, selective staging, and Conventional Commit messages.

152|115|Updated Aug 3, 2020
One-click install
npx skills add https://github.com/OriginProtocol/origin-dollar --skill commit-originprotocol
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: commit
Source: https://github.com/OriginProtocol/origin-dollar/tree/main/.codex/skills/commit
Command: npx skills add https://github.com/OriginProtocol/origin-dollar --skill commit-originprotocol

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Creating clean, well-formatted git commits requires inspecting diffs, running formatters, staging files carefully, and writing consistent commit messages. This Skill automates that entire workflow so a single request produces a properly formatted, safely staged Conventional Commit. ## Core Features & Use Cases - Targeted Formatting: Runs forge fmt, prettier with the Solidity plugin, or yarn lint only on changed files, never the whole repository. - Safe Staging: Stages tracked and untracked files individually while skipping likely secrets such as .env files, private keys, and credential files. - Conventional Commit Messages: Generates type(scope): description messages using repo-specific scopes like lido, etherfi, arm, and deploy. - Use Case: After editing Solidity contracts and JS files, simply ask to commit the changes and get a formatted, staged, and committed result like feat(lido): add withdrawal queue support. ## Quick Start Ask the assistant to commit your current changes and it will inspect the diff, format affected files, stage them safely, and create a Conventional Commit.

Frequently Asked Questions about commit

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

FAQPage Schema
How do I create a Conventional Commit message automatically?

The commit workflow analyzes the staged diff and generates a type(scope): description message using types like feat, fix, refactor, and test. It uses imperative mood, lowercase, and keeps the subject under 72 characters.

How to format only changed Solidity files before committing?

Changed .sol files under contracts/tests/ are formatted with forge fmt, while other Solidity files use npx prettier with prettier-plugin-solidity. Only files listed by git diff and git ls-files are formatted, never the whole repository.

Does the commit workflow stage .env or credential files?

No, it skips and warns on likely secrets including .env files, names containing credential or secret, and private key files like .pem, .p12, .pfx, and .key. Files are staged individually rather than with git add -A.

What happens if pre-commit hooks fail during a commit?

The workflow never uses --no-verify to bypass hooks. If hooks fail, the underlying issue is fixed, files are re-staged, and a new commit is created instead of skipping validation.

Can the commit skill push changes or amend commits?

It only pushes when the user explicitly requests it, running git push or git push -u origin for the branch. It never amends commits or force pushes unless the user explicitly asks.