ergopti: Skill for Claude Code

.agents/skills/hammerspoon-driver/SKILL.md

hammerspoon-driver is a skill for Claude Code, Codex from adrienm7/ergopti. It costs 31 tokens per session (2,701 once invoked), scanned A, original, MIT.

A set of rules for writing and reviewing Lua code that runs inside Hammerspoon, a macOS automation tool. It focuses on failures specific to the driver, including background tasks being collected before they finish.

In plain words
What is it for?
Use it when editing macOS driver files, checking Hammerspoon tasks and callbacks, or adding source tests for startup code.
Why use it?
It prevents subtle runtime failures that normal unit tests may not catch because the tests do not start the live Hammerspoon application.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents); mentions AGENTS.md.

This is adrienm7/ergopti's own configuration. It tells Claude Code and Codex how to work on ergopti itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything ergopti configures →

Reuse

Borrowing it

Nothing to install: this file belongs to adrienm7/ergopti. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/adrienm7/ergopti/main/.agents/skills/hammerspoon-driver/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/adrienm7/ergopti

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for hammerspoon-driver

README.md
[![agentmods](https://agentmods.dev/badge/skills/adrienm7/ergopti/hammerspoon-driver/github.svg)](https://agentmods.dev/skills/adrienm7/ergopti/hammerspoon-driver)
Your own site
<a href="https://agentmods.dev/skills/adrienm7/ergopti/hammerspoon-driver"><img src="https://agentmods.dev/badge/skills/adrienm7/ergopti/hammerspoon-driver/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for hammerspoon-driver

Your own site · 80×15
<a href="https://agentmods.dev/skills/adrienm7/ergopti/hammerspoon-driver"><img src="https://agentmods.dev/badge/skills/adrienm7/ergopti/hammerspoon-driver.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 31 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,701 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00031 $0.02701
Opus 5.5 $0.00012 $0.01080
Sonnet 5.5 $0.00006 $0.00540
Haiku 4.5 $0.00003 $0.00270

Measured today against content hash ac670e7e9f56, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

hammerspoon-driver scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/hammerspoon-driver/SKILL.md · 202 lines

How it starts

The opening of the file, as written. The whole thing — 202 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Hammerspoon driver foot-guns

Universal code rules live in AGENTS.md; the strict convention lint is the formatting authority. This skill covers only the Hammerspoon and Lua semantics that have actually broken this driver — every item below is a bug we shipped, and most of them shipped green.

The unit suite never loads init.lua (running it needs a live Hammerspoon), so boot-path logic is only reachable through static source tests — that is why so many guards here are meta-tests rather than behavioural ones (tests/meta/boot/test_lua_sources_compile.lua exists because a stray end in init.lua shipped with CI green).

An unpinned hs.task is collected, SIGTERMed, and never calls back

An hs.task held only by a local is garbage-collected the moment the enclosing function returns. Hammerspoon translates that collection into a signal to the subprocess, so the process dies mid-run and its completion callback never fires. Nothing is logged, nothing throws: whatever the task was supposed to finish simply never happens.

Every call site must pin the task in a long-lived table before :start() and release it inside the callback. The canonical root is M._active_tasks (adapters/shell_runner.lua:33, pinned at :194, released at :143); a child module may pin into a root injected by its parent (active_tasks_gc_root, ui/menu/menu_llm/models_manager_mlx.lua:213).

The broad guard is file-granular, not call-site-granular. tests/meta/lua_safety/test_gc_retention.lua walks every driver .lua and only asks whether a file that constructs a task contains an ownership spelling. One pinned task can therefore mask an unpinned sibling. The historical models_manager_mlx.check_task defect is fixed and now has a dedicated guard in test_fresh_regressions_2026_07_21.lua; do not report it as live. Still inspect every construction/start/callback/teardown chain individually.

local x declared AFTER the closure that uses it binds the nil global

In Lua a local's scope starts after its declaration statement. A closure written above the local does not capture it as an upvalue — the name resolves to _G.x, i.e. nil. The code reads perfectly; at call time the value is nil.

Read the full file on GitHub · 202 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today Changed ac670e7e9f56
  2. 10d ago Changed d7457f263c3d
  3. 15d ago First seen · 202 lines · 31 tokens per session scan A 0a051706c88d

Subscribe to this mod's changes

hammerspoon-driver is a skill published in the GitHub repository adrienm7/ergopti (14 stars, last pushed yesterday), licensed MIT. It adds 31 tokens to every session and 2,701 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-14.

Related

Other skills, from other repositories

testing

Skill validation framework PLUS daily test-suite health and regression intelligence. Validates skill conformance (frontmatter, manifest coverage, resolver coverage). Runs the project test suite in tiered phases (unit / evals / integration / system health), classifies failures, and produces a regression-aware report.

garrytan/gbrain · 63 tokens

verify

Verify that a change really works before you claim completion.

Yeachan-Heo/oh-my-claudecode · 12 tokens

detect-static-dependencies

ACTIVATION PREREQUISITE: the request or discovered target must explicitly identify C#, .NET, .cs, or .csproj; otherwise stay dormant without invoking this skill. USE FOR: locating System.DateTime.Now/UtcNow, System.IO.File/Directory, System.Environment, HttpClient, Console, or Process usage in C#; auditing C# code for…

dotnet/skills · 135 tokens

testing-blocks

Use this when you have made AEM Edge Delivery Services code changes to blocks, scripts, or styles and need to validate them before opening a pull request. Covers unit testing for utilities and logic, browser testing with Playwright, linting, and guidance on what to test and how.

adobe/skills · 61 tokens

experiment-iterative-coder

Iterative code refinement through plan → code → evaluate → refine cycles. Runs lint checks (ruff), tests (pytest), and structured self-evaluation each cycle, then diagnoses failures and refines. Decomposes complex tasks into sequential phases, iterates up to 3 times per phase (10 total). Use when: the main agent…

EvoScientist/EvoSkills · 145 tokens

dart-downstream-fix

DART Downstream Fix: fix a DART bug reported through gz-physics or Gazebo.

dartsim/dart · 25 tokens