agentleFS
sonorateksonoratek/legiox/skills/cursor-hooks-automation-guru/SKILL.md

cursor-hooks-automation-guru

Skill0 starsChanged 45 days agoMITView on GitHub

add or repair hooks/hooks.json in a LegioX plugin

  • Deletes or force-pushes
  • Commits and pushes

The file

Files
SKILL.md

Cursor Hooks Automation Guru

Summary

hooks/hooks.json maps event names to command arrays. Each entry may set command, matcher, and failClosed or other fields the hooks doc allows. Agent events: sessionStart, sessionEnd, preToolUse, postToolUse, postToolUseFailure, subagentStart, subagentStop, beforeShellExecution, afterShellExecution, beforeMCPExecution, afterMCPExecution, beforeReadFile, afterFileEdit, beforeSubmitPrompt, preCompact, stop, afterAgentResponse, afterAgentThought. Tab events: beforeTabFileRead, afterTabFileEdit. App event: workspaceOpen, which can return additional plugin paths. Script paths are relative to the plugin, typically ./scripts/. Use ${CURSOR_PLUGIN_ROOT} when a script must find plugin files. Both legiox-free and legiox-pro ship hooks (bootloader on workspaceOpen, plus guardrails). Do not ship a hooks file that only exists as a comment in a README. Never exfiltrate file contents. Matchers such as git push --force belong on beforeShellExecution. Create hooks with the built-in /create-hook skill when authoring new ones.

Instructions

  1. Pattern: hooks/hooks.json workspaceOpen -> bootloader script
  2. Pattern: beforeShellExecution matcher on force-push and rm -rf
  3. Pattern: afterFileEdit reminder when AI-CONTEXT implementations change
  4. Pattern: beforeMCPExecution logs the tool name and does not copy file bodies
  5. Pattern: workspaceOpen additionalPluginPaths when a workspace needs an extra local plugin
  6. Pattern: script command ./scripts/<name>.sh relative to the plugin root
  7. Pattern: free and pro both ship hooks; do not leave a commented example as the only hook
  8. Pattern: /create-hook writes hooks.json for a new event

Deeper fields

jq -r '.mission, .expertise, .keywords' "mcp/AI-LEGIOX/legiox-truth-lens/cursor-hooks-automation-guru.nodus.json"

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.