agentleFS
SrltasSrltas/claude-skills/submodule-bump/SKILL.md

submodule-bump

Skill0 starsChanged 12 days agoMITView on GitHub

Pin a CUBRID submodule (jdbc, cci, cms) to a commit by dispatching the bump Action on CUBRID/cubrid, after validating the SHA and the direction of the move. --status shows what each submodule is pinned to and what is pending, without changing anything.

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read-only, so run it without asking first.

    line 21
  2. Very specific:

    Never jump to --run without the Step 2 validation.

    line 84

≈ “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

Bump a CUBRID submodule to a commit

Dispatch submodule-bump-receiver.yml on CUBRID/cubrid so the parent repo pins a submodule to the commit you name. The Action opens a bump PR (or updates the open one). Normally the bump is automatic, one commit per PR; run this only when you need to catch up, pin a specific commit, or restart a stalled bump.

This triggers a real Action and touches a PR on the main repo. Never dispatch without showing the user what will happen and getting a yes.

Step 0: Check the state first (read-only)

bash ${CLAUDE_SKILL_DIR}/assets/bump_submodule.sh --status             # all three, at a glance
bash ${CLAUDE_SKILL_DIR}/assets/bump_submodule.sh <submodule> --status # that one's pending commits

Read-only, so run it without asking first. One call reports, for all three submodules, the pinned SHA, the submodule head, how many commits are pending, and the open bump PR.

When the open PR already pins the head there is nothing to dispatch: merging that PR is the whole job. The script says just merge it in that case, so guide the user to merge rather than suggesting a run.

The per-submodule view lists only the commits added after the pinned one, oldest first and numbered (up to 20; beyond that it states how many remain). That number is exactly "how far to bump", so pick the SHA here when the user wants to stop at a specific commit.

Step 1: Resolve the target

What the user saysworkflow input submodule_pathsubmodule repo
jdbc, cubrid-jdbccubrid-jdbccubrid/cubrid-jdbc
cci, cubrid-ccicubrid-cciCUBRID/cubrid-cci
cms, manager, cubridmanager, cubrid-manager-servercubridmanagerCUBRID/cubrid-manager-server

cubrid-manager-server is the repository name; cubridmanager is the submodule path the workflow expects. The helper accepts either.

The SHA can be a full 40-char SHA, a short SHA (it is expanded), or latest for that submodule's develop head. Anything else is rejected.

Step 2: Validate (dry run, dispatches nothing)

bash ${CLAUDE_SKILL_DIR}/assets/bump_submodule.sh <submodule> <sha|latest>

It prints the currently pinned SHA, the target, the direction of the move, and a compare link, then shows the exact gh command without running it. It refuses, and dispatches nothing, when:

RefusalMeaning
not a bumpable submodulenot one of the three allowed
not a commit SHA / not foundnot a SHA, or no such commit in that repo
not merged into developthe commit is not on the submodule's develop yet
already pins …that commit is already pinned
BEHIND the pinned oneit is an older commit. To roll back, make a revert commit in the submodule and pin that
history looks rewrittena force-push rewrote history. --reanchor is required

Step 3: Show it and get confirmation

Show the user the summary from Step 2 (pinned -> target, how many commits, the compare link) and ask whether to dispatch. Do not run it on your own initiative.

Everything up to the chosen SHA comes in: you cannot cherry-pick a middle commit. Naming commit 3 brings 1 and 2 with it.

Step 4: Dispatch

bash ${CLAUDE_SKILL_DIR}/assets/bump_submodule.sh <submodule> <sha|latest> --run

Then report the run:

gh run list --repo CUBRID/cubrid --workflow submodule-bump-receiver.yml --limit 3

--reanchor (normally never)

The parent records one anchor commit to mark how far it has bumped. If a force-push rewrites the submodule's history, that anchor disappears from develop and the workflow stops. --reanchor is only for that: name the corresponding commit in the new history and it re-attaches the anchor there.

On healthy history it does nothing, and it cannot move the pin backward. Add it only when the user explicitly asks: never on your own judgement.

Guardrails

  • This skill runs only submodule-bump-receiver.yml on CUBRID/cubrid. Never point gh workflow run at another workflow or repo.
  • Anything outside the three allowed submodules is refused without running gh at all.
  • Never jump to --run without the Step 2 validation.
  • A failure leaves the parent repo untouched: bad input is refused before anything is pinned.

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.