Skip to content

khymerao/dormouse-cursor-plugin

Repository files navigation

Dormouse Cursor Plugin

Local Cursor plugin that exposes dormouse as MCP tools for Ukrainian text optimization.

Install (recommended)

cd dormouse-cursor-plugin
chmod +x scripts/*.sh
./scripts/install-to-cursor.sh

Then Developer: Reload Window in Cursor.

How local plugins actually work in Cursor

Official docs say to put plugins in:

~/.cursor/plugins/local/<plugin-name>/
  .cursor-plugin/plugin.json
  skills/, rules/, mcp.json or .mcp.json, ...

After reload, Cursor loads components into:

Component Where it appears
Plugin Settings → Plugins
MCP server Settings → Tools & MCP
Skills Settings → Rules → Agent Decides
Rules Settings → Rules

Critical: symlinks do NOT work

Cursor's plugin loader skips symlinked directories for security (loadUserLocalPlugins checks lstat().isSymbolicLink() and skips them).

The docs mention symlinks for iteration, but the runtime rejects them. You must install a real copied directory.

Our installer uses rsync into ~/.cursor/plugins/local/dormouse.

/add-plugin is Marketplace-only

/add-plugin figma installs from Cursor Marketplace. It does not install local plugins from disk.

Local plugins are loaded only from ~/.cursor/plugins/local/ (real folders, not symlinks).

Verify in logs

After reload, open Output → Cursor Plugins and look for:

loadUserLocalPlugins completed (... 1 plugins loaded)

If you see 0 plugins loaded while a folder exists, it is usually a symlink or invalid manifest.

What this plugin includes

  • MCP tools: dormouse_squeeze, dormouse_squeeze_batch, dormouse_unsqueeze
  • Skill: dormouse-normalizer (long surzhyk/slang prompts only)
  • Rule: dormouse-usage (when to trigger vs skip)
  • Hooks: sessionStart + beforeSubmitPrompt length + surzhyk detection

Auto skill trigger policy

Dormouse runs only when all match:

  1. Long prompt — ≥80 characters or ≥12 words
  2. Surzhyk / slang / conversational UA (not clean literary Ukrainian)
  3. Cyrillic present (U+0400–U+04FF)

Skipped: short prompts ("шо там?", "ок") — token savings are negligible.

When a user message matches:

  1. sessionStart hook injects trigger policy into agent context.
  2. beforeSubmitPrompt hook re-checks each message; injects skill on match, skip hint on short/noisy-fail.
  3. dormouse-usage rule (alwaysApply: true) documents trigger vs skip.
  4. Skill description enables Agent Decides for qualifying prompts.

Verify hooks in Settings → Hooks or Output → Hooks after reload.

Manual dev setup (repo workspace)

./scripts/setup.sh
./scripts/install-to-cursor.sh   # copies into ~/.cursor/plugins/local/dormouse

Do not use:

ln -s ... ~/.cursor/plugins/local/dormouse   # ignored by Cursor

Fallback: project MCP without plugin UI

If you only need MCP tools (no plugin card in Settings), add to project .cursor/mcp.json:

{
  "mcpServers": {
    "dormouse": {
      "type": "stdio",
      "command": "/abs/path/to/mcp/.venv/bin/python",
      "args": ["/abs/path/to/mcp/server.py"]
    }
  }
}

Run ./scripts/generate-mcp-config.sh to produce absolute paths.

Troubleshooting

  • 0 plugins loaded in Cursor Plugins log → remove symlink, run ./scripts/install-to-cursor.sh again
  • MCP missing → enable dormouse in Settings → Tools & MCP
  • MCP fails → check Output → MCP Logs; rerun setup in installed copy

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors