Files
pbakaus_impeccable/plugin
Abdul WahabandCursor abf7773c3d Fix: stop the plugin subtree from running the project's skill copy (#523)
The ./plugin subtree copied dist/claude-code output verbatim, so its 44
markdown instructions said `node .claude/skills/impeccable/scripts/...`,
a path inside the user's project. A plugin-only install got
MODULE_NOT_FOUND; a dual install silently ran the project's older skill
copy with zero indication anything was wrong.

The build now rewrites the plugin subtree's markdown after the copy:

- Every script instruction takes the quoted `node "<skill-base-dir>/
  scripts/..."` form (quoted because the loaded plugin directory can
  contain spaces), resolving against the base directory the runtime
  reports, since no literal path works for plugins (CLAUDE_PLUGIN_ROOT
  is hook-only).
- Setup step 1 loses its project-path fallback clause: a plugin install
  has no working project fallback, that path being the bug itself.
- The `Bash(node .claude/skills/impeccable/scripts/*)` allowed-tools
  entry is dropped rather than widened: a wildcard such as
  `node */skills/impeccable/scripts/*` would auto-approve any
  same-shaped path anywhere on disk (per review), and frontmatter has
  no variable bound to the plugin root. Script runs go through the
  normal Bash confirmation.
- A build-time guard fails build:release when SKILL.src.md's wording
  drifts past the rewrite, when a node pre-approval reappears, or when
  any project-relative scripts path survives in the plugin SKILL.md.

Drafted with AI assistance, reviewed by a maintainer.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-28 00:52:12 +05:00
..
2026-08-26 11:02:54 +05:00
2026-08-26 11:02:54 +05:00