Hook Development for Claude Code Plugins
anthropics/claude-plugins-official
Explains how to write Claude Code plugin hooks, both prompt-based checks and bash commands, for events such as PreToolUse, Stop and SessionStart.
Explains and manages the PostToolUse hook that auto-syncs .pure file edits/creates/deletes to the running Pure LSP session's overlay, so the Agent's on-disk changes and the LSP's in-memory model…
$ npx skills add finos/legend-engine --skill pure-lsp-sync-hook -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install finos/legend-engine pure-lsp-sync-hook --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/finos/legend-engine.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/pure-dev/skills/pure-lsp-sync-hook .claude/skills/pure-lsp-sync-hook && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "pure-lsp-sync-hook" agent skill from https://github.com/finos/legend-engine/tree/master/plugins/pure-dev/skills/pure-lsp-sync-hook into .claude/skills/pure-lsp-sync-hook/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "pure-lsp-sync-hook", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/finos/legend-engine/tree/master/plugins/pure-dev/skills/pure-lsp-sync-hookType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add finos/legend-engine --skill pure-lsp-sync-hook -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install finos/legend-engine pure-lsp-sync-hook --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/finos/legend-engine.git skills-src && mkdir -p .agents/skills && cp -r skills-src/plugins/pure-dev/skills/pure-lsp-sync-hook .agents/skills/pure-lsp-sync-hook && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "pure-lsp-sync-hook" agent skill from https://github.com/finos/legend-engine/tree/master/plugins/pure-dev/skills/pure-lsp-sync-hook into .agents/skills/pure-lsp-sync-hook/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "pure-lsp-sync-hook", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add finos/legend-engine --skill pure-lsp-sync-hook -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install finos/legend-engine pure-lsp-sync-hook --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/finos/legend-engine.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/plugins/pure-dev/skills/pure-lsp-sync-hook .cursor/skills/pure-lsp-sync-hook && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "pure-lsp-sync-hook" agent skill from https://github.com/finos/legend-engine/tree/master/plugins/pure-dev/skills/pure-lsp-sync-hook into .cursor/skills/pure-lsp-sync-hook/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "pure-lsp-sync-hook", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/finos/legend-engine.git --path plugins/pure-dev/skills/pure-lsp-sync-hook--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add finos/legend-engine --skill pure-lsp-sync-hook -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install finos/legend-engine pure-lsp-sync-hook --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/finos/legend-engine.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/plugins/pure-dev/skills/pure-lsp-sync-hook .gemini/skills/pure-lsp-sync-hook && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "pure-lsp-sync-hook" agent skill from https://github.com/finos/legend-engine/tree/master/plugins/pure-dev/skills/pure-lsp-sync-hook into .gemini/skills/pure-lsp-sync-hook/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "pure-lsp-sync-hook", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install finos/legend-engine pure-lsp-sync-hookInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add finos/legend-engine --skill pure-lsp-sync-hook -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/finos/legend-engine.git skills-src && mkdir -p .github/skills && cp -r skills-src/plugins/pure-dev/skills/pure-lsp-sync-hook .github/skills/pure-lsp-sync-hook && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "pure-lsp-sync-hook" agent skill from https://github.com/finos/legend-engine/tree/master/plugins/pure-dev/skills/pure-lsp-sync-hook into .github/skills/pure-lsp-sync-hook/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "pure-lsp-sync-hook", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add finos/legend-engine --skill pure-lsp-sync-hook -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install finos/legend-engine pure-lsp-sync-hook --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/finos/legend-engine.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/plugins/pure-dev/skills/pure-lsp-sync-hook .opencode/skills/pure-lsp-sync-hook && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "pure-lsp-sync-hook" agent skill from https://github.com/finos/legend-engine/tree/master/plugins/pure-dev/skills/pure-lsp-sync-hook into .opencode/skills/pure-lsp-sync-hook/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "pure-lsp-sync-hook", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
pure-lsp-sync-hookExplains and manages the PostToolUse hook that auto-syncs .pure file edits/creates/deletes to the running Pure LSP session's overlay, so the Agent's on-disk changes and the LSP's in-memory model…
Pure Lsp Sync Hook is an agent skill from finos/legend-engine. Explains and manages the PostToolUse hook that auto-syncs .pure file edits/creates/deletes to the running Pure LSP session's overlay, so the Agent's on-disk changes and the LSP's in-memory model stay in a matching state without manual /check or /delete calls - mirroring the file-change events a real IDE sends. Use when the user asks how the LSP-sync hook works, wants to enable/disable/troubleshoot it, sees stale overlay / orphan go() issues, or wants the dev loop to keep disk and the warm LSP session consistent…
Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It works with Bash. The licence is Apache-2.0.
Read from SKILL.md and the folder at commit 43f4e69. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are json).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Pure Lsp Sync Hook loads about 1.2k tokens when it runs. Until then it costs about 138 tokens; SKILL.md has 596 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from finos/legend-engine at commit 43f4e69, republished under its Apache-2.0 licence (© finos). 596 words, ~1,215 tokens.
.claude/skills/pure-lsp-sync-hook/SKILL.md (or your agent's skills folder).The hook script pure-lsp-sync-hook runs after every
Write, Edit, MultiEdit, and Bash tool call and keeps the running Pure LSP session's overlay
in sync with what the Agent changed on disk — the thing a real IDE gets for free via file-watcher
events, which the Agent's file tools do NOT emit:
.pure created/modified (Write/Edit/MultiEdit, or a bash content-write) → POST /check (pushes
current on-disk content = a didChange)..pure deleted (rm ... file.pure via Bash) → POST /delete (unloads it from open-docs +
runtime + overlay, so it stops participating in compilation — the fix for orphan
go__Any_MANY_ is defined more than once)./status; if the bridge is unreachable
OR its runtime is not ready/degraded (e.g. mid-boot/recovering), it does NOTHING and exits 0.
So you can work with no LSP running and nothing happens./status state, not /health alive — because during the
~3-min engine-scale boot the java process is alive but the runtime is initializing, and pushing
to a not-ready runtime would block and add latency to the tool call.The hook is declared by the pure-dev plugin (hooks/hooks.json), so it activates automatically
when the plugin is enabled — no manual settings.json wiring needed:
"PostToolUse": [
{
"matcher": "Write|Edit|MultiEdit|Bash",
"hooks": [
{ "type": "command", "command": "${CLAUDE_PLUGIN_ROOT}/hooks/pure-dev-sync-hook-launcher" }
]
}
]The launcher resolves the bundled pure-lsp-sync-hook (via PATH after preflight, the recorded
plugin bin dir, or its sibling bin/) and passes the tool-call payload through on stdin.
$PURE_LSP_PORT, else a running bridge discovered from its
/tmp/pure_lsp_server_<port>.json sidecar, else 8991 — the same resolution pure-lsp uses, so
it follows whichever bridge the launchers actually started. (It used to hardcode 8992, which no
launcher binds, so it silently no-opped against every real session.)hooks/hooks.json.install-pure-dev does not also copy this hook into ~/.claude/settings.json — doing both
registered it twice and fired it twice per tool call. It only wires settings.json under
--link-skills, for agents with no native plugin system, and removes a duplicate an earlier
install added.ready, so it never
blocks a tool call even when you're not using the dev loop.welcome.pure (see references/lsp-devloop-usage-rules.md for why that one file, and
pure-lsp-go / pure-lsp-execute for driving it). The hook
just means you no longer have to remember to check/delete files you touch — editing
welcome.pure or any .pure auto-syncs it. You can still pass files explicitly to go for an
atomic multi-file compile+run; the hook is complementary, not a replacement..pure (echo/cat/sed/cp/mv) are best-effort: the hook resyncs a .pure
path it sees in a non-rm command if that path now exists. Prefer Write/Edit for reliable sync.ready (pure-lsp status); the hook is a
no-op unless ready. Confirm the file ends in .pure. Confirm the port matches PURE_LSP_PORT.payload.get('tool_name') to a log file at
the top of main(); remove it after.go() diagnostic attaches to whichever file is checked, so after a push the
collision may be reported on the newly-pushed file, not on welcome.pure — both being flagged
means the file is in the session.© finos, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in plugins/pure-dev/skills/pure-lsp-sync-hook of finos/legend-engine.
Open the folder on GitHubat commit 43f4e69
Pure Lsp Sync Hook next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Pure Lsp Sync Hook this skillfinos/legend-engine | 113 | — | ~1.2k | Automated safety check: Pass | Apache-2.0 | |
| Hook Development for Claude Code Pluginsanthropics/claude-plugins-official | 38k | 10 repos | ~4.1k | Automated safety check: Notes | Apache-2.0 | |
| Plugin Settings Patternanthropics/claude-plugins-official | 38k | 7 repos | ~3k | Automated safety check: Pass | Apache-2.0 | |
| Mole Bug Patternstw93/Mole | 70k | — | ~2k | Automated safety check: Pass | GPL-3.0 | |
| Neat-Freak Knowledge CloseoutKKKKhazix/khazix-skills | 21k | — | ~1.9k | Automated safety check: Pass | MIT | |
| E2Ecallstack/react-native-pager-view | 3.4k | 1 repos | ~2.1k | Automated safety check: Pass | MIT |
anthropics/claude-plugins-official
Explains how to write Claude Code plugin hooks, both prompt-based checks and bash commands, for events such as PreToolUse, Stop and SessionStart.
anthropics/claude-plugins-official
Shows how Claude Code plugins keep per-project settings and state in .claude/plugin-name.local.md files with YAML frontmatter and a markdown body.
tw93/Mole
A catalog of recurring bug shapes in the Mole Mac cleaner, used to review safety-sensitive diffs for deletion safety, unbounded commands, shell traps and weak tests.
KKKKhazix/khazix-skills
Brings project docs, agent rule files, authorized memory and leftover workspace files back in line with what the code and runtime actually do at the end of a work session.
callstack/react-native-pager-view
Agentic end-to-end tests with e2e, the e2e runner. An agent skill from callstack/react-native-pager-view.
automazeio/ccpm
Runs a spec-driven workflow from PRD to epic to GitHub issues to parallel agents, with status, standup and blocked-work reports from bundled scripts.
finos/legend-engine
Starts (or confirms) the standalone legend-engine backend - engine Server + H2 + local metadata server on fixed ports 9095/9092 - so a Pure LSP started with -Dlegend.test.
finos/legend-engine
Procedure for git-syncing and rebuilding a local legend-pure + legend-engine checkout, in dependency order, with pinned dependency versions resynced.
finos/legend-engine
Reformats a .pure file (or a block of Pure code) to a consistent house style: 2-space indentation with no column-aligned hanging indents, tight colons in type annotations, spaced pipes on…
finos/legend-engine
Compiles/checks a single .pure file against the already-running Legend Pure LSP bridge and reports diagnostics (errors/warnings) in under a second, as a fast alternative to a full mvn test/mvn…
finos/legend-engine
Attaches the pure-lsp HTTP bridge to an LSP daemon that is ALREADY running (e.g.
finos/legend-engine
Runs exactly ONE existing Pure function by path (signature, mangled id or bare path) through the running Legend Pure LSP bridge, without a go() wrapper, and returns its typed value in returnValue.
Works with
Explains and manages the PostToolUse hook that auto-syncs .pure file edits/creates/deletes to the running Pure LSP session's overlay, so the Agent's on-disk changes and the LSP's in-memory model…. Pure Lsp Sync Hook is an agent skill from finos/legend-engine.pure file edits/creates/deletes to the running Pure LSP session's overlay, so the Agent's on-disk changes and the LSP's in-memory model stay in a matching state without manual /check or /delete calls - mirroring the file-change events a real IDE sends.
Pure Lsp Sync Hook fits situations like: the user asks how the LSP-sync hook works; wants to enable/disable/troubleshoot it; sees stale overlay / orphan go() issues; wants the dev loop to keep disk and the warm LSP session consistent automatically.
Run `npx skills add finos/legend-engine --skill pure-lsp-sync-hook -a claude-code`. Or copy the skill folder (plugins/pure-dev/skills/pure-lsp-sync-hook in finos/legend-engine) into .claude/skills/pure-lsp-sync-hook in your project. Claude Code loads it when a task matches its description.
Run `npx skills add finos/legend-engine --skill pure-lsp-sync-hook -a codex`. Or copy the skill folder (plugins/pure-dev/skills/pure-lsp-sync-hook in finos/legend-engine) into .agents/skills/pure-lsp-sync-hook in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add finos/legend-engine --skill pure-lsp-sync-hook -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/pure-lsp-sync-hook, .gemini/skills/pure-lsp-sync-hook, .github/skills/pure-lsp-sync-hook and .opencode/skills/pure-lsp-sync-hook in your project.
SKILL.md names no scripts, command-line tools or credentials: Pure Lsp Sync Hook is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Pure Lsp Sync Hook is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.2k tokens (SKILL.md is roughly 4.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Pure Lsp Sync Hook: Hook Development for Claude Code Plugins (anthropics/claude-plugins-official, 38k stars), Plugin Settings Pattern (anthropics/claude-plugins-official, 38k stars), Mole Bug Patterns (tw93/Mole, 70k stars) and Neat-Freak Knowledge Closeout (KKKKhazix/khazix-skills, 21k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
finos (a GitHub organization) maintains it in finos/legend-engine, which has 113 GitHub stars. The repository holds 15 skills in this directory. The repository was last updated on October 8, 2026.
Source: finos/legend-engine on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.