Promptles
Constraints

Keep Plugin Paths Portable

Point at ${CLAUDE_PLUGIN_ROOT} for shipped files and ${CLAUDE_PLUGIN_DATA} for state. Never a path from your machine.

A plugin runs from a different folder on each person's machine, and that folder changes with every version. A path like /Users/dana/shipkit works only on Dana's laptop. Ask Claude to use ${CLAUDE_PLUGIN_ROOT} for files that ship with the plugin and ${CLAUDE_PLUGIN_DATA} for anything that must survive an update. Vague: "The hook doesn't work for my teammate, fix it." Specific: "The lint hook points at a folder on Dana's laptop. Make it point at the plugin's own scripts folder so it works on any machine, keep its cache somewhere that survives updates, and show me it running from a fresh install."

Where you'll practice this

One Promptles scenario teaches this principle directly.

  • Make the Hook Work Everywhere

    Every edit Marco and Lee make now prints a hook error. Both installed shipkit 0.2.0 from `acme-tools` this morning: Marco, who works on Windows through WSL (a way to run Linux inside Windows), and Lee on a Mac. shipkit's lint hook (a script Claude Code runs after each file edit)…

Other principles in Constraints