AGENT SKILL

forbotsake-upgrade

Upgrade forbotsake to the latest version. Detects install type (git clone vs vendored), runs the upgrade, and shows what's new. Use when: "upgrade forbotsake", "update forbotsake", "get latest version", "forbotsake update".

License 许可
MIT
最近更新
2026-08-17
Stars
★ 5
Forks
1

01 前言 Front Matter

name
forbotsake-upgrade
description
Upgrade forbotsake to the latest version. Detects install type (git clone vs vendored), runs the upgrade, and shows what's new. Use when: "upgrade forbotsake", "update forbotsake", "get latest version", "forbotsake update".

02 资源文件 1

03 SKILL.md 正文

/forbotsake-upgrade

Upgrade forbotsake to the latest version and show what changed.

Inline upgrade flow

This section is referenced by all skill preambles when they detect UPGRADE_AVAILABLE.

Step 1: Ask the user (or auto-upgrade)

Check if auto-upgrade is enabled:

FORBOTSAKE_HOME="${FORBOTSAKE_HOME:-$HOME/.forbotsake}"
_AUTO=""
[ -f "$FORBOTSAKE_HOME/config.yaml" ] && _AUTO=$(grep "^auto_upgrade:" "$FORBOTSAKE_HOME/config.yaml" 2>/dev/null | awk '{print $2}' || true)
echo "AUTO_UPGRADE=$_AUTO"

If AUTO_UPGRADE=true: Skip direct conversation with the user. Log "Auto-upgrading forbotsake..." and proceed to Step 2.

Otherwise, ask the user directly in conversation:

  • Question: "forbotsake v{new} is available (you're on v{old}). Upgrade now?"
  • Options: A) Yes, upgrade now B) Always keep me up to date C) Not now D) Never ask again

If A: Proceed to Step 2.

If B:

mkdir -p "$FORBOTSAKE_HOME"
echo "auto_upgrade: true" >> "$FORBOTSAKE_HOME/config.yaml"

Then proceed to Step 2.

If C: Write snooze state:

_SNOOZE_FILE="$FORBOTSAKE_HOME/update-snoozed"
_REMOTE_VER="{new}"
_CUR_LEVEL=0
if [ -f "$_SNOOZE_FILE" ]; then
  _SNOOZED_VER=$(awk '{print $1}' "$_SNOOZE_FILE")
  if [ "$_SNOOZED_VER" = "$_REMOTE_VER" ]; then
    _CUR_LEVEL=$(awk '{print $2}' "$_SNOOZE_FILE")
  fi
fi
_NEW_LEVEL=$((_CUR_LEVEL + 1))
[ "$_NEW_LEVEL" -gt 3 ] && _NEW_LEVEL=3
echo "$_REMOTE_VER $_NEW_LEVEL $(date +%s)" > "$_SNOOZE_FILE"

Tell user the snooze duration. Continue with the current skill.

If D:

mkdir -p "$FORBOTSAKE_HOME"
echo "update_check: false" >> "$FORBOTSAKE_HOME/config.yaml"

Tell user update checks are disabled.

Step 2: Detect install type

_SKILL_DIR=$(find $HOME/.codex/skills -path "*/forbotsake-upgrade/SKILL.md" -type f 2>/dev/null | head -1)
INSTALL_DIR=$(cd "$(dirname "$_SKILL_DIR")/.." && pwd)

if [ -d "$INSTALL_DIR/.git" ]; then
  INSTALL_TYPE="git"
else
  INSTALL_TYPE="vendored"
fi
echo "Install type: $INSTALL_TYPE at $INSTALL_DIR"

Step 3: Save old version

OLD_VERSION=$(cat "$INSTALL_DIR/VERSION" 2>/dev/null || echo "unknown")
echo "Old version: $OLD_VERSION"

Step 4: Upgrade

For git installs:

cd "$INSTALL_DIR"
STASH_OUTPUT=$(git stash 2>&1)
git fetch origin
git reset --hard origin/main
echo "$OLD_VERSION" > "$FORBOTSAKE_HOME/just-upgraded-from"

If $STASH_OUTPUT contains "Saved working directory", warn: "Local changes were stashed."

For vendored installs:

TMP_DIR=$(mktemp -d)
git clone --depth 1 https://github.com/forbotsake/forbotsake.git "$TMP_DIR/forbotsake"
mv "$INSTALL_DIR" "$INSTALL_DIR.bak"
mv "$TMP_DIR/forbotsake" "$INSTALL_DIR"
echo "$OLD_VERSION" > "$FORBOTSAKE_HOME/just-upgraded-from"
rm -rf "$INSTALL_DIR.bak" "$TMP_DIR"

Step 5: Show what's new

NEW_VERSION=$(cat "$INSTALL_DIR/VERSION" 2>/dev/null || echo "unknown")
echo "Upgraded: $OLD_VERSION → $NEW_VERSION"

Read $INSTALL_DIR/CHANGELOG.md and show the entries between old and new version.

Tell the user: "forbotsake upgraded to v{new}. Here's what changed: ..."

Step 6: Refresh symlinks

After upgrading, refresh symlinks to pick up any new skills added in the new version:

bash "$INSTALL_DIR/bin/sync-links.sh"

Step 7: Verify

# Verify installation health
bash "$INSTALL_DIR/bin/sync-links.sh" --check

If the check reports missing skills, re-run bash "$INSTALL_DIR/bin/sync-links.sh" to repair. If that fails, suggest reinstalling: bash "$INSTALL_DIR/bin/install.sh"

04 同仓库更多 Skills

forbotsake
forbotsake/forbotsake

forbotsake-upgrade

Upgrade forbotsake to the latest version. Detects install type (git clone vs vendored), runs the upgrade, and shows what's new. Use when: "upgrade forbotsake", "update forbotsake", "get latest version", "forbotsake update".

★ 5
forbotsake
forbotsake/forbotsake

forbotsake-spy

Stage 3: RESEARCH (competitors). Analyzes 3-5 competitors to find messaging whitespace and positioning gaps. Produces competitor-analysis.md with a messaging matrix showing what each competitor says, what's missing, and where you can win. Use when: "competitor analysis", "competitive research", "what are others doing", "market landscape", "who am I competing with", "spy on competitors", "messaging whitespace", "differentiation research". Proactively invoke when the user mentions competitors or asks how to differentiate.

资料检索与研究
★ 5
forbotsake
forbotsake/forbotsake

forbotsake-sharpen

Stage 4.5: SHARPEN. Takes a specific outreach target (person or organization) and produces a deep execution plan with contextual research, relationship mapping, angle selection, and a multi-touch sequence. Reads your founder profile and strategy to leverage warm paths and unfair advantages. Use when: "refine this plan", "go deeper on this", "sharpen execution", "how do I approach [person]", "outreach to [person]", "target [person/org]", "approach [person]", "engage [org]". Proactively invoke when the user mentions approaching a specific person or organization as part of their marketing strategy. Requires: strategy.md (from /forbotsake-marketing-start).

市场营销营销推广资料检索与研究
★ 5
forbotsake
forbotsake/forbotsake

forbotsake-retro

Stage 9: MEASURE. Reviews what you published, analyzes performance data, and produces a retro report with evidence-based recommendations. Tells you what to double down on, what to drop, and what to try next. Use when: "what worked", "marketing retro", "measure results", "review performance", "which content performed best", "should I keep doing this". Proactively invoke one week after /forbotsake-publish was last run.

市场营销营销推广
★ 5
forbotsake
forbotsake/forbotsake

forbotsake-publish

Stage 8: SHIP. Two modes: POST (auto-post via Claude for Chrome) or COPY (format for copy-paste). Handles X/Twitter threads, LinkedIn posts, blog posts, and more. Logs everything for retrospective analysis. For auto-posting, the user needs the Claude for Chrome extension installed. Without it, the skill falls back to COPY mode automatically. Use when: "publish this", "format for twitter", "post to X", "ship this content", "format for blog", "send this email", "ready to publish", "auto-post", "post this to X", "publish to LinkedIn". Proactively invoke when the user has content in content/ and says they want to ship it.

内容创作者邮件与沟通写作与文案
★ 5
forbotsake
forbotsake/forbotsake

forbotsake-marketing-start

The starting point for marketing your product. Reads your codebase to understand what you built, asks 5 hard questions about positioning, audience, and channels, then produces strategy.md with your marketing strategy and first concrete move. Use when: "how should I market this", "go-to-market", "GTM", "positioning", "I don't know how to sell this", "help me market", "marketing strategy". Proactively invoke when the user asks about marketing, growth, or getting users and no strategy.md exists yet.

市场营销营销推广
★ 5