Skip to content

feat(pstack): install pstack in Claude Code from a generated tree - #637

Merged
poteto merged 22 commits into
mainfrom
lauren/pstack-harness-adapters-bc8e
Oct 16, 2026
Merged

poteto merged 22 commits into
mainfrom
lauren/pstack-harness-adapters-bc8e

Conversation

@poteto

@poteto poteto commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

Why

Claude Code users can now install pstack from this repo with claude plugin install pstack@cursor-plugins, as the run under Verification shows. On main, .claude-plugin/marketplace.json does not list pstack, and the skills name Cursor tools, subagent fields, and model slugs that Claude Code calls by other names. This PR adds a generated copy of the skills for Claude Code and an adapter that maps those names. Maintainers inherit one step. After an edit to pstack skills, agents, the adapter, or pstack/plugin.json, run node scripts/generate-pstack-harness-trees.mjs and commit the result.

What changed

  • scripts/generate-pstack-harness-trees.mjs builds harness/pstack/claude-code from pstack/skills, pstack/agents, the adapter at pstack/docs/harness/claude-code.md, the license, and the plugin manifests. It adds one line under the title of the 21 skills that use Cursor names, and that line links to the adapter.
  • .claude-plugin/marketplace.json lists pstack at harness/pstack/claude-code. This PR commits the tree, because a Claude Code install copies the plugin folder and runs no build.
  • CI runs the generator with --check. The check fails on a stale tree, on a relative link that does not resolve inside the tree, and on a Cursor name with no row in the adapter. scripts/validate-plugins.mjs now also checks the Claude Code marketplace entries.

Scope

  • Cursor loads the same skills and agents as before. pstack/skills and pstack/agents match main byte for byte, checked with git diff --quiet.
  • The tree holds the skills, the agents, the adapter, the license, and the manifests. It leaves out the guide, the README, pstack/assets, and pstack/automations. A relative link to a left-out file becomes a link to that file on GitHub main.
  • Codex is out of scope. This PR does not bump the version.

Tradeoffs

  • The tree holds full skill copies, not thin pointer files. A pointer SKILL.md makes the first request about 480 tokens smaller. Each load then reads the real file in a second call and costs 104 to 186 more tokens. I measured both shapes with the o200k tokenizer at an earlier head of this branch.
  • The tree sits at the repo root, not under pstack/. A Cursor install of pstack on the test machine holds assets/, automations/, docs/, and README.md, so Cursor copies the whole plugin folder. The tree is 138 files and 643,022 bytes, measured with git ls-tree -l, and a tree under pstack/ would add that to every Cursor install.
  • Guide links point at GitHub main. A link can show a newer page than the installed version, and it needs the network. poteto-help reads a guide page before it quotes it. In Claude Code that read is a WebFetch call, and an interactive session asks permission for it.
  • This PR does not block Codex. Codex reads .claude-plugin/marketplace.json when a repo has no .agents/plugins/marketplace.json, as marketplace.rs in openai/codex shows. So a Codex user who adds this marketplace can install the Claude Code tree, as Bugbot pointed out. Main already exposes its one listed plugin to Codex the same way. A block would need a Codex marketplace file that lists that plugin and leaves out pstack. This PR adds no Codex files, so it leaves the fallback alone.

Blast Radius

The pstack/ folder that Cursor installs is 170 files and 3,487,581 bytes, against 169 files and 3,483,454 bytes on main, measured with git ls-tree -l. The new file is the Claude Code adapter. No current Claude Code user sees a change, because this repo had no pstack install path for Claude Code. When I counted with gh pr list, 47 open PRs edited pstack/skills. Each one that lands after this PR must regenerate the tree, or CI fails.

Verification

  • Claude Code 2.1.301 ran in a fresh HOME at e84046f. claude plugin marketplace add took a git URL to a local HTTPS copy of this branch, because Claude Code rejects file://. claude plugin install pstack@cursor-plugins installed a copy that matches harness/pstack/claude-code under diff -r. claude plugin details lists 54 skills and 2 agents, and the skill names match pstack/skills.
  • A real /pstack:setup-pstack dry run loaded SKILL.md and the adapter from the installed copy. A /pstack:poteto-help run found no guide page in the install, fetched the page from GitHub main, and quoted it. The test machine had no Anthropic API key, so Claude Code sent its model calls through a local LiteLLM proxy to OpenAI gpt-5.5. The install, the skill load, and the file reads are Claude Code's own, and only the model differs. At an earlier head, runs on Claude Sonnet 5.5 read setup-pstack, architect, a reference file, and the adapter from the installed copy. Those files are byte-identical at this head.
  • node scripts/generate-pstack-harness-trees.mjs --check and node scripts/validate-plugins.mjs pass. A link check over the tree resolves 86 of 87 relative links. The one left is a template placeholder that is also unresolved on main. A skill edit without a regenerate makes --check name the stale file, print the regenerate command, and exit 1.
