Agent skill

Pstack Upgrade

by no-session in no-session/pstack

Upgrade pstack to the latest version. An agent skill from no-session/pstack.

MITAuto-check: notesDevelopment

Install Pstack Upgrade

skills CLI
$ npx skills add no-session/pstack --skill pstack-upgrade -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install no-session/pstack pstack-upgrade --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/no-session/pstack.git skills-src && mkdir -p .claude/skills && cp -r skills-src/pstack-upgrade .claude/skills/pstack-upgrade && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
pstack-upgrade
GitHub stars
131
Token cost
~2.1k tokens
SKILL.md length
634 words
Files
2
Skills in repo
12
Repo updated
First seen
Licence
MIT

At a glance

Upgrade pstack to the latest version. An agent skill from no-session/pstack.

  • Works in 8 steps: Ask the user (or auto-upgrade) → Detect install type → Save old version → …
  • Asked to upgrade pstack
  • SKILL.md covers Inline upgrade flow and Standalone usage
  • Calls git; reaches github.com

What it does

Pstack Upgrade is an agent skill from no-session/pstack. Upgrade pstack to the latest version. Detects global vs vendored install, runs the upgrade, and shows what's new. Use when asked to "upgrade pstack", "update pstack", or "get latest version".

Its SKILL.md is about 2.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file.

It sits in Development. It works with Git. The repository describes itself as: The solo founder's AI engineering stack. Fork of gstack, rebuilt for bootstrappers, indie hackers, and people who want to quit their day job. Pieter Levels energy. Ship fast… The licence is MIT.

When your agent uses it

  • Asked to upgrade pstack
  • Get latest version

Example prompts

  • “s new. Use when asked to”
  • “update pstack”
  • “get latest version”
  • “/pstack-upgrade”

Requirements

  • Pre-approved tools (allowed-tools): Bash, Read, Write, AskUserQuestion

Workflow steps

8 steps, taken from the step headings in SKILL.md.

  1. Ask the user (or auto-upgrade)
  2. Detect install type
  3. Save old version
  4. Upgrade
  5. 5: Sync local vendored copy
  6. Write marker + clear cache
  7. Show What's New
  8. Continue

What it can do on your machine

Read from SKILL.md and the folder at commit 9a24d14. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash
    • Read
    • Write
    • AskUserQuestion

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Pstack Upgrade loads about 2.1k tokens when it runs. Until then it costs about 52 tokens; SKILL.md has 634 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~52
When it runs · the whole SKILL.md, loaded when a task matches
~2.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Bash, Read, Write, AskUserQuestion

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from no-session/pstack at commit 9a24d14, republished under its MIT licence (© no-session). 634 words, ~2,065 tokens.

Download SKILL.mdSave it as .claude/skills/pstack-upgrade/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
pstack-upgrade
description
Upgrade pstack to the latest version. Detects global vs vendored install, runs the upgrade, and shows what's new. Use when asked to "upgrade pstack", "update pstack", or "get latest version".
allowed-tools
Bash, Read, Write, AskUserQuestion
version
1.1.0
<!-- AUTO-GENERATED from SKILL.md.tmpl — do not edit directly -->
<!-- Regenerate: bun run gen:skill-docs -->

/pstack-upgrade

Upgrade pstack 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:

bash
_AUTO=""
[ "${PSTACK_AUTO_UPGRADE:-}" = "1" ] && _AUTO="true"
[ -z "$_AUTO" ] && _AUTO=$(~/.claude/skills/pstack/bin/pstack-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 pstack 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 /pstack-upgrade manually to retry."

Otherwise, use AskUserQuestion:

  • Question: "pstack 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":

bash
~/.claude/skills/pstack/bin/pstack-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.

bash
_SNOOZE_FILE=~/.pstack/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 ~/.pstack/config.yaml for automatic upgrades."

If "Never ask again":

bash
~/.claude/skills/pstack/bin/pstack-config set update_check false

Tell user: "Update checks disabled. Run ~/.claude/skills/pstack/bin/pstack-config set update_check true to re-enable." Continue with the current skill.

Step 2: Detect install type
bash
if [ -d "$HOME/.claude/skills/pstack/.git" ]; then
  INSTALL_TYPE="global-git"
  INSTALL_DIR="$HOME/.claude/skills/pstack"
elif [ -d "$HOME/.pstack/repos/pstack/.git" ]; then
  INSTALL_TYPE="global-git"
  INSTALL_DIR="$HOME/.pstack/repos/pstack"
elif [ -d ".claude/skills/pstack/.git" ]; then
  INSTALL_TYPE="local-git"
  INSTALL_DIR=".claude/skills/pstack"
elif [ -d ".agents/skills/pstack/.git" ]; then
  INSTALL_TYPE="local-git"
  INSTALL_DIR=".agents/skills/pstack"
elif [ -d ".claude/skills/pstack" ]; then
  INSTALL_TYPE="vendored"
  INSTALL_DIR=".claude/skills/pstack"
elif [ -d "$HOME/.claude/skills/pstack" ]; then
  INSTALL_TYPE="vendored-global"
  INSTALL_DIR="$HOME/.claude/skills/pstack"
else
  echo "ERROR: pstack 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:

bash
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):

bash
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):

bash
PARENT=$(dirname "$INSTALL_DIR")
TMP_DIR=$(mktemp -d)
git clone --depth 1 https://github.com/garrytan/pstack.git "$TMP_DIR/pstack"
mv "$INSTALL_DIR" "$INSTALL_DIR.bak"
mv "$TMP_DIR/pstack" "$INSTALL_DIR"
cd "$INSTALL_DIR" && ./setup
rm -rf "$INSTALL_DIR.bak" "$TMP_DIR"
Step 4.5: Sync local vendored copy

Use the install directory from Step 2. Check if there's also a local vendored copy that needs updating:

bash
_ROOT=$(git rev-parse --show-toplevel 2>/dev/null)
LOCAL_PSTACK=""
if [ -n "$_ROOT" ] && [ -d "$_ROOT/.claude/skills/pstack" ]; then
  _RESOLVED_LOCAL=$(cd "$_ROOT/.claude/skills/pstack" && pwd -P)
  _RESOLVED_PRIMARY=$(cd "$INSTALL_DIR" && pwd -P)
  if [ "$_RESOLVED_LOCAL" != "$_RESOLVED_PRIMARY" ]; then
    LOCAL_PSTACK="$_ROOT/.claude/skills/pstack"
  fi
fi
echo "LOCAL_PSTACK=$LOCAL_PSTACK"

If LOCAL_PSTACK is non-empty, update it by copying from the freshly-upgraded primary install (same approach as README vendored install):

bash
mv "$LOCAL_PSTACK" "$LOCAL_PSTACK.bak"
cp -Rf "$INSTALL_DIR" "$LOCAL_PSTACK"
rm -rf "$LOCAL_PSTACK/.git"
cd "$LOCAL_PSTACK" && ./setup
rm -rf "$LOCAL_PSTACK.bak"

Tell user: "Also updated vendored copy at $LOCAL_PSTACK — commit .claude/skills/pstack/ when you're ready."

If ./setup fails, restore from backup and warn the user:

bash
rm -rf "$LOCAL_PSTACK"
mv "$LOCAL_PSTACK.bak" "$LOCAL_PSTACK"

Tell user: "Sync failed — restored previous version at $LOCAL_PSTACK. Run /pstack-upgrade manually to retry."

Show full SKILL.md (242 more words)Show less
Step 5: Write marker + clear cache
bash
mkdir -p ~/.pstack
echo "$OLD_VERSION" > ~/.pstack/just-upgraded-from
rm -f ~/.pstack/last-update-check
rm -f ~/.pstack/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:

pstack 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 /pstack-upgrade (not from a preamble):

  1. Force a fresh update check (bypass cache):
bash
~/.claude/skills/pstack/bin/pstack-update-check --force 2>/dev/null || \
.claude/skills/pstack/bin/pstack-update-check --force 2>/dev/null || true

Use the output to determine if an upgrade is available.

  1. If UPGRADE_AVAILABLE <old> <new>: follow Steps 2-6 above.

  2. 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_PSTACK).

If LOCAL_PSTACK is empty (no local vendored copy): tell the user "You're already on the latest version (v{version})."

If LOCAL_PSTACK is non-empty, compare versions:

