agentleFS
jianghailong-xyjianghailong-xy/orbit/.agents/skills/upgrade/SKILL.md

upgrade

Skill4 starsChanged 2 months agoMITView on GitHub

Upgrade the Orbit Docker Compose deployment by rebuilding the apiserver and web images from current source and recreating only changed services; apiserver applies database migrations on boot and unchanged postgres stays running. Use when asked to deploy the latest Orbit code, update or upgrade the running containers, run /upgrade, or bring the Compose deployment up to date. Use --pull-base only when explicitly asked to refresh postgres or gateway base images.

  • Reads credentials

14 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use status, review and 2 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • AnthropicSkill

    status

    Case status summary by audience — client-facing (plain language), internal (for the professor), or court-ready (formal caption format per local rules). Same facts, different framing and depth. Use when a student needs to update the client, brief the professor, or prepare a court status report.

    Also in 3 projects that use this

  • SentrySkill

    review

    Fixture review skill.

    Also in 6 projects that use this

  • MicrosoftSkill

    init

    Generate or update chat customization files for AI coding agents

    Also in 3 projects that use this

  • OpenAISkill

    audit

    Audit or critique a product flow, journey, workflow, funnel, onboarding path, checkout path, settings path, screen, or multi-step product experience by capturing screenshots first, then reporting UX, design, and accessibility findings inline from that evidence. Use Figma only when the user explicitly asks for a board. Use when the user asks to audit, review, critique, inspect, assess, analyze, evaluate, or give feedback on a product experience.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 9 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Check the current branch, worktree status, and Compose availability.

    line 14
  2. Very specific:

    Run against an Orbit checkout with the normal deployment environment, including values normally supplied through the root .env.

    line 53
  3. Very specific:

    Never delete or recreate the orbit_pg volume as part of this workflow.

    line 54

“Common” is measured: kept by at least 6 in 10 of the 9 edited versions of this file we could read. “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

Upgrade the Orbit stack

Orbit uses docker-compose.yml with postgres, apiserver, web, and gateway. A routine upgrade rebuilds the locally built apiserver and web images, then recreates only changed services. The persisted orbit_pg volume is preserved.

Database migrations are not a separate step: the apiserver container runs prisma migrate deploy during startup.

Workflow

  1. Check the current branch, worktree status, and Compose availability. On main the helper runs git pull --ff-only before building, so the deploy is origin's main and not a stale checkout; it never overwrites or discards local changes and stops if a fast-forward is impossible.

    The helper refuses to build when tracked files are modified: images are built from the working tree, not from HEAD, so uncommitted edits reach production while existing in no commit and are silently reverted by the next clean rebuild. Commit or stash first; pass --allow-dirty only when deliberately deploying an uncommitted change.

  2. Choose flags from the request:

    • --no-pull: skip the pull on main and deploy the checkout as it is.
    • --pull: run git pull --ff-only even when the checkout is not on main.
    • --pull-base: pull the pinned postgres and gateway images and recreate the full stack. This is the only mode that may restart postgres; use it only when explicitly requested.
    • --no-cache: rebuild local images without Docker layer cache.
    • --prune: prune dangling images after a successful upgrade.
    • --allow-dirty: build despite uncommitted changes (they exist in no commit).
  3. State which services may be recreated. When the chosen flags match the user's request, run:

    .agents/skills/upgrade/scripts/upgrade.sh
    .agents/skills/upgrade/scripts/upgrade.sh --prune
  4. Report the final docker compose ps state. If health checks fail, inspect docker compose logs <service> and diagnose the failure; do not claim the upgrade succeeded.

Behavior

On main the helper first fast-forwards to origin (git pull --ff-only) unless --no-pull is given.

Without --pull-base, the helper:

  1. Builds apiserver and web.
  2. Runs docker compose up -d --wait apiserver web gateway.
  3. Prints docker compose ps.

Postgres is omitted from the recreate set. With --pull-base, the helper pulls postgres and gateway, then runs a full up -d --wait so changed base images take effect.

Concurrent upgrades are serialized with /tmp/orbit-upgrade.lock; a second invocation exits instead of starting another deployment.

Requirements

  • Docker Compose v2 is preferred. The legacy docker-compose binary is a fallback, but --wait requires v2 support.
  • Run against an Orbit checkout with the normal deployment environment, including values normally supplied through the root .env.
  • Never delete or recreate the orbit_pg volume as part of this workflow.

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.