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

rmbc-upgrade

Skill4 starsChanged 8 months agoMITView on GitHub

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

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 24
  2. Very specific:

    Read $_RMBC_ROOT/CHANGELOG.md.

    line 74
  3. Distinctive:

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

    line 76
  4. Very specific:

    When user runs /rmbc-upgrade directly:

    line 86
  5. Very specific:

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

    line 102
  6. Very specific:

    If output is empty or UP_TO_DATE: tell user "RMBC Skills v{version} is up to date."

    line 104
  7. Very specific:

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

    line 106

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

Inline Upgrade Flow

Called by other skills when preamble output contains UPGRADE_AVAILABLE <old> <new>.

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} is available (you have v{old}). 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}"
    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}!" 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: tell user "RMBC Skills v{version} 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.