bash
PRIMARY_VER=$(cat "$INSTALL_DIR/VERSION" 2>/dev/null || echo "unknown")
LOCAL_VER=$(cat "$LOCAL_PSTACK/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/pstack/ 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."

© no-session, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in pstack-upgrade of no-session/pstack.

  • SKILL.md
  • SKILL.md.tmpl

Open the folder on GitHubat commit 9a24d14

Compare with similar skills

Pstack Upgrade next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Pstack Upgrade compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Pstack Upgrade this skillno-session/pstack131—~2.1kAutomated safety check: NotesMIT
Finishing a Development Branchobra/superpowers296k5 repos~1.9kAutomated safety check: PassMIT
Code Review ChecklistshareAI-lab/learn-claude-code78k5 repos~1.1kAutomated safety check: PassMIT
Codebase Knowledge Graph Q&AEgonex-AI/Understand-Anything85k1 repos~1.2kAutomated safety check: PassMIT
Code Design Rationale Investigatorcursor/plugins10k9 repos~2.6kAutomated safety check: PassNone
Understand Diff AnalysisEgonex-AI/Understand-Anything85k1 repos~1.4kAutomated safety check: PassMIT

Similar skills

  • Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.

    296k GitHub starsUsed in 5 repos~1.9k tokens
    DevelopmentAuto-check passed
  • Code Review Checklist

    shareAI-lab/learn-claude-code

    Reviews code against a five-part checklist covering security, correctness, performance, maintainability and testing, and reports findings in a fixed format.

    78k GitHub starsUsed in 5 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Codebase Knowledge Graph Q&A

    Egonex-AI/Understand-Anything

    Answers questions about a codebase by searching a prebuilt knowledge graph of its files, functions, classes and dependencies, not by rereading every source file.

    85k GitHub starsUsed in 1 repo~1.2k tokens
    DevelopmentAuto-check passed
  • Official

    Digs into why code is shaped the way it is by checking git history, pull requests and connected tools in parallel, then reporting a cited read on the tradeoffs.

    10k GitHub starsUsed in 9 repos~2.6k tokens
    DevelopmentAuto-check passed
  • Understand Diff Analysis

    Egonex-AI/Understand-Anything

    Reads your git changes or a pull request against a prebuilt knowledge graph of the project to explain what changed, which components are affected and what is risky.

    85k GitHub starsUsed in 1 repo~1.4k tokens
    DevelopmentAuto-check passed
  • Understand Explain

    Egonex-AI/Understand-Anything

    Gives an in-depth explanation of one file, function or module by reading the project's knowledge graph and checking that the graph is still fresh.

    85k GitHub starsUsed in 1 repo~1.3k tokens
    DevelopmentAuto-check passed

More from no-session/pstack

All 12 skills in this repo
  • Pstack

    no-session/pstack

    Fast headless browser for QA testing and site dogfooding. An agent skill from no-session/pstack.

    131 GitHub stars~5.6k tokensUpdated 6 mo ago
    Auto-check: notes
  • Setup Browser Cookies

    no-session/pstack

    Import cookies from your real Chromium browser into the headless browse session.

    131 GitHub stars~2.7k tokensUpdated 6 mo ago
    Auto-check: notes
  • Connect Chrome

    no-session/pstack

    Launch real Chrome controlled by pstack with the Side Panel extension auto-loaded.

    131 GitHub stars~5.9k tokensUpdated 6 mo ago
    Auto-check: notes
  • Cso

    no-session/pstack

    Chief Security Officer mode. An agent skill from no-session/pstack.

    131 GitHub stars~12k tokensUpdated 6 mo ago
    Auto-check: notes
  • Design Shotgun

    no-session/pstack

    Design shotgun: generate multiple AI design variants, open a comparison board, collect structured feedback, and iterate.

    131 GitHub stars~7.7k tokensUpdated 6 mo ago
    Auto-check: notes
  • Monitor

    no-session/pstack

    Post-deploy monitor monitoring. An agent skill from no-session/pstack.

    131 GitHub stars~6.1k tokensUpdated 6 mo ago
    Auto-check: notes

Works with

Categories

Questions about Pstack Upgrade

What does Pstack Upgrade do?

Upgrade pstack to the latest version. An agent skill from no-session/pstack. Pstack Upgrade is an agent skill from no-session/pstack. Upgrade pstack to the latest version.

When should I use Pstack Upgrade?

Pstack Upgrade fits situations like: asked to upgrade pstack; get latest version.

How do I install Pstack Upgrade in Claude Code?

Run `npx skills add no-session/pstack --skill pstack-upgrade -a claude-code`. Or copy the skill folder (pstack-upgrade in no-session/pstack) into .claude/skills/pstack-upgrade in your project. Claude Code loads it when a task matches its description.

How do I install Pstack Upgrade in Codex?

Run `npx skills add no-session/pstack --skill pstack-upgrade -a codex`. Or copy the skill folder (pstack-upgrade in no-session/pstack) into .agents/skills/pstack-upgrade in your project. Codex loads it when a task matches its description.

Can I use Pstack Upgrade in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add no-session/pstack --skill pstack-upgrade -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/pstack-upgrade, .gemini/skills/pstack-upgrade, .github/skills/pstack-upgrade and .opencode/skills/pstack-upgrade in your project.

What does Pstack Upgrade need to run?

Going by SKILL.md and its folder, Pstack Upgrade needs the command-line tools its instructions call (git). Its frontmatter pre-approves these tools: Bash, Read, Write, AskUserQuestion.

Does Pstack Upgrade access the network?

SKILL.md names 1 domain. In commands or code: github.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Pstack Upgrade safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Pstack Upgrade use?

Pstack Upgrade is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Pstack Upgrade use?

About 2.1k tokens (SKILL.md is roughly 8.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Pstack Upgrade?

Skills that share tags, products or a category with Pstack Upgrade: Finishing a Development Branch (obra/superpowers, 296k stars), Code Review Checklist (shareAI-lab/learn-claude-code, 78k stars), Codebase Knowledge Graph Q&A (Egonex-AI/Understand-Anything, 85k stars) and Code Design Rationale Investigator (cursor/plugins, 10k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Pstack Upgrade?

no-session (a GitHub user) maintains it in no-session/pstack, which has 131 GitHub stars. The repository holds 12 skills in this directory. The repository was last updated on March 30, 2026.

Source: no-session/pstack on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.