Skip to content

fix(pstack): tell poteto-agent how to find poteto-mode's SKILL.md - #569

Open
darkhan-nace wants to merge 2 commits into
cursor:mainfrom
darkhan-nace:pstack/poteto-agent-skill-lookup
Open

darkhan-nace wants to merge 2 commits into
cursor:mainfrom
darkhan-nace:pstack/poteto-agent-skill-lookup

Conversation

@darkhan-nace

@darkhan-nace darkhan-nace commented Oct 12, 2026 •

Copy link
Copy Markdown

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_directory or path outside it, they quietly search the workspace instead. Asking Glob for SKILL.md in 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.md returns 0 files from ~, ~/.cursor/plugins or the pstack folder.
  • A shell ls with several globs aborts in zsh. If any one glob matches nothing, zsh fails the whole command with no matches found before ls runs. 2>/dev/null doesn'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.mjs passes.
  • The find command 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.
  • fd and rg --files also find the skill, but neither ships with macOS, and Debian installs fd as fdfind, so the agent uses POSIX find.

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 1a30540. Bugbot is set up for automated code reviews on this repo. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants