agentleFS
luigi-dvluigi-dv/react-ts-vite/.claude/skills/ci-cd-docker/SKILL.md

ci-cd-docker

Skill1 starsChanged 26 days agoMITView on GitHub

Work with this project's delivery pipeline — the GitHub Actions quality gate and architecture smoke test, npm publishing with provenance, the Claude deployment-insights workflow, and the Docker images (Vite dev server with hot reload, nginx production image). Use when CI fails, when adding a workflow or deploy target, or when running the app in containers.

  • Reads credentials

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

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

    Never fix CI by deleting a check, skipping a test or adding continue-on-error.

    line 31

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

CI, CD and Docker

Workflows (.github/workflows/)

FileTriggerWhat it does
build.ymlpush/PR to master, manualMatrix Node 22 & 24: npm ci, npm run check, npm run build. Second job applies every architecture with all templates and runs arch check, typecheck and tests.
release.ymlpush to the release branch, GitHub release published, manual runRelease pipeline: verify (quality gate + build) → release (resolve the version in package.json, skip if already live on npm, npm stage publish for 2FA approval — or npm publish when PUBLISH_MODE is direct — then tag vX.Y.Z and a GitHub release from the matching CHANGELOG.md section plus the npm status; manual runs can bump the version first) → insights (Claude deployment report appended to the release when ANTHROPIC_API_KEY is set). Template repository only; rtv create leaves it out.
claude-deploy-insights.ymlrelease published, deployment_status = success, manualBuilds, runs node bin/rtv.mjs insights --mode api, uploads deployment-insights.md, appends it to the release. Created by npm run setup when Claude insights are enabled; skips itself without the secret.

npm authentication is trusted publishing (OIDC), not a token: the npmjs.com package has a trusted publisher for GitHub Actions (luigi-dv/react-ts-vite, workflow release.yml, environment release). The release job needs id-token: write; npm ≥ 11.5.1 exchanges the OIDC token itself (an existing token is overridden, failures fall back silently to the configured token, so a missing trusted publisher shows up as a 401/404 on publish). Provenance is generated automatically for public packages. Never add an npm_token secret unless you deliberately switch back to token auth (NODE_AUTH_TOKEN on the publish step).

Staged publishing (PUBLISH_MODE: staged, the default): CI runs npm stage publish, which every trusted publisher may do; the version is stored but not public, occupies its semver slot (re-running the pipeline detects the conflict and reports the version as staged) and keeps the dist-tag given at stage time. A maintainer approves with npm stage approve <stage-id> (2FA, write access; trusted-publisher tokens cannot run npm stage subcommands other than stage publish). direct mode runs npm publish and needs "Allow npm publish" on the trusted publisher.

Conventions: pin actions by major (actions/checkout@v5, actions/setup-node@v5), use node-version-file: .nvmrc, cache npm, keep permissions minimal and explicit, prefer one npm run check over many separate steps so local and CI gates are identical.

Debugging a red CI

  1. Reproduce locally with the same command (npm run check, npm run build). Node version differences? Use nvm use (.nvmrc = 24).
  2. Format failures → npm run format. Lint → npm run lint:fix then fix the rest by hand. Architecture → skill project-architecture. Agent sync → npm run agent:sync and commit.
  3. Architecture smoke job failing: run the same loop locally (see the job's run: block). It catches templates or code that only work in one architecture.
  4. Never fix CI by deleting a check, skipping a test or adding continue-on-error.

Deploying the app

The build is static (dist/). Any static host works: Vercel/Netlify (framework preset Vite, output dist), GitHub Pages (actions/upload-pages-artifact on dist), S3/CloudFront, or the Docker production image below. Set base in vite.config.ts when the app is served from a sub-path. Runtime config goes through VITE_* environment variables (import.meta.env.VITE_API_URL); never ship secrets to the client bundle.

Hosts that create GitHub deployments (Vercel, Netlify, Render…) trigger the deployment_status event, which is how the Claude insights workflow runs after each successful deployment.

Docker

# development — Vite dev server with hot reload (source mounted as a volume)
docker compose -f docker/development/docker-compose.yml up --build

# production — multi-stage build, nginx serving dist/ on :3000 with SPA fallback
docker compose -f docker/production/docker-compose.yml up --build

docker/production/nginx.conf sets immutable caching for /assets/, no-cache for index.html, gzip and basic security headers. Adjust add_header Content-Security-Policy when you know your origins.

Adding a workflow

Copy the structure of build.yml, keep permissions explicit, use npm ci, run npm run check before anything that deploys, and document the new workflow here and in docs/deployment-insights.md or README.md.

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.