better-codex-dev-delivery
Skill101 starsChanged 59 days agoApache-2.0View on GitHub
Commit and push all local Better Codex code, then install the exact pushed main SHA as an isolated local development instance and deploy that same SHA to the existing VPS. Use only for an explicitly authorized end-to-end dev delivery, not for release publication, standalone commits, standalone installation, or diagnosis-only requests.
In this repository4 other files it gives its agents.
- AGENTS.mdAGENTS.md
- better-codex-beta-deliverySkill
- better-codex-release-deliverySkill
- better-codexSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. About 0 are common, 10 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈10
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 26
Treat paths, hosts, ports, SSH targets, processes, Compose modes, and health endpoints as time-sensitive.
- Distinctive: line 28
Stop if the repository contains likely secrets, local databases, generated binaries, release artifacts, or unclear non-code files that …
- Distinctive: line 34
Create rollback-ready functional commits.
- Very specific: line 41
After each commit, recheck the worktree because another process may have changed it.
- Distinctive: line 43
Do not prepare release metadata.
- Very specific: line 54
Verify the development profile and discovered Dev home, Launcher registration, Runtime PID, Core and Runtime version, database health, …
- Very specific: line 55
Use npm run dev:status and the development-profile CLI commands supported by the installed checkout, including doctor and Relay status …
- Distinctive: line 56
Keep Runtime health, Launcher installation, injection ownership, and visible UI behavior as separate evidence.
- Distinctive: line 58
If the local build, installation, Runtime health, or required changed-behavior check fails, diagnose or roll back the local Dev instance as …
- Distinctive: line 66
Before checkout or rebuild:
- Distinctive: line 70
Create a Relay database backup through the current container, identify the correct Relay or legacy Hub backup CLI from the running service, …
- Distinctive: line 79
After both deployments, verify all applicable layers:
- Very specific: line 91
Do not call the dev delivery fully accepted from a successful push, local build, container health, /healthz, or a login page alone.
- Distinctive: line 104
Never expose passwords, device tokens, pairing codes, cookies, private keys, access tokens, database contents, or unredacted private data …
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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
Better Codex Dev Delivery
Deliver one rollback-ready chain from the shared checkout through main to the isolated local Dev Runtime and the existing VPS Relay. Use the exact pushed source SHA as the deployment identity. Do not change versions, create tags or Releases, promote update feeds, or claim signed-release provenance.
Authorization boundary
Require the current user request to authorize every requested mutation: committing all local code, pushing main, installing the local development instance, and changing the VPS. Do not infer a missing stage from another stage.
Prefer main and do not create a branch unless the user explicitly asks. Read the applicable AGENTS.md before acting. Preserve unrelated work, secrets, databases, stable installations, existing services, reverse proxies, volumes, and deployment configuration. Never reset the worktree, force-push, disable SSH host verification, delete the deployment directory, or use docker compose down -v.
Follow current repository instructions about comments, documentation, tests, and compilation. Explicit authorization for this full dev delivery authorizes only the build required by the repository-supported local Dev installation and the VPS image build. Do not run additional tests, packaging, or release commands unless separately authorized or required by current repository instructions.
Establish live facts
Before changing state:
- Inspect
git status --short --branch -uall, the full diff, recent commits, local HEAD,origin/main, and the remote main SHA. - Inspect
package.json,scripts/development-instance.mjs, the current Dockerfile and Compose files, and the installed CLI capabilities. Do not assume old commands still apply. - Inspect the stable and development local profiles separately, including their homes, Launcher registrations, Runtime processes, databases, Relay URLs, protocols, and connection states.
- Inspect the authorized VPS target and deployment directory, current source SHA, origin URL, tracked and untracked state, Compose file set, container and image IDs, database backup capability, public domain, and public health.
- Treat paths, hosts, ports, SSH targets, processes, Compose modes, and health endpoints as time-sensitive. Discover them rather than copying old values.
Stop if the repository contains likely secrets, local databases, generated binaries, release artifacts, or unclear non-code files that should not be pushed. Stop if the VPS target, deployment directory, origin, Compose mode, or rollback path cannot be established safely.
Commit and push all local code
Classify every modified, deleted, and untracked path by functional ownership. “All local code” includes all intended code changes already present in the checkout; it does not authorize publishing secrets or machine-local artifacts.
Create rollback-ready functional commits. When one file contains unrelated changes, stage exact hunks. Before every commit:
- Recheck the shared worktree and upstream state.
- Inspect the staged path list and staged diff.
- Run
git diff --cached --check. - Confirm unstaged changes are intentionally reserved for a later batch.
After each commit, recheck the worktree because another process may have changed it. Fetch origin/main before pushing, stop on divergence, and confirm the local branch contains only the intended commits. Push main, then verify local HEAD, origin/main, and git ls-remote all resolve to one target SHA.
Do not prepare release metadata. The package version may remain equal to the latest release or beta, so always report the dev source SHA alongside the displayed version.
Install locally first
Require a clean tracked worktree at the verified target SHA. Use the repository-supported isolated development installation path, currently npm run dev:install, rather than overwriting the stable installation. This command may build the checkout as part of installation.
Preserve the stable Better Codex home, database, Launcher, Runtime, update channel, and active Codex process. Do not silently switch a stable Codex window to the development injector.
After installation:
- Recheck the worktree. If the build changed tracked files, stop, classify those changes, and restore the source-to-deployment chain through commit and push before touching the VPS.
- Verify the development profile and discovered Dev home, Launcher registration, Runtime PID, Core and Runtime version, database health, Relay URL,
relay/v1, connection state, reconnect attempts, andlast_error. - Use
npm run dev:statusand the development-profile CLI commands supported by the installed checkout, including doctor and Relay status checks where available. - Keep Runtime health, Launcher installation, injection ownership, and visible UI behavior as separate evidence. Open Better Codex Dev only when the affected behavior requires it.
If the local build, installation, Runtime health, or required changed-behavior check fails, diagnose or roll back the local Dev instance as appropriate and do not deploy the VPS.
Deploy the exact SHA to the VPS
This is an unreleased source deployment. Do not use scripts/selfhost.sh, a moving installer URL, a tag, or a GitHub Release as proof for this stage.
Reinspect the VPS immediately before changing it. Preserve the existing Compose mode, proxy override, environment, secrets, updater configuration, volumes, unrelated containers, and public gateway. Stop on tracked VPS changes, an unexpected origin, or untracked paths that would conflict with the target checkout.
Before checkout or rebuild:
- Record the previous source SHA, displayed version, Compose file set, running container ID, image ID, internal health, and public health.
- Validate the existing Compose configuration using the same files and environment file used by the running deployment.
- Create a Relay database backup through the current container, identify the correct Relay or legacy Hub backup CLI from the running service, and validate the returned backup path.
- Fetch
origin/mainand confirm the fetched target SHA exactly matches local HEAD and the remote main SHA already verified after push.
Check out the exact target SHA in detached mode without deleting ignored or untracked deployment files. Confirm tracked source is clean, then rebuild and start with the existing Compose file set. When a proxy override is present, preserve the existing service selection. Never stop or recreate unrelated services.
Allow only bounded retries for transient network pulls and health probes. If build, startup, internal health, public health, or protocol validation fails, return to the recorded previous SHA, rebuild the previous service, restore the backup when the replacement may have opened or migrated the database, start the previous Compose mode, and verify the old service is healthy. Report whether rollback completed; do not repeatedly redeploy a failing target.
Acceptance gates
After both deployments, verify all applicable layers:
- Repository: clean tracked worktree; local HEAD,
origin/main, and remote main match the target SHA. Report any preserved untracked or ignored files separately. - Automation: report observed CI, CodeQL, or commit-quality status separately when available. Do not wait for packaging or describe automation as a signed-release gate.
- Local provenance: the Dev installation was built from a clean checkout at the target SHA and the worktree remained unchanged afterward.
- Local runtime: development profile, isolated Dev home, healthy Runtime and database, Launcher installed, Relay connected,
relay/v1, and no reconnect error. - VPS provenance: checkout remains at the target SHA, tracked source is clean, and the running container uses the image produced by the rebuild from that checkout. Report the displayed package version separately from the SHA.
- VPS runtime: recorded backup, preserved deployment files, healthy container, internal health, valid public HTTPS health, and
relay/v1. - Tunnel: local Dev Runtime and public Relay are connected with a fresh heartbeat and no
last_error. - Public path: unauthenticated Runtime WebSocket access is rejected, authenticated login reaches a real board or bootstrap request, and credentials are never printed.
- Changed behavior: perform the least invasive live check that proves the affected path. Prefer dedicated ephemeral sessions or records and remove only those artifacts. Never revoke an existing user session or mutate user Issues merely for acceptance.
Do not call the dev delivery fully accepted from a successful push, local build, container health, /healthz, or a login page alone. State any remaining real-browser, mobile-device, visual, or tester acceptance explicitly.
Completion report
Lead with whether the end-to-end dev delivery completed. Report evidence, not a code summary:
- Functional commit SHAs and the exact target SHA.
- Local HEAD,
origin/main, and remote main reconciliation. - Local Dev build provenance, profile, Runtime, Launcher, Relay, and changed-behavior result.
- VPS previous and target SHAs, backup, rollback readiness, container image, public health, tunnel, and authenticated-flow result.
- CI status observed independently from deployment.
- Preserved dirty, ignored, or untracked files and any pending user acceptance.
Never expose passwords, device tokens, pairing codes, cookies, private keys, access tokens, database contents, or unredacted private data in commands or output.
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.

