fix(pstack): tell poteto-agent how to find poteto-mode's SKILL.md
poteto-agent tells the subagent to read the poteto-mode skill's SKILL.md, but it doesn't say where that file is. If the subagent doesn't already have the path in its context, it has to search for it, and the obvious searches fail:
- Glob and Grep search only the open workspace. Given a
target_directoryorpathoutside it, they quietly search the workspace instead. Asking Glob forSKILL.mdin the pstack cache folder returned the open repo's.agents/skills/*/SKILL.md. Grep's result is labelled with the workspace path. So**/poteto-mode/SKILL.mdreturns 0 files from~,~/.cursor/pluginsor the pstack folder. - A shell
lswith several globs aborts in zsh. If any one glob matches nothing, zsh fails the whole command withno matches foundbeforelsruns.2>/dev/nulldoesn't help.
In one run, a reviewer subagent tried both, then reported "the poteto-mode skill does not exist anywhere on this machine" and worked without it. The file was at ~/.cursor/plugins/cache/cursor-public/pstack/<sha>/skills/poteto-mode/SKILL.md.
This change adds one paragraph to the agent:
- Use the path the parent passed.
- Otherwise run
find ~/.cursor/plugins -path '*pstack*/skills/poteto-mode/SKILL.md'. The quoted pattern behaves the same in bash and zsh, and still matches after a version bump or a different marketplace name. - Use the newest match, and look for the
principle-*skills next to it. - Don't use Glob or Grep for this.
- If the lookup fails, report the command instead of saying the skill is missing.
It also bumps pstack to 0.15.18.
Checked.
node scripts/validate-plugins.mjspasses.- The
findcommand prints the installed path in both bash and zsh. - Glob and Grep pointed at the pstack folder and at a plain folder in
/private/tmp(no.gitignore, not a git repo) both searched the workspace instead. fdandrg --filesalso find the skill, but neither ships with macOS, and Debian installsfdasfdfind, so the agent uses POSIXfind.
[!NOTE]
Low Risk
Documentation-only agent prompt change and a patch version bump; no runtime code or security-sensitive behavior.
Overview
Bumps pstack to 0.15.18 and extends poteto-agent so subagents can reliably load poteto-mode when the parent did not pass a path.
The new instructions tell the agent to prefer a parent-supplied SKILL.md path, otherwise run POSIX find under ~/.cursor/plugins for *pstack*/skills/poteto-mode/SKILL.md, read the newest match, and locate sibling principle-* skills there. It explicitly forbids Glob/Grep for this lookup (they only search the open workspace) and requires reporting the find command on failure instead of claiming the skill is missing.
Reviewed by Cursor Bugbot for commit 1a3054050d5adbbd6e7d12b4575e14e6cc6145e9. Bugbot is set up for automated code reviews on this repo. Configure here.