agentleFS
MithunWijayasiriMithunWijayasiri/dotclaude/skills/empty-commit/SKILL.md

empty-commit

Skill4 starsChanged 17 days agoMITView on GitHub

Use when a CI pipeline failed on something unrelated to the code and the PR is blocked — pushes an empty commit to re-trigger CI on the current branch.

  • Commits and pushes

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Commit, subject only, no trailer of any kind:

    line 16
  2. Distinctive:

    Only pipelines triggered by a push to the branch or its PR.

    line 29

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Empty Commit

Empty commit + push → CI re-runs on the current branch. Zero file changes, so nothing can regress.

Any step fails → stop, report what failed; do not work around.

  1. Nothing staged: git diff --cached --quiet. Non-zero → --allow-empty would commit the staged files; list them (git diff --cached --name-only), stop.
  2. Branch: git rev-parse --abbrev-ref HEAD. HEAD (detached), main, or master → stop; empty commit on a shared branch is noise.
  3. Upstream: git rev-parse --abbrev-ref --symbolic-full-name @{u}. Fails → no upstream set; stop, ask user which case: never pushed → git push -u origin <branch> alone triggers CI; already pushed without -u → git branch -u <remote>/<branch>, re-run (re-pushing the same commit triggers nothing).
  4. Commit, subject only, no trailer of any kind:

    git commit --allow-empty -m "chore: trigger pipeline re-run"
  5. git push. Fails → commit exists locally, not pushed; say so.
  6. Report one line: short SHA, branch, PR link if push output printed one.

Unstaged and untracked files are ignored, they stay untouched.

Caveat — which pipelines this actually re-runs

Only pipelines triggered by a push to the branch or its PR. Config varies by provider:

ProviderRe-runsDoes not re-run
GitHub Actionson: push, on: pull_requeston: workflow_dispatch only
GitLab CIjobs matching rules: / workflow:rules for the branch or MRwhen: manual jobs
Bitbucket Pipelinespull-requests, branchescustom

Manually-triggered pipelines never fire from a commit. If the red check is one of those, an empty commit does nothing — say so and point the user at re-running it by hand, with any variables it prompts for.

Unsure which kind → check the CI config in the repo (.github/workflows/, .gitlab-ci.yml, bitbucket-pipelines.yml).

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.