commit-code
Skill8 starsChanged 6 months agoApache-2.0View on GitHub
Analyze code changes to prepare conventional commit message and commit to a new branch.
- Reads credentials
- Commits and pushes
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 8 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Run this skill when asked to commit code changes, create a commit message, or push changes to a new branch.
- Distinctive: line 12
Ask the user the following question:
- Distinctive: line 20
If the user has already provided the answer upfront, skip the question and use the provided value.
- Distinctive: line 38
If the command fails, try again only one more time.
- Very specific: line 56
Before proceeding, list the staged files and check for potentially sensitive files (e.g.
- Distinctive: line 62
If any staged file matches a sensitive pattern, pause and ask the user to confirm whether it should be included in the commit.
- Distinctive: line 79
Must be descriptive and mention all relevant changes.
- Very specific: line 81
NEVER include a scope — do NOT use <TYPE>(scope): ...
- Distinctive: line 112
NEVER commit to main or master directly — always create a new branch.
- Very specific: line 113
If pre-commit run -a fails, try again only one more time.
- Distinctive: line 115
If the working directory has no staged or unstaged changes, report this and stop.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Commit Code Skill
Run this skill when asked to commit code changes, create a commit message, or push changes to a new branch.
Step 1 — Collect input
Ask the user the following question:
Kindly let me know:
1. Branch Name: What should I name the new branch? (name of the branch)If the user has already provided the answer upfront, skip the question and use the provided value.
Step 2 — Create a new branch
git checkout -b <BRANCH_NAME>Step 3 — Run pre-commit checks (if .pre-commit-config.yaml exists)
pre-commit run -aIf the command fails, try again only one more time. If it fails again, report the output to the user and stop. Do not continue until the user resolves any failures.
Step 4 — Run Terraform formatting (if Terraform files exist)
terraform fmt -recursiveStep 5 — Stage all changes, analyze them and commit
git add .Before proceeding, list the staged files and check for potentially sensitive files (e.g. .env, *.pem, *.key, *credentials*, *secret*, *token*, *password*):
git diff --cached --name-onlyIf any staged file matches a sensitive pattern, pause and ask the user to confirm whether it should be included in the commit. Do not proceed until confirmed.
And then analyze the code changes in each staged file with the following command:
git diff --cached -- <FILE_PATH>Then based on all the code changes, determine the appropriate conventional commit type, compose a single one-liner commit message, and commit the changes with the following command:
git commit -m "<TYPE>: <COMMIT_MESSAGE>"Commit message rules
- Single line only — no multi-line messages.
- Must be descriptive and mention all relevant changes.
- First letter of
<COMMIT_MESSAGE>must be capitalized. - NEVER include a scope — do NOT use
<TYPE>(scope): ...format, even if a Jira ticket or branch name is provided. - Examples:
fix: Fix memory leak in runner cleanup,feat: Add retry logic for failed jobs,feat!: Drop support for Node 16 - Reference: https://www.conventionalcommits.org/en/v1.0.0/
Conventional commit types
| Type | When to use |
feat | A new feature |
fix | A bug fix |
docs | Documentation only changes |
style | Formatting changes that do not affect code meaning |
refactor | Code change that neither fixes a bug nor adds a feature |
perf | Code change that improves performance |
test | Adding or correcting tests |
chore | Build process or auxiliary tool changes |
ci | Changes to CI configuration files and scripts |
build | Changes that affect the build system or external dependencies |
Step 6 — Push the new branch
git push origin $(git rev-parse --abbrev-ref HEAD) --set-upstreamRules
- NEVER commit to
mainormasterdirectly — always create a new branch. - If
pre-commit run -afails, try again only one more time. If it fails again, stop and report the errors before proceeding. - The commit message must be a single line — never use
\nor multi-line-mflags. - If the working directory has no staged or unstaged changes, report this and stop.
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- hmislk/hmis★ 240same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository54 other files it gives its agents.
- alibabacloud-cliSkill
- ansible-cliSkill
- appdynamics-cliSkill
- argocd-cliSkill
- aws-cliSkill
- aws-cloudwatch-cliSkill
- azure-cliSkill
- bash-lintingSkill
- betterstack-cliSkill
- bitbucket-cliSkill
- chef-cliSkill
- code-reviewSkill
- create-dockerfileSkill
- create-terraform-helm-upgrade-planSkill
- datadog-cliSkill
- digitalocean-cliSkill
- dockerfile-lintingSkill
- dynatrace-cliSkill
- elasticsearch-cliSkill
- gcp-cliSkill
- github-cliSkill
- gitlab-cliSkill
- go-lintingSkill
- grafana-cliSkill
- grafana-loki-cliSkill
- graylog-cliSkill
- helm-cliSkill
- hetzner-cliSkill
- huaweicloud-cliSkill
- jaeger-cliSkill
- jenkins-cliSkill
- jira-and-confluence-cliSkill
- kibana-cliSkill
- kubernetes-cliSkill
- loggly-cliSkill
- maintenance-check-aws-eksSkill
- maintenance-create-ticket-on-jiraSkill
- ms-teams-cliSkill
- mysql-cliSkill
- newrelic-cliSkill
- oci-cliSkill
- packer-cliSkill
- papertrail-cliSkill
- postgresql-cliSkill
- prometheus-cliSkill
- python-lintingSkill
- rollbar-cliSkill
- salesforce-cliSkill
- sentry-cliSkill
- slack-cliSkill
- splunk-cliSkill
- terraform-cliSkill
- terraform-lintingSkill
- vault-cliSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

