open-cdm-upgrade-version
Skill424 starsChanged 3 months agoApache-2.0View on GitHub
Upgrade and validate a remote Open-CDM testing environment over SSH, including release/CD gating, deployment detection, backups, cutover, health checks, and rollback preservation. Use when asked to upgrade, update, deploy, or refresh Open-CDM/CloudDM on a test server. Require the user to explicitly provide both the SSH login username and host in the current request; never infer or reuse either value from history.
In this repository7 other files it gives its agents.
- AGENTS.mdAGENTS.md
- frontend/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- frontend/CLAUDE.mdCLAUDE.md
- llms-full.txtllms.txt
- llms.txtllms.txt
- open-cdm-release-versionSkill
The file
We split this skill into the rules it gives an agent
12 rules. About 0 are common, 9 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 10
Read the SSH username and host only from the current user request.
- Distinctive: line 11
If either value is missing, stop before any network call and ask for both in one concise question.
- Distinctive: line 12
Never recover the username or host from conversation history, SSH config, environment variables, repository files, previous deployments, or …
- Distinctive: line 14
Treat the target as a test environment only.
- Very specific: line 18
If the user supplies a GitHub Actions/CD run, monitor it with gh run view or gh run watch --exit-status.
- Distinctive: line 19
If the user supplies a version, use that exact version after verifying the release or image exists.
- Distinctive: line 25
Run the bundled read-only preflight first:
- Distinctive: line 39
Do not print environment values, passwords, tokens, JWT secrets, or full container inspection data to the conversation.
- Distinctive: line 45
If the installation does not match a documented workflow, stop after inspection and ask for direction.
- Distinctive: line 52
Create a logical database backup plus configuration/data backups before cutover.
- Very specific: line 55
Never run docker compose down -v, delete named volumes, overwrite an only copy of configuration, or expose secret values.
- Distinctive: line 57
If the new version fails after a database migration, do not start the old version against the migrated database unless compatibility is …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Open CDM Upgrade Version
Enforce the SSH target gate
- Read the SSH username and host only from the current user request. Accept either
user@hostor separately named values. - If either value is missing, stop before any network call and ask for both in one concise question.
- Never recover the username or host from conversation history, SSH config, environment variables, repository files, previous deployments, or remembered servers.
- Reject values containing newlines or beginning with
-. Do not interpolate untrusted values into a remote shell command. - Treat the target as a test environment only. If inventory clearly indicates production or the environment identity is ambiguous, pause and obtain explicit confirmation before mutation.
Resolve the target release
- If the user supplies a GitHub Actions/CD run, monitor it with
gh run vieworgh run watch --exit-status. Start the server upgrade only after the entire run completes successfully. Stop on cancellation, failure, or missing artifacts. - If the user supplies a version, use that exact version after verifying the release or image exists.
- Otherwise resolve the current stable GitHub Release and state that choice before mutation. Browse or query GitHub because release state is time-sensitive.
- Derive artifact and image names from the successful workflow or release. Do not guess a registry or reuse a stale tag.
Inspect before changing state
Run the bundled read-only preflight first:
scripts/remote_preflight.sh --user <ssh-user> --host <ssh-host>Confirm all of the following:
- current Open-CDM version and deployment form: direct Docker container, Docker Compose, or TGZ;
- container/process names, ports, mounts, restart policy, and Compose project identity;
- free space on both the Docker data filesystem and backup destination;
- current HTTP reachability and database availability;
- a concrete rollback path that preserves the current runtime and data.
Do not print environment values, passwords, tokens, JWT secrets, or full container inspection data to the conversation.
Execute the matching workflow
- For a directly managed
cgdm-aloneDocker container, read and follow references/docker-alone.md completely. - For Docker Compose or TGZ installations, read and follow references/compose-and-tgz.md completely.
- If the installation does not match a documented workflow, stop after inspection and ask for direction. Do not improvise a destructive migration.
Send concise progress updates at least once per minute during CD waits, image pulls, backups, shutdown, migrations, and startup.
Preserve safety invariants
- Pull and validate the target artifact before stopping the current service.
- Create a logical database backup plus configuration/data backups before cutover. Create a stopped raw database-volume backup when using embedded MySQL.
- Store backups on a filesystem with sufficient free space and protect files containing environment values with mode
600or stricter. - Preserve the old container or installation directory under a unique backup name. Do not delete it after a successful test upgrade.
- Never run
docker compose down -v, delete named volumes, overwrite an only copy of configuration, or expose secret values. - Preserve ports, mounts, networks, application environment, and restart policy. Do not copy base-image runtime variables such as
PATHorJAVA_HOMEinto the new container. - If the new version fails after a database migration, do not start the old version against the migrated database unless compatibility is established. Use the pre-upgrade database backup for rollback.
Validate the result
Require all checks below before reporting success:
- Reported runtime version equals the requested target.
- Container/process remains running with no unexpected restart.
- Database responds, and the schema/table inventory is consistent with the pre-upgrade snapshot.
- Local and externally addressed HTTP checks succeed.
- Recent logs contain a normal startup completion and heartbeat or equivalent readiness signal.
- New errors are compared with the previous runtime logs so pre-existing warnings are not misclassified as regressions.
- Repeat state, version, restart-count, and HTTP checks at least three times over roughly 40 seconds.
Report the handoff
Return the SSH target, source and target versions, deployment method, artifact/image digest when available, validation results, backup path, preserved rollback container/directory, and any known warnings. Never include credentials or secret environment values.
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
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.

