Repository navigation
fix: load skills and see edits on Cursor - #3
Merged
Merged
Conversation
Cursor has no Skill tool and applies incremental edits with StrReplace. The shared skills, agents and rule now name /pgsql-* and the plugin install, postToolUse matches Write and StrReplace, and the report-only agents set permissionMode: readonly. Co-authored-by: Cursor <cursoragent@cursor.com>
7 of 9 tasks
sebastian-iancu
changed the base branch from
refactor/skills-agents-qa
to
main
October 27, 2026 13:27
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
Review applied in f4b6bea (merge of Fixed
Checks: all pass locally: Still open: loading the plugin in Cursor to confirm the |
…changed - session-start, skill-nudge and lint-on-save tell Cursor the absolute SKILL.md path under the plugin install (JSON-escaped), since "read /pgsql-jsonb" reads as a filesystem path and a subagent cannot find the install itself. One skill list serves both banners, so the routing check covers Cursor's too. Claude Code output is unchanged. - skill-nudge reads JSON line breaks in the added text as spaces, so a keyword on a later line of a multi-line edit still nudges (on both hosts), and marks a skill as nudged only after the message is out. - validate.py fails an edit hook whose matcher misses a host's edit tool (Claude Write|Edit, Cursor Write|StrReplace), with a selftest. - hooks-test.sh: Claude wording in the banner and lint-on-save, every skill and the install path in the Cursor banner, a quote in that path, lint-on-save's relative and absolute Cursor paths, an absolute path beside CURSOR_PROJECT_DIR, multi-line edits, and the relative path case run with CURSOR_PROJECT_DIR really unset. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Agents: read <plugin root>/skills/<name>/SKILL.md on Cursor (the old reviewer path pointed into agents/); the summariser runs by its full path, with the Claude Code fallback back; the reviewer loads only the skills the change touches; "contracts you keep, not a sandbox" is back, since Bash and psql can write on either host. - pgsql-performance: run the summariser by its full path, so a relative plan file resolves in the workspace. - Router, Cursor rule, README briefs: a Cursor brief carries the absolute SKILL.md path; the rule's squawk.toml line no longer says to search for it. - docs/authoring.md is the one home for what each host enforces, with sources: Cursor documents readonly: true, not permissionMode; Claude Code ignores permissionMode in plugin agents. testing.md adds a Cursor check that settles it. - CHANGELOG: no Changed group while nothing is released. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Makes the shared skills, agents, hooks and Cursor rule work on Cursor without changing Claude Code. Cursor has no Skill tool and edits files with
StrReplace, so before this change ordinary SQL edits ran no hook there, and the focused skills never opened. Targetsmain; it was first stacked on #2, which has since merged.Hooks
postToolUsematchesWrite|StrReplace.afterFileEditstays unused because it has no output field, so a nudge there would not reach the model.CURSOR_PROJECT_DIR, because Cursor runs a plugin hook in the plugin install. An absolute path is left as it is.SKILL.mdpath in the plugin install, JSON-escaped. A Cursor subagent cannot find the install on its own, so the session-start path is the one a brief passes on. Claude Code still getspgsql-coding:<skill>, and its hook output is unchanged.Skills, agents, rule
<plugin root>/skills/<name>/SKILL.md. They never look underskills/in the user's repository.pgsql-reviewerandpgsql-plan-analystsetpermissionMode: readonly, andtools:stays. Bash andpsqlcan still write on either host, so no-edit and no-write stay rules the agents keep.docs/authoring.mdis the one place that says what each host enforces, with sources. Cursor's docs givereadonly: trueand don't mentionpermissionMode, and Claude Code ignorespermissionModein plugin agents.**/*.sql. For SQL in Go or PHP it points topgsql-query.Validation
validate.pyfails an edit hook whose matcher misses one of a host's edit tools:Write|Editfor Claude Code,Write|StrReplacefor Cursor. A selftest case covers it.hooks-test.shcovers both hosts' wording, the Cursor install path (including a quote in it), relative and absolute Cursor paths in both edit hooks, and multi-line edits. Each new test was checked against a deliberately broken copy of its hook: all 8 broken copies failed.Test plan
./scripts/validate.shandpython3 scripts/validate.py --selftest(20 checks)./scripts/hooks-test.sh(70 checks)python3 scripts/plan-summary-test.pyclaude plugin validate .python3 scripts/validate.py --check-links(257 of 257).sqlfile (StrReplace), and confirm the nudge arrives asadditional_contextwith the skill's pathpgsql-reviewerto fix a file it reviewed and confirm it refuses (permissionMode: readonly), and that it read a skill from the path its brief gaveMade with Cursor · 🤖 Review fixes with Claude Code