context-drop

A small macOS command-line tool that reads text selected in the currently focused app and prints the selection as one line of JSON. It uses macOS Accessibility access and can fall back to copying the selection to the clipboard.

In plain words
What is it for?
Use it in Sutando.app's context-dropping workflow to capture selected text from apps such as Discord. It is built and run as a one-time helper command.
Why use it?
It gives another tool a reliable way to capture the text you have highlighted without manually copying and pasting it. It also reports when macOS denied access or no selection was found.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/sonichi/sutando/context-drop
Any agent
npx skills add sonichi/sutando --skill context-drop
Clone the repo
git clone --depth 1 https://github.com/sonichi/sutando

Made for: Claude Code, Codex.

Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 684 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00000 $0.00684
Opus 5 $0.00000 $0.00342
Sonnet 5 $0.00000 $0.00137
Haiku 4.5 $0.00000 $0.00068

Measured 2d ago against content hash 79dd9d5d57e8, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

context-drop 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 2d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (build.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/context-drop/SKILL.md · 41 lines

How it starts

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

Context-Drop AX-Read

Tiny Swift CLI that reads the focused app's text selection via the macOS Accessibility API. Sutando.app's "drop context" action (hotkey configurable via state/hotkeys.json) shells out to this binary to capture what you have highlighted.

What it does

Runs once per invocation and emits a single JSON line on stdout:

{"app":"Discord","window_title":"@sutando — Discord","url":"","selected":"the highlighted text","path":"ax"}

path values:

  • "ax"AXSelectedText returned non-empty (native NSTextView path)
  • "clipboard" — AX returned empty, Cmd+C fallback wrote new clipboard content
  • "none" — both paths returned empty (or AX was denied)

The Cmd+C fallback uses NSPasteboard.changeCount to distinguish "Cmd+C actually wrote something" from "clipboard already had content" — otherwise the previous clipboard contents would be silently reported as the new selection. The prior pasteboard string is restored after the probe so a failed-copy attempt doesn't corrupt the clipboard.

Build

bash skills/context-drop/build.sh

Produces skills/context-drop/ax-read. The headless core's src/startup.sh does not build app-only helpers; compile this binary explicitly as part of the optional menu-bar app setup (or let the app packaging workflow build it).

Why a separate binary instead of inlining in Sutando.app

LSUIElement=YES menu-bar agents (which Sutando.app is) have a TCC attribution chain that can misroute AX queries to the parent bundle even after a re-grant. A separately-signed CLI launched as a child gets its own clean trust binding, and the resulting AX queries succeed consistently. The binary is also reusable by any other tool that needs a one-shot selection read — voice agents, other hotkey handlers, automation scripts.

Permissions

The first time ax-read runs it'll trigger the macOS Accessibility prompt for Sutando.app (its parent, who macOS attributes the AX queries to). Approve the prompt; the binding persists until the next codesign identity change. See PR #902 for the full TCC story.

Read the full file on GitHub · 41 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 2d ago First seen · 41 lines · 0 tokens per session scan A 79dd9d5d57e8

Subscribe to this mod's changes

context-drop is a skill published in the GitHub repository sonichi/sutando (389 stars, last pushed 2d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 684 tokens. 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-08-30.