/opscrew:opscrew-troubleshootfrom opscrew
Troubleshoots OpsCrew-deployed apps: checks status, resource usage, alerts, logs, and Grafana dashboards. Handles rollbacks, resizing proposals with pricing, and security/backup recommendations.
Ships in opscrew. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Everything here is read-only: these tools change nothing on the server, in the Portainer or on Cloudflare. Secrets in log lines arrive masked; never try to recover them.
opscrew_status (with app and environment when the repository has
several). Read, in this order:
app, a worker, a cron job, a service such as db) is stopped or
has no container.Warning: or High: says what a figure means and what to do:
memory at 90% of a limit (the container is stopped and restarted at the limit), the disk at 85%
or 95%, a restart since the last deploy.links in the data: up or down, the last handshake, the round trip measured from the app's
server), each device's last handshake, the grants and whether public SSH is open. A link
down, or a line saying a service is not published on its server's private address, explains a
database or cache the app can't reach: pass on the command the line names
(npx opscrew provision). A long round trip explains slow pages that make many queries in a
row. A device that never connects to a server added later needs a new configuration, which
the user makes in their terminal (npx opscrew vpn add <name> --again): it holds a private
key, so it never goes through this chat.opscrew_logs with service set to that part and a
short since (15m, 1h; 2h at most at first). Without service it reads the web process
(app); edge is the proxy in front of the app. Keep tail at 200 or less, and never ask for
more than 500 lines: the tool returns at most 500 lines and 64 KiB (truncated: true means older
lines were left out, so narrow since instead of raising tail). It never follows; for live
lines the user runs npx opscrew logs --follow in a terminal.memoryMb
in opscrew/plan.yaml and provision again (npx opscrew provision shows the plan first), or
fix what holds memory.npx opscrew verify in a terminal; it checks
the app from the outside.Call opscrew_advise (read only, with app and environment when the repository has several)
when the user asks "is it the right size?", "why is it slow?", "can it cost less?" or "what should
I change?", and after opscrew_status shows high memory, a container at its memory limit, a
filling disk or load above the CPUs. It reads the servers' figures, the plan, the interview's budget, the providers'
prices, Dependabot and the tokens' expiry, and lists proposals, the most urgent first (now, soon,
when convenient). Each has an id, its reasons with their figures (over 14 days with self-hosted
monitoring, else one reading), its monthly price before and after, and how to apply it.
Apply: opscrew advise --apply <id>, the user runs npx opscrew advise --apply <id> (with the --app/--env it shows): it
changes only opscrew/plan.yaml, then npx opscrew provision shows the change and applies it
once they approve its hash. For the others, pass on the command it names, or what to do by hand.npx opscrew addon enable monitoring gives two weeks of figures so it can. Offer that when the
user wants to know whether the server could be cheaper.A broken page or a new bug right after a deploy that passed its checks usually comes from that
release. Read deploys in opscrew_status's data: running (the version live now, with its
commit, message and time), previous (the one before it) and paused (deploys paused by an
earlier rollback, or by a move). When the problem started with the running version, or the user
asks to undo a release:
opscrew-deploy skill's "Rolling back"), and
npx opscrew restore <id> puts a snapshot's data back without changing the version (the
opscrew-snapshots skill).npx opscrew rollback goes back to the
previous version (add --env <name> when the app has several environments). It shows the
version running and the one it goes back to, and asks for approval. npx opscrew rollback --list
shows the versions still available, and npx opscrew rollback --to <one of them> goes back
further. Never roll back through a tool: it stays in the terminal, because it asks for approval.npx opscrew rollback --resume (add
--deploy to deploy the branch's latest commit now). Then call opscrew_status to confirm.When paused is a move's window, a rollback is refused until the move ends: say so instead.
What each target gives: on a server or the user's own computer, every part's lines; in a Portainer, the same through its API; on Cloudflare's hosting (a server-rendered app), the requests with their status and errors, within Cloudflare's free allowance; GitHub Pages and a static site on Cloudflare keep no request logs, so the tool shows the last deploy runs instead.
Never read .env files, secrets files or private keys yourself, and never ask the user to paste a
token into the chat.
opscrew_status and opscrew_logs show the moment's figures and the latest lines. For weeks of
figures and searchable logs, OpsCrew can run a private monitoring stack: Prometheus keeps the
figures, Loki the log lines, and Grafana shows them in dashboards.
Where the data is. Everything runs on the user's own servers: by default a small server of its
own at the app's provider, or the app's server (--on app). No third party gets the data, and
Grafana sends nothing to grafana.com. Nobody on the internet reaches it: only the user's devices on
the app's private network, and the SSH tunnel. Secrets in log lines are masked on each server before
they are sent, so the stack only ever holds masked lines.
Is it working? Call opscrew_addon_status (read-only). With monitoring on, it shows the
stack's containers and their memory, when each server's last figures and last log line arrived, the
disk taken by figures and by logs, and the retention (figures 15 days and logs 7 by default). A
server that sent nothing for more than 5 minutes is flagged with what to check: its agent (Grafana
Alloy) and its link on the private network. When the stack itself doesn't answer, pass on the
command it names (npx opscrew provision).
Opening the dashboards. The user runs npx opscrew addon open monitoring in their terminal
(never through a tool):
http://localhost:3000 while it runs (--port <local> picks another port);npx opscrew vpn add <name> --this-computer).They log in as admin. The password is monitoring.grafanaAdminPassword in OpsCrew's generated
values on the computer that turned monitoring on, and in the recovery copy
(npx opscrew secrets restore on another computer). Tell them where it is; never read that file or
ask for the password.
The six dashboards, in Grafana's folder OpsCrew, each with a choice of app, environment and server:
HTTP traffic and Caddy need Caddy, the default reverse proxy, and an app with no domain yet has no HTTP figures. MySQL, MariaDB, MongoDB and the other services are on the Containers dashboard.
Turning it on or off. opscrew_addon_enable and opscrew_addon_disable with
addon: "monitoring" only write the plan, after saying the server, its price, the retention and
the disk it takes. Nothing changes until the user runs npx opscrew provision in their terminal,
which shows each change for their approval by its hash.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub opscrew-hub/opscrew --plugin opscrew6 skills in this plugin
/opscrew-adaptPrepare the app's code for container deployment the OpsCrew way (production Dockerfile, .dockerignore, health endpoint, port from the environment, secrets moved to environment variables, build settings). Use after OpsCrew's design step, or whenever the user asks to containerize or productionize the app for OpsCrew./opscrew-deployTake the user's app from this repository to a hardened production deployment on their own cloud, a server they already have, a Portainer they already run (on a NAS or any Docker host), a shared hosting account they already pay for (cPanel, Plesk, DirectAdmin or SFTP), or for a site with no server Cloudflare's hosting or GitHub Pages, with OpsCrew (scan, analyze, interview, design, prepare the code, then provision), and turn Portainer on or off. Use when the user wants to deploy, host, launch or "put online" their app, deploy to their own server, home server, NAS, Portainer or shared hosting (cPanel and the like), or move it off Lovable, Bolt, Replit or v0 hosting./opscrew-rotateSee which passwords, keys and tokens OpsCrew made for an app and how old each is (read-only), and guide the user through rotating one in their own terminal with `npx opscrew rotate`, after a leak or when a credential is old. Use when the user asks "rotate my database password", "a secret leaked", "I lost my laptop", "a teammate left", "change the deploy key", "how old are my credentials?", "my token expires", "advise says a credential is old", "replace my Hetzner (or Cloudflare, GitHub) token", or about the recovery copy's key./opscrew-scanRun OpsCrew's free security scan on this repository and help the user fix what it finds (leaked keys, Supabase service-role keys in frontend code, tables without row-level security, open Firebase rules, risky Docker or framework settings, vulnerable dependencies). Use when the user asks whether their app is secure, before launching, or after a security scare./opscrew-snapshotsBack up and restore the data of an app OpsCrew deployed, with OpsCrew's snapshots: see which snapshots exist (read-only), and guide the user through taking one before a risky change, putting one back, deleting one, a snapshot of the whole server at Hetzner, DigitalOcean, Contabo or OVHcloud, scheduled snapshots and an encrypted copy off the server, each run in their own terminal. Use when the user asks "is my data backed up?", "back up my database", "take a snapshot", "restore yesterday's data", "I deleted rows by mistake", "what snapshots do I have?", "schedule backups", "keep a copy somewhere else", "what if the server dies?", or about backups on their own server or Portainer.Other plugins' skills for the same job