Open in Web Open in Cursor 

Note

Low Risk
Packaging, docs, and CI around generated plugin artifacts; core Cursor skills are unchanged and there is no runtime or security-sensitive logic in the app itself.

Reviewed by Cursor Bugbot for commit e84046f. Bugbot is set up for automated code reviews on this repo. Configure here.

sirine-jnayeh and others added 8 commits October 15, 2026 19:50
Partial cherry-pick of d4d1e65 from #629. It keeps the Claude Code
manifest, the marketplace entry, and the README install lines. The
manifest version matches the other two manifests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Partial cherry-pick of 8543ac8 from #629. It keeps the validate-plugins.mjs
checks. The workflow change is left out, as #629 also reverted it in 6bcc06b,
so the comment that says CI runs `claude plugin validate` is dropped too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The check fails on this tree until the next commit runs it with --fix.
…adapters

Generated by node scripts/check-pstack-harness.mjs --fix.
Codex reads .agents/plugins/marketplace.json before .claude-plugin/marketplace.json, so it lists origin-apps too.
Name the relative-link test in check-pstack-harness.mjs linksToSkill so it reads without a comment.

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread pstack/docs/harness/claude-code.md
Comment thread pstack/docs/harness/codex.md Outdated
cursoragent and others added 6 commits October 15, 2026 20:55
Co-authored-by: lauren <poteto@users.noreply.github.com>
…DE.md or AGENTS.md

Co-authored-by: lauren <poteto@users.noreply.github.com>
…harness check

Core skills stay byte-identical to main. Claude Code and Codex get their own generated trees in a later commit.
Other workspaces share the Codex sessions tree, so cutting to the newest files first can drop the current session. Also name where Claude Code keeps subagent transcripts.
Core pstack/skills stays untouched and Cursor keeps using pstack/
directly. scripts/generate-pstack-harness-trees.mjs renders one tree per
harness under pstack/harness/, each a byte copy of skills and agents plus
that harness's adapter, its manifest, an adapter line in every SKILL.md
that uses Cursor names, and for Codex the sidecars that hide
disable-model-invocation skills. The Claude Code and Codex marketplaces
now install those trees.

CI runs the generator with --check and fails on drift, printing the
regenerate command.
…esolve

poteto-help links ../../README.md and ../../docs/guide/*.md, which dangled in both generated trees. Each tree now also holds pstack/README.md and every .md under pstack/docs, which covers the adapters, so their special case is gone.
@cursor cursor Bot changed the title feat(pstack): add Claude Code and Codex adapters feat(pstack): install pstack in Claude Code and Codex from generated trees Oct 16, 2026

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread scripts/generate-pstack-harness-trees.mjs Outdated
cursoragent and others added 8 commits October 16, 2026 01:21
…ship

The generator copied only Markdown under pstack/docs, so the six
docs/guide/images/*.jpg files that the guide pages link to were missing
from both harness trees.

Co-authored-by: lauren <poteto@users.noreply.github.com>
…t install them

Cursor installs a marketplace plugin by copying its whole source folder, so trees under pstack/harness tripled the Cursor install. Move them to harness/pstack at the repository root, point the Claude Code and Codex marketplaces there, and link the pstack readme to the new folder on GitHub.
The pstack readme and the overnight guide link to automations/benny, which the harness trees did not include.
A relative link that resolves from pstack/ must resolve inside each generated tree, because Claude Code and Codex install only the tree.
… out

Stop copying automations into the harness trees. When a relative link resolves from pstack/ but its target is not in a tree, the generator renders it as the file's GitHub URL on main, using /tree/ for directories. A link that leaves pstack/ still fails generation.
The trees moved from pstack/harness to harness/pstack, so the old linguist-generated pattern matched nothing and GitHub showed the generated files as hand-written in review.
Each tree now copies skills/, agents/, and only its own harness adapter,
which the adapter line in 21 SKILL.md files tells the model to read.
Links from poteto-help to the README and guide pages point at GitHub main.

Co-authored-by: lauren <poteto@users.noreply.github.com>
Removes harness/pstack/codex, the Codex adapter, the .agents marketplace,
the Codex sidecars and tree in the generator, and the Codex checks in
validate-plugins.mjs. The Claude Code tree is unchanged.

Co-authored-by: lauren <poteto@users.noreply.github.com>
@cursor cursor Bot changed the title feat(pstack): install pstack in Claude Code and Codex from generated trees feat(pstack): install pstack in Claude Code from a generated tree Oct 16, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit e84046f. Configure here.

Comment thread scripts/generate-pstack-harness-trees.mjs
@poteto
poteto merged commit 182f2ce into main Oct 16, 2026
2 checks passed
@poteto
poteto deleted the lauren/pstack-harness-adapters-bc8e branch October 16, 2026 19:56
alekscbarragan added a commit to alekscbarragan/cursor-plugins that referenced this pull request Oct 17, 2026
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.

3 participants