name: gstack-upgrade version: 1.1.0 description: Upgrade gstack to the latest version. triggers:
- upgrade gstack
- update gstack version
- get latest gstack allowed-tools:
- Bash
- Read
- Write
- AskUserQuestion
When to invoke this skill
Detects global vs vendored install, runs the upgrade, and shows what's new. Use when asked to "upgrade gstack", "update gstack", or "get latest version".
Voice triggers (speech-to-text aliases): "upgrade the tools", "update the tools", "gee stack upgrade", "g stack upgrade".
/gstack-upgrade
Upgrade gstack to the latest version and show what's new.
Inline upgrade flow
This section is referenced by all skill preambles when they detect UPGRADE_AVAILABLE.
Step 1: Ask the user (or auto-upgrade)
First, check if auto-upgrade is enabled:
_AUTO=""
[ "${GSTACK_AUTO_UPGRADE:-}" = "1" ] && _AUTO="true"
[ -z "$_AUTO" ] && _AUTO=$(~/.claude/skills/gstack/bin/gstack-config get auto_upgrade 2>/dev/null || true)
echo "AUTO_UPGRADE=$_AUTO"
If AUTO_UPGRADE=true or AUTO_UPGRADE=1: Skip AskUserQuestion. Log "Auto-upgrading gstack v{old} → v{new}..." and proceed directly to Step 2. If ./setup fails during auto-upgrade, restore from backup (.bak directory) and warn the user: "Auto-upgrade failed — restored previous version. Run /gstack-upgrade manually to retry."
Otherwise, use AskUserQuestion:
- Question: "gstack v{new} is available (you're on v{old}). Upgrade now?"
- Options: ["Yes, upgrade now", "Always keep me up to date", "Not now", "Never ask again"]
If "Yes, upgrade now": Proceed to Step 2.
If "Always keep me up to date":
~/.claude/skills/gstack/bin/gstack-config set auto_upgrade true
Tell user: "Auto-upgrade enabled. Future updates will install automatically." Then proceed to Step 2.
If "Not now": Write snooze state with escalating backoff (first snooze = 24h, second = 48h, third+ = 1 week), then continue with the current skill. Do not mention the upgrade again.
_SNOOZE_FILE="$HOME/.gstack/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")
case "$_CUR_LEVEL" in *[!0-9]*) _CUR_LEVEL=0 ;; esac
fi
fi
_NEW_LEVEL=$((_CUR_LEVEL + 1))
[ "$_NEW_LEVEL" -gt 3 ] && _NEW_LEVEL=3
echo "$_REMOTE_VER $_NEW_LEVEL $(date +%s)" > "$_SNOOZE_FILE"
Note: {new} is the remote version from the UPGRADE_AVAILABLE output — substitute it from the update check result.
Tell user the snooze duration: "Next reminder in 24h" (or 48h or 1 week, depending on level). Tip: "Set auto_upgrade: true in ~/.gstack/config.yaml for automatic upgrades."
If "Never ask again":
~/.claude/skills/gstack/bin/gstack-config set update_check false
Tell user: "Update checks disabled. Run ~/.claude/skills/gstack/bin/gstack-config set update_check true to re-enable."
Continue with the current skill.
Step 2: Detect install type
if [ -d "$HOME/.claude/skills/gstack/.git" ]; then
INSTALL_TYPE="global-git"
INSTALL_DIR="$HOME/.claude/skills/gstack"
elif [ -d "$HOME/.gstack/repos/gstack/.git" ]; then
INSTALL_TYPE="global-git"
INSTALL_DIR="$HOME/.gstack/repos/gstack"
elif [ -d ".claude/skills/gstack/.git" ]; then
INSTALL_TYPE="local-git"
INSTALL_DIR=".claude/skills/gstack"
elif [ -d ".agents/skills/gstack/.git" ]; then
INSTALL_TYPE="local-git"
INSTALL_DIR=".agents/skills/gstack"
elif [ -d ".claude/skills/gstack" ]; then
INSTALL_TYPE="vendored"
INSTALL_DIR=".claude/skills/gstack"
elif [ -d "$HOME/.claude/skills/gstack" ]; then
INSTALL_TYPE="vendored-global"
INSTALL_DIR="$HOME/.claude/skills/gstack"
else
echo "ERROR: gstack not found"
exit 1
fi
echo "Install type: $INSTALL_TYPE at $INSTALL_DIR"
The install type and directory path printed above will be used in all subsequent steps.
Step 3: Save old version
Use the install directory from Step 2's output below:
OLD_VERSION=$(cat "$INSTALL_DIR/VERSION" 2>/dev/null || echo "unknown")
Step 4: Upgrade
Use the install type and directory detected in Step 2:
For git installs (global-git, local-git):
cd "$INSTALL_DIR"
STASH_OUTPUT=$(git stash 2>&1)
git fetch origin
git reset --hard origin/main
./setup
If $STASH_OUTPUT contains "Saved working directory", warn the user: "Note: local changes were stashed. Run git stash pop in the skill directory to restore them."
For vendored installs (vendored, vendored-global):
PARENT=$(dirname "$INSTALL_DIR")
TMP_DIR=$(mktemp -d)
git clone --depth 1 https://github.com/garrytan/gstack.git "$TMP_DIR/gstack"
mv "$INSTALL_DIR" "$INSTALL_DIR.bak"
mv "$TMP_DIR/gstack" "$INSTALL_DIR"
cd "$INSTALL_DIR" && ./setup
rm -rf "$INSTALL_DIR.bak" "$TMP_DIR"
Step 4.5: Handle local vendored copy
Use the install directory from Step 2. Check if there's also a local vendored copy, and whether team mode is active:
_ROOT=$(git rev-parse --show-toplevel 2>/dev/null)
LOCAL_GSTACK=""
if [ -n "$_ROOT" ] && [ -d "$_ROOT/.claude/skills/gstack" ]; then
_RESOLVED_LOCAL=$(cd "$_ROOT/.claude/skills/gstack" && pwd -P)
_RESOLVED_PRIMARY=$(cd "$INSTALL_DIR" && pwd -P)
if [ "$_RESOLVED_LOCAL" != "$_RESOLVED_PRIMARY" ]; then
LOCAL_GSTACK="$_ROOT/.claude/skills/gstack"
fi
fi
_TEAM_MODE=$(~/.claude/skills/gstack/bin/gstack-config get team_mode 2>/dev/null || echo "false")
echo "LOCAL_GSTACK=$LOCAL_GSTACK"
echo "TEAM_MODE=$_TEAM_MODE"
If LOCAL_GSTACK is non-empty AND TEAM_MODE is true: Remove the vendored copy. Team mode uses the global install as the single source of truth.
cd "$_ROOT"
git rm -r --cached .claude/skills/gstack/ 2>/dev/null || true
if ! grep -qF '.claude/skills/gstack/' .gitignore 2>/dev/null; then
echo '.claude/skills/gstack/' >> .gitignore
fi
rm -rf "$LOCAL_GSTACK"
Tell user: "Removed vendored copy at $LOCAL_GSTACK (team mode active — global install is the source of truth). Commit the .gitignore change when ready."
If LOCAL_GSTACK is non-empty AND TEAM_MODE is NOT true: Update it by copying from the freshly-upgraded primary install (same approach as README vendored install):
mv "$LOCAL_GSTACK" "$LOCAL_GSTACK.bak"
cp -Rf "$INSTALL_DIR" "$LOCAL_GSTACK"
rm -rf "$LOCAL_GSTACK/.git"
cd "$LOCAL_GSTACK" && ./setup
rm -rf "$LOCAL_GSTACK.bak"
Tell user: "Also updated vendored copy at $LOCAL_GSTACK — commit .claude/skills/gstack/ when you're ready."
If ./setup fails, restore from backup and warn the user:
rm -rf "$LOCAL_GSTACK"
mv "$LOCAL_GSTACK.bak" "$LOCAL_GSTACK"
Tell user: "Sync failed — restored previous version at $LOCAL_GSTACK. Run /gstack-upgrade manually to retry."
Step 4.75: Run version migrations
After ./setup completes, run any migration scripts for versions between the old
and new version. Migrations handle state fixes that ./setup alone can't cover
(stale config, orphaned files, directory structure changes).
MIGRATIONS_DIR="$INSTALL_DIR/gstack-upgrade/migrations"
if [ -d "$MIGRATIONS_DIR" ]; then
for migration in $(find "$MIGRATIONS_DIR" -maxdepth 1 -name 'v*.sh' -type f 2>/dev/null | sort -V); do
# Extract version from filename: v0.15.2.0.sh → 0.15.2.0
m_ver="$(basename "$migration" .sh | sed 's/^v//')"
# Run if this migration version is newer than old version
# (simple string compare works for dotted versions with same segment count)
if [ "$OLD_VERSION" != "unknown" ] && [ "$(printf '%s\n%s' "$OLD_VERSION" "$m_ver" | sort -V | head -1)" = "$OLD_VERSION" ] && [ "$OLD_VERSION" != "$m_ver" ]; then
echo "Running migration $m_ver..."
bash "$migration" || echo " Warning: migration $m_ver had errors (non-fatal)"
fi
done
fi
Migrations are idempotent bash scripts in gstack-upgrade/migrations/. Each is named
v{VERSION}.sh and runs only when upgrading from an older version. See CONTRIBUTING.md
for how to add new migrations.
Step 5: Write marker + clear cache
mkdir -p ~/.gstack
echo "$OLD_VERSION" > ~/.gstack/just-upgraded-from
rm -f ~/.gstack/last-update-check
rm -f ~/.gstack/update-snoozed
Step 6: Show What's New
Read $INSTALL_DIR/CHANGELOG.md. Find all version entries between the old version and the new version. Summarize as 5-7 bullets grouped by theme. Don't overwhelm — focus on user-facing changes. Skip internal refactors unless they're significant.
Format:
gstack v{new} — upgraded from v{old}!
What's new:
- [bullet 1]
- [bullet 2]
- ...
Happy shipping!
Step 7: Continue
After showing What's New, continue with whatever skill the user originally invoked. The upgrade is done — no further action needed.
Standalone usage
When invoked directly as /gstack-upgrade (not from a preamble):
- Force a fresh update check (bypass cache):
~/.claude/skills/gstack/bin/gstack-update-check --force 2>/dev/null || \
.claude/skills/gstack/bin/gstack-update-check --force 2>/dev/null || true
Use the output to determine if an upgrade is available.
-
If
UPGRADE_AVAILABLE <old> <new>: follow Steps 2-6 above. -
If no output (primary is up to date): check for a stale local vendored copy.
Run the Step 2 bash block above to detect the primary install type and directory (INSTALL_TYPE and INSTALL_DIR). Then run the Step 4.5 detection bash block above to check for a local vendored copy (LOCAL_GSTACK) and team mode status (TEAM_MODE).
If LOCAL_GSTACK is empty (no local vendored copy): tell the user "You're already on the latest version (v{version})."
If LOCAL_GSTACK is non-empty AND TEAM_MODE is true: Remove the vendored copy using the Step 4.5 team-mode removal bash block above. Tell user: "Global v{version} is up to date. Removed stale vendored copy (team mode active). Commit the .gitignore change when ready."
If LOCAL_GSTACK is non-empty AND TEAM_MODE is NOT true, compare versions:
PRIMARY_VER=$(cat "$INSTALL_DIR/VERSION" 2>/dev/null || echo "unknown")
LOCAL_VER=$(cat "$LOCAL_GSTACK/VERSION" 2>/dev/null || echo "unknown")
echo "PRIMARY=$PRIMARY_VER LOCAL=$LOCAL_VER"
If versions differ: follow the Step 4.5 sync bash block above to update the local copy from the primary. Tell user: "Global v{PRIMARY_VER} is up to date. Updated local vendored copy from v{LOCAL_VER} → v{PRIMARY_VER}. Commit .claude/skills/gstack/ when you're ready."
If versions match: tell the user "You're on the latest version (v{PRIMARY_VER}). Global and local vendored copy are both up to date."
Overview
gstack-upgrade is a free skill on OpenRuna. Upgrade gstack to the latest version.
What this skill does
Reach for "gstack-upgrade" whenever you need a reliable skill for real work across ChatGPT, Claude, Gemini, and Cursor. Upgrade gstack to the latest version. OpenRuna cross-links it to related prompts, agents, and tools, which makes assembling a full workflow around it straightforward. Open a new conversation and paste it in, wire it into an agent, or keep it in your team's prompt library.
Use cases
- Fork it as a baseline and layer in your own project context, constraints, and examples.
- Keep it in a shared library as the canonical version of this skill for your organisation.
- Combine it with related tools and prompts in the same OpenRuna category to build an end-to-end workflow.
- Reach for it during planning or review sessions when you want consistent, AI-assisted structure.
Example output
Running this skill produces output shaped like the source material below: <!-- AUTO-GENERATED from SKILL.md.tmpl — do not edit directly --> <!-- Regenerate: bun run gen:skill-docs --> ## When to invoke this skill Detects global vs vendored install, runs the upgrade, and shows what's new. Use when asked to "upgrade gstack", "update gstack", or "get latest version". Voice triggers (speech-to-text aliases): "upgrade the tools", "update the tools", "gee stack upgrade", "g stack upgrade". # /gstack-upgrade Upgrade gstack to the latest version and show what's new. ## Inline upgrade flow This section is referenced by all skill preambles when they detect `UPGRADE_AV… Results vary by model and temperature; treat the first response as a draft and refine it with follow-up prompts.
Tips by platform
Claude
Claude works best when you paste this skill up front and ask it to outline its plan before writing. Use the artifact panel to refine structured output turn by turn.
ChatGPT
In ChatGPT, start a fresh chat and paste this skill verbatim, then follow up with "apply this to [your context]." Pick a current GPT model for coding or reasoning tasks.
Cursor
In Cursor, lift the key instructions from this skill into .cursorrules or a SKILL.md file, then reference it in Agent mode with @ mentions. Keep the title in a comment so teammates can find it on OpenRuna.
Frequently asked questions
- What is "gstack-upgrade"?
- It is a skill listed on OpenRuna — Upgrade gstack to the latest version. You can copy and adapt it for ChatGPT, Claude, Cursor, or any other AI assistant.
- Is "gstack-upgrade" free to use?
- Most OpenRuna resources are open or CC0-licensed. Check the license shown on this page before commercial use; premium collections are clearly marked as such.
- How do I get the best results from this skill?
- Replace any placeholders, add your project context, and ask the model to confirm its assumptions first. Iterate over 2–3 follow-up turns rather than expecting a perfect first response.
- Does "gstack-upgrade" work with both Claude and ChatGPT?
- Yes — it is model-agnostic text, so it runs on Claude, ChatGPT, Gemini, and Cursor. The tips on this page cover each of those assistants specifically.
- Where can I find resources related to "gstack-upgrade"?
- Scroll to the Related resources section on this page, or open the matching category hub on OpenRuna to find connected prompts, tools, agents, and datasets in the same topic area.
Related resources
- Tool
v0 Prompts and Tools — ReadFile
Reads file contents intelligently - returns complete files when small, paginated chunks, or targeted chunks when large based on your query. **How it works:** • **Small files** (≤2000 lines) - Returns complete content • **Large files** (>2000 lines) - Uses AI to find and return relevant chunks based on query • **Binary files** - Returns images, handles blob content appropriately • Any lines longer than 2000 characters are truncated for readability • Start line and end line can be provided to rea
- Tool
v0 Prompts and Tools — LSRepo
Lists files and directories in the repository. Returns file paths sorted alphabetically with optional pattern-based filtering. Common use cases: • Explore repository structure and understand project layout • Find files in specific directories (e.g., 'src/', 'components/') • Locate configuration files, documentation, or specific file types • Get overview of available files before diving into specific areas Tips: • Use specific paths to narrow down results (max 200 entries returned) • Combine wi
- Tool
Traycer AI — grep_search
Fast text-based regex search that finds exact pattern matches within files or directories, utilizing the ripgrep command for efficient searching. Results will be formatted in the style of ripgrep and can be configured to include line numbers and content. To avoid overwhelming output, the results are capped at 50 matches. Use the include patterns to filter the search scope by file type or specific paths. This is best for finding exact text matches or regex patterns. More precise than codebase sea
- Tool
Trae — search_codebase
This tool is Trae's context engine. It: 1. Takes in a natural language description of the code you are looking for; 2. Uses a proprietary retrieval/embedding model suite that produces the highest-quality recall of relevant code snippets from across the codebase; 3. Maintains a real-time index of the codebase, so the results are always up-to-date and reflects the current state of the codebase; 4. Can retrieve across different programming languages; 5. Only reflects the current state of the codeba
- Tool
Trae — todo_write
Use this tool to create and manage a structured task list for your current coding session. This helps you track progress, organize complex tasks, and demonstrate thoroughness to the user. It also helps the user understand the progress of the task and overall progress of their requests.
- Tool
Same.dev — task_agent
Launches a highly capable task agent in the USER's workspace. Usage notes: 1. When the agent is done, it will return a report of its actions. This report is also visible to USER, so you don't have to repeat any overlapping information. 2. Each agent invocation is stateless and doesn't have access to your chat history with USER. You will not be able to send additional messages to the agent, nor will the agent be able to communicate with you outside of its final report. Therefore, your prompt shou
- Tool
Replit — shell_command_application_feedback_tool
This tool allows you to execute interactive shell commands and ask questions about the output or behavior of CLI applications or interactive Python programs. ## Rules of usage: 1. Provide clear, concise interactive commands to execute and specific questions about the results or interaction. 2. Ask one question at a time about the interactive behavior or output. 3. Focus on interactive functionality, user input/output, and real-time behavior. 4. Specify the exact command to run, including any ne
- Tool
Replit — str_replace_editor
Custom editing tool for viewing, creating and editing files * State is persistent across command calls and discussions with the user * If `path` is a file, `view` displays the result of applying `cat -n`. If `path` is a directory, `view` lists non-hidden files and directories up to 2 levels deep * The `create` command cannot be used if the specified `path` already exists as a file * If a `command` generates a long output, it will be truncated and marked with `<response clipped>` * The `undo_edi
