agentsclimarketplace

Rebuild plugins before deploy

Skill LaWebcapsule/d9-skills/skills/rebuild-plugins-before-deploy

Always rebuild Directus plugins before deployment to avoid silent extension failures in production.From its SKILL.md

Install
npx -y skills add LaWebcapsule/d9-skills --skill rebuild-plugins-before-deploy

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its file declares

Copied from the file, not written here

The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

2.1 KB, 390 tokens by cl100k_base, as published. Nobody here has run it

Skill: Rebuild Plugins Before Deploy

Purpose

Directus plugins must be rebuilt from source (plugins/) before every deployment. If you deploy without rebuilding, the extensions directory will contain stale or missing builds, and the server will start normally but custom endpoints, hooks, and interfaces will silently not work. There is no error message — the server looks healthy but custom functionality is missing.

Triggers

  • A deploy command is about to be executed (npm run deploy, directus deploy, Docker build)
  • Files in plugins/ have been modified since last build
  • The extensions/ directory exists in the project

Actions

  1. Before any deployment, check if files in plugins/ have changed since the last build
  2. If yes, run npm run build (or pnpm build) in each plugin directory under plugins/
  3. Verify the build output exists in each plugin's dist/ folder
  4. Copy build output to extensions/ (or verify the build outputs directly there)
  5. Continue with the deployment

Errors Prevented

  • "Extensions not found" — silent failure in production The server starts successfully, returns 200 on healthcheck, logs show normal startup. But custom API endpoints return 404, custom hooks don't fire, custom interfaces don't render. There is NO error in the logs. Diagnosed after 2h of debugging on 3 independent sessions. The root cause each time: plugins were modified but not rebuilt before deploy.

Restrictions

  • Do not skip the rebuild even if "nothing changed" — dependency updates in the monorepo can affect plugin builds
  • Do not assume extensions/ is auto-generated — it must be explicitly populated from plugin builds
  • Check build output exists before deploying — a failed build is better caught here than in production

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 326,144. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.