agentleFS
pawacapawaca/dsh-edge/.agents/skills/dsh-release/SKILL.md

dsh-release

Skill30 starsChanged 36 days agoMITView on GitHub

Publish a dsh-edge release (npm package, GitHub Release, and the Container image) through the tag-driven release workflow, with preflight checks, failure handling, and post-release verification. Use when asked to release, publish, tag, or recover a dsh-edge version, or when a release workflow run fails.

  • Commits and pushes

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run from an up-to-date main checkout:

    line 12
  2. Distinctive:

    Never overwrite, delete, or re-push an image tag or npm version.

    line 69
  3. Very specific:

    Never run docker push for release tags by hand.

    line 70

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

dsh-edge release

A release is one version published in four places that must agree: the npm package, the dsh-edge-v<version> git tag, the GitHub Release, and the Container image docker.io/pawaca/dsh-edge-computer:<version>. AGENTS.md ("Release procedure") is authoritative; this skill is the operational checklist. Tagging, publishing, and reruns require the user's explicit authorization for that version.

1. Preflight (all must pass before tagging)

Run from an up-to-date main checkout:

git checkout main && git pull --ff-only
version="$(node -p "require('./apps/dsh-edge/package.json').version")"
  • apps/dsh-edge/package.json has the intended version; git tag -l "dsh-edge-v$version" is empty.
  • docs/releases/$version.md, docs/releases/$version.zh.md, and docs/releases/$version.i18n.yaml exist on main, and pnpm run doc-sync passes.
  • The Edge CI run for this exact commit succeeded, including edge / container image. Bind the check to HEAD; the newest run may belong to an older commit while this one is still queued:
    commit="$(git rev-parse HEAD)"
    gh run list --workflow "Edge CI" --commit "$commit" --event push --json databaseId,status,conclusion,headSha
    Require one run with headSha equal to $commit, status completed, and conclusion success. If none exists yet, wait; never tag on an older green run.
  • The npm version is unpublished: npm view "dsh-edge@$version" version fails with E404.
  • The image tag is unpublished; exactly HTTP 404 is required, and anything else means stop and investigate: curl -s -o /dev/null -w '%{http_code}\n' "https://hub.docker.com/v2/repositories/pawaca/dsh-edge-computer/tags/$version".
  • The wiki covers the upstream subsystems of the pinned baseline: clone https://github.com/pawaca/dsh-edge.wiki.git and run pnpm run upstream-parity -- wiki <clone>. Report any missing page to the user. A stable release needs it passing or the user's explicit waiver; a prerelease only reports it.
  • Both image secrets exist: gh secret list --repo pawaca/dsh-edge shows DOCKERHUB_USERNAME and DOCKERHUB_TOKEN. (Their values cannot be read; the publish-image login step is the real check, and it fails before anything is published.)

2. Tag

git tag "dsh-edge-v$version" && git push origin "dsh-edge-v$version"

The tag push starts release-edge.yml: verify-source → publish-image → publish (npm, then GitHub Release). Find the run for this tag's commit, not the most recent run (another release may be newer, and a new run can take a few seconds to appear), then watch it to completion:

gh run list --workflow "Release dsh-edge" --commit "$commit" --json databaseId,headSha,event,status
gh run watch <databaseId> --exit-status

A rerun dispatched through request-release.yml runs release-edge.yml on the default branch, so its headSha is the current main commit rather than the tag commit; identify it by event repository_dispatch and its start time.

npm may take several minutes to show a new version after a successful publish; that is npm's asynchronous processing, not a failure.

3. When a job fails

Failing stepStateAction
verify-sourceNothing publishedFix the tag, notes, or version on main through a PR. Never move a pushed tag; if the tag is wrong, ask the user before deleting it.
publish-image loginNothing publishedThe Docker Hub token is expired or revoked. The user creates a new Read & Write token for pawaca and runs gh secret set DOCKERHUB_TOKEN; then rerun (below).
publish-image lookup ("Could not determine whether … is already published")Nothing publishedDocker Hub was unreachable or returned an unexpected status. Wait and rerun.
publish-image build or pushImage may be partially pushed; npm not publishedRead the log. A rerun is safe: an existing tag is reused, never rebuilt.
publish checks (pnpm run check, integration, snapshots, pack verification)The image may already exist; npm is not publishedFix the cause on main, then cut a new version. The orphaned image tag is harmless because no package references it.
publish after npm succeeded (GitHub Release step)npm publishedRerun the same tag; recovery reuses the published npm artifact and image.

Rerun a tag through the default-branch dispatcher (never re-push the tag):

gh workflow run request-release.yml -f tag="dsh-edge-v$version"

Hard rules:

  • Never overwrite, delete, or re-push an image tag or npm version. A bad published image or package is fixed by releasing a new version.
  • Never run docker push for release tags by hand; only publish-image pushes them.

4. Verify (report each result to the user)

npm view "dsh-edge@$version" version dist-tags --json
gh release view "dsh-edge-v$version" --json tagName,isPrerelease,assets
curl -s "https://hub.docker.com/v2/repositories/pawaca/dsh-edge-computer/tags/$version" \
  | node -e "let s='';process.stdin.on('data',d=>s+=d).on('end',()=>{const t=JSON.parse(s);console.log(t.name,t.digest,t.images?.map(i=>i.architecture))})"

Expect the npm version (on next when the version contains -, otherwise latest), a GitHub Release with the tarball asset (marked prerelease for prereleases), and an amd64 image with a digest. Report the digest in the release summary.

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.