agentleFS
coleschaffercoleschaffer/dtc-copywriting-skills/skills/rmbc-upgrade/SKILL.md

rmbc-upgrade

Skill24 starsChanged 9 months agoMITView on GitHub

Upgrade RMBC Skills to the latest version and show what's new.

1 other project uses a version of this, 1 of them edited.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 1 is distinctive, and 6 are 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.

  • 6

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If AUTO_UPGRADE is true: skip to Step 2 immediately.

    line 26
  2. Very specific:

    Read $_RMBC_ROOT/CHANGELOG.md.

    line 76
  3. Distinctive:

    If CHANGELOG.md is missing or has no entries for the version range, say "Upgraded successfully" without changelog details.

    line 78
  4. Very specific:

    When user runs /rmbc-upgrade directly:

    line 88
  5. Very specific:

    If output contains UPGRADE_AVAILABLE: follow the Inline Upgrade Flow above (Step 1 onward).

    line 104
  6. Very specific:

    If output is empty or UP_TO_DATE: read $_RMBC_ROOT/VERSION and tell user "RMBC Skills v$CUR_VER is up to date."

    line 106
  7. Very specific:

    If output contains JUST_UPGRADED: read CHANGELOG.md, show what's new since the old version.

    line 108

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

RMBC Skills Upgrade

Two modes: inline (called by preambles when UPGRADE_AVAILABLE detected) and standalone (/rmbc-upgrade).

Variable convention: OLD_VER and NEW_VER refer to version strings parsed from preamble output (e.g., from UPGRADE_AVAILABLE 1.0.1 1.1.0, OLD_VER=1.0.1 and NEW_VER=1.1.0). CUR_VER refers to the currently installed version from $_RMBC_ROOT/VERSION.

Inline Upgrade Flow

Called by other skills when preamble output contains UPGRADE_AVAILABLE <old> <new>. Parse the two version strings into OLD_VER and NEW_VER.

Step 1: Check auto-upgrade config

source "$_RMBC_ROOT/lib/rmbc-common.sh"
_AUTO=$(rmbc_config_get auto_upgrade)
echo "AUTO_UPGRADE: ${_AUTO:-false}"

If AUTO_UPGRADE is true: skip to Step 2 immediately.

Otherwise, present AskUserQuestion:

  • Question: "RMBC Skills v$NEW_VER is available (you have v$OLD_VER). What would you like to do?"
  • Options:
    1. "Upgrade now"
    2. "Always auto-upgrade"
    3. "Remind me later"
    4. "Never ask again"

Handle responses:

  • Upgrade now: proceed to Step 2
  • Always auto-upgrade:
    source "$_RMBC_ROOT/lib/rmbc-common.sh"
    rmbc_config_set auto_upgrade true
    Then proceed to Step 2.
  • Remind me later (snooze):
    _SNOOZE_FILE="$HOME/.rmbc-skills/update-snoozed"
    _NEW="$NEW_VER"
    if [ -f "$_SNOOZE_FILE" ]; then
      _LEVEL=$(awk '{print $2}' "$_SNOOZE_FILE" 2>/dev/null || echo "0")
      _LEVEL=$((_LEVEL + 1))
    else
      _LEVEL=1
    fi
    echo "$_NEW $_LEVEL $(date +%s)" > "$_SNOOZE_FILE"
    Tell user snoozed (level 1=24h, 2=48h, 3+=7d). Continue with original skill.
  • Never ask again:
    touch "$HOME/.rmbc-skills/update-check-disabled"
    Tell user update checks disabled. Mention they can re-enable with /rmbc-upgrade. Continue with original skill.

Step 2: Run upgrade

"$_RMBC_ROOT/bin/rmbc-upgrade" 2>&1

Parse output lines:

  • INSTALL_TYPE=X — note for user
  • UPGRADED <old> <new> — confirm success
  • STASH_WARNING=true — warn user about stashed local changes

Step 3: Show what's new

Read $_RMBC_ROOT/CHANGELOG.md. Extract entries between the old and new version headers (## X.Y.Z). Present as 5-7 themed bullets summarizing the changes.

If CHANGELOG.md is missing or has no entries for the version range, say "Upgraded successfully" without changelog details.

Step 4: Continue

Tell user "Now running RMBC Skills v$NEW_VER!" and continue with the original skill that triggered the upgrade.


Standalone Mode

When user runs /rmbc-upgrade directly:

Step 1: Locate package root

_RMBC_ROOT=""
[ -d "${CLAUDE_SKILL_DIR}/../../bin" ] && _RMBC_ROOT="$(cd "${CLAUDE_SKILL_DIR}/../.." && pwd)"
[ -z "$_RMBC_ROOT" ] && for _D in "$HOME/.claude/skills/dtc-copywriting-skills" ".claude/skills/dtc-copywriting-skills"; do [ -f "$_D/VERSION" ] && _RMBC_ROOT="$_D" && break; done

Step 2: Force check

"$_RMBC_ROOT/bin/rmbc-update-check" --force 2>/dev/null || true

If output contains UPGRADE_AVAILABLE: follow the Inline Upgrade Flow above (Step 1 onward).

If output is empty or UP_TO_DATE: read $_RMBC_ROOT/VERSION and tell user "RMBC Skills v$CUR_VER is up to date."

If output contains JUST_UPGRADED: read CHANGELOG.md, show what's new since the old version.

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.