Agent skill

Pure Lsp Sync Hook

by finos in 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…

Apache-2.0Auto-check passed

Install Pure Lsp Sync Hook

skills CLI
$ npx skills add finos/legend-engine --skill pure-lsp-sync-hook -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install finos/legend-engine pure-lsp-sync-hook --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ 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-src

Use ~/.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/

Facts

Skill name
pure-lsp-sync-hook
GitHub stars
113
Token cost
~1.2k tokens
SKILL.md length
596 words
Files
1
Skills in repo
15
Repo updated
First seen
Licence
Apache-2.0

At a glance

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…

  • The user asks how the LSP-sync hook works
  • SKILL.md covers What it does, Key properties (by design), Configuration and Interaction with the dev loop, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Wants to enable/disable/troubleshoot it

What it does

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.

When your agent uses it

  • 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

Example prompts

  • “s overlay, so the Agent”
  • “Use the pure-lsp-sync-hook skill to explain and manages the PostToolUse hook that auto-syncs .pure file edits/creates/deletes to the running Pure…”
  • “/pure-lsp-sync-hook”

What it can do on your machine

Read from SKILL.md and the folder at commit 43f4e69. It shows what the files ask for, not the result of running them.

  • Tool permissions

    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.

  • Runs code

    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.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

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.

Always · name and description, kept in context so the agent knows when to use it
~138
When it runs · the whole SKILL.md, loaded when a task matches
~1.2k

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.

Safety

Auto-check passed

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.

SKILL.md

The full file from finos/legend-engine at commit 43f4e69, republished under its Apache-2.0 licence (© finos). 596 words, ~1,215 tokens.

Download SKILL.mdSave it as .claude/skills/pure-lsp-sync-hook/SKILL.md (or your agent's skills folder).
name
pure-lsp-sync-hook
description
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 automatically.

PostToolUse hook: auto-sync .pure edits to the LSP session

What it does

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).

Key properties (by design)

  • The LSP is OPTIONAL. The hook first checks the bridge's /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.
  • Never blocks or annoys. Always exits 0, prints nothing on success, swallows all errors, and uses short timeouts (1.5s readiness probe). A hook failure can never interfere with real work.
  • Readiness, not liveness. It gates on /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.

Configuration

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:

json
"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.

  • Port: the hook resolves $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.)
  • To disable: disable the pure-dev plugin, or remove the PostToolUse entry from the plugin's 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.
  • The hook is a silent exit-0 no-op whenever the LSP daemon is down or not ready, so it never blocks a tool call even when you're not using the dev loop.
Show full SKILL.md (186 more words)Show less

Interaction with the dev loop

  • You still drive runs via 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.
  • Bash content-writes to .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.

Troubleshooting

  • "My edit didn't reach the session": confirm the LSP is 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.
  • To watch it work, temporarily add a debug line writing payload.get('tool_name') to a log file at the top of main(); remove it after.
  • Note: the duplicate-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

Files

Just SKILL.md in plugins/pure-dev/skills/pure-lsp-sync-hook of finos/legend-engine.

Open the folder on GitHubat commit 43f4e69

Compare with similar skills

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.

Pure Lsp Sync Hook compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Pure Lsp Sync Hook this skillfinos/legend-engine113—~1.2kAutomated safety check: PassApache-2.0
Hook Development for Claude Code Pluginsanthropics/claude-plugins-official38k10 repos~4.1kAutomated safety check: NotesApache-2.0
Plugin Settings Patternanthropics/claude-plugins-official38k7 repos~3kAutomated safety check: PassApache-2.0
Mole Bug Patternstw93/Mole70k—~2kAutomated safety check: PassGPL-3.0
Neat-Freak Knowledge CloseoutKKKKhazix/khazix-skills21k—~1.9kAutomated safety check: PassMIT
E2Ecallstack/react-native-pager-view3.4k1 repos~2.1kAutomated safety check: PassMIT

Similar skills

  • Hook Development for Claude Code Plugins

    anthropics/claude-plugins-official

    Official

    Explains how to write Claude Code plugin hooks, both prompt-based checks and bash commands, for events such as PreToolUse, Stop and SessionStart.

    38k GitHub starsUsed in 10 repos~4.1k tokens
    Agent WorkflowsAuto-check: notes
  • Plugin Settings Pattern

    anthropics/claude-plugins-official

    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.

    38k GitHub starsUsed in 7 repos~3k tokens
    Agent WorkflowsAuto-check passed
  • 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.

    70k GitHub stars~2k tokensUpdated today
    DevelopmentAuto-check passed
  • Neat-Freak Knowledge Closeout

    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.

    21k GitHub stars~1.9k tokensUpdated 8 days ago
    Agent WorkflowsAuto-check passed
  • E2E

    callstack/react-native-pager-view

    Agentic end-to-end tests with e2e, the e2e runner. An agent skill from callstack/react-native-pager-view.

    3.4k GitHub starsUsed in 1 repo~2.1k tokens
    Testing & QAAuto-check passed
  • 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.

    8.4k GitHub stars~1.1k tokensUpdated 6 mo ago
    Product & Project ManagementAuto-check passed

More from finos/legend-engine

All 15 skills in this repo
  • Pure Backend Start

    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.

    113 GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Pure Chain Update

    finos/legend-engine

    Procedure for git-syncing and rebuilding a local legend-pure + legend-engine checkout, in dependency order, with pinned dependency versions resynced.

    113 GitHub stars~1.8k tokensUpdated today
    Auto-check passed
  • Pure Code Style

    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…

    113 GitHub stars~1.6k tokensUpdated today
    Auto-check passed
  • Pure Lsp Check

    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…

    113 GitHub stars~1.4k tokensUpdated today
    Auto-check passed
  • Pure Lsp Connect

    finos/legend-engine

    Attaches the pure-lsp HTTP bridge to an LSP daemon that is ALREADY running (e.g.

    113 GitHub stars~1.3k tokensUpdated today
    Auto-check passed
  • Pure Lsp Execute

    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.

    113 GitHub stars~883 tokensUpdated today
    Auto-check passed

Works with

Questions about Pure Lsp Sync Hook

What does Pure Lsp Sync Hook do?

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.

When should I use Pure Lsp Sync Hook?

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.

How do I install Pure Lsp Sync Hook in Claude Code?

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.

How do I install Pure Lsp Sync Hook in Codex?

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.

Can I use Pure Lsp Sync Hook in Cursor, Gemini CLI or GitHub Copilot?

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.

What does Pure Lsp Sync Hook need to run?

SKILL.md names no scripts, command-line tools or credentials: Pure Lsp Sync Hook is instructions for the agent only.

Does Pure Lsp Sync Hook access the network?

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.

Is Pure Lsp Sync Hook safe to install?

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.

What licence does Pure Lsp Sync Hook use?

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.

How many tokens does Pure Lsp Sync Hook use?

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.

What are the alternatives to Pure Lsp Sync Hook?

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.

Who maintains Pure Lsp Sync Hook?

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.