agentleFS
ClouGenceClouGence/open-cdm/skills/open-cdm-upgrade-version/SKILL.md

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.

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
  1. Very specific:

    Read the SSH username and host only from the current user request.

    line 10
  2. Distinctive:

    If either value is missing, stop before any network call and ask for both in one concise question.

    line 11
  3. Distinctive:

    Never recover the username or host from conversation history, SSH config, environment variables, repository files, previous deployments, or …

    line 12
  4. Distinctive:

    Treat the target as a test environment only.

    line 14
  5. Very specific:

    If the user supplies a GitHub Actions/CD run, monitor it with gh run view or gh run watch --exit-status.

    line 18
  6. Distinctive:

    If the user supplies a version, use that exact version after verifying the release or image exists.

    line 19
  7. Distinctive:

    Run the bundled read-only preflight first:

    line 25
  8. Distinctive:

    Do not print environment values, passwords, tokens, JWT secrets, or full container inspection data to the conversation.

    line 39
  9. Distinctive:

    If the installation does not match a documented workflow, stop after inspection and ask for direction.

    line 45
  10. Distinctive:

    Create a logical database backup plus configuration/data backups before cutover.

    line 52
  11. Very specific:

    Never run docker compose down -v, delete named volumes, overwrite an only copy of configuration, or expose secret values.

    line 55
  12. Distinctive:

    If the new version fails after a database migration, do not start the old version against the migrated database unless compatibility is …

    line 57

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Open CDM Upgrade Version

Enforce the SSH target gate

  1. Read the SSH username and host only from the current user request. Accept either user@host or separately named values.
  2. If either value is missing, stop before any network call and ask for both in one concise question.
  3. Never recover the username or host from conversation history, SSH config, environment variables, repository files, previous deployments, or remembered servers.
  4. Reject values containing newlines or beginning with -. Do not interpolate untrusted values into a remote shell command.
  5. 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 view or gh 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-alone Docker 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 600 or 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 PATH or JAVA_HOME into 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:

  1. Reported runtime version equals the requested target.
  2. Container/process remains running with no unexpected restart.
  3. Database responds, and the schema/table inventory is consistent with the pre-upgrade snapshot.
  4. Local and externally addressed HTTP checks succeed.
  5. Recent logs contain a normal startup completion and heartbeat or equivalent readiness signal.
  6. New errors are compared with the previous runtime logs so pre-existing warnings are not misclassified as regressions.
  7. 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.

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.