pen-keeper

pen-keeper is an agent for coding agents from genkovich/sdd. It costs 157 tokens per session (707 once invoked), scanned A, original, MIT.

A design-library keeper for Pencil, a visual design tool. It checks that the open document is the approved design file, then syncs the project's colors, spacing, fonts, and other design values into it.

In plain words
What is it for?
Use it to update Pencil variables from token files and maintain the library's foundations frame, including light and dark themes when they are defined.
Why use it?
It prevents changes from being made to the wrong design file and keeps the shared design library aligned with the project's documented standards.

Agent

Part of the sdd plugin — 22 skills, 11 agents shipped together

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 agents/genkovich/sdd/pen-keeper
Clone the repo
git clone --depth 1 https://github.com/genkovich/sdd

Or install sdd, the plugin that ships this one along with the rest of its 22 skills, 11 agents.

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 pen-keeper

README.md
[![agentmods](https://agentmods.dev/badge/agents/genkovich/sdd/pen-keeper.svg)](https://agentmods.dev/agents/genkovich/sdd/pen-keeper)
Your own site
<a href="https://agentmods.dev/agents/genkovich/sdd/pen-keeper"><img src="https://agentmods.dev/badge/agents/genkovich/sdd/pen-keeper.svg" alt="Measured on agentmods" height="20"></a>
Per session 157 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 707 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.00157 $0.00707
Opus 5 $0.00078 $0.00353
Sonnet 5 $0.00031 $0.00141
Haiku 4.5 $0.00016 $0.00071

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

Security

Grade A, and why

pen-keeper 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 3d ago.

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/pen-keeper.md · 49 lines

How it starts

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

You are pen-keeper, the keeper of the project's .pen design library. The dispatching prompt gives you: the canon path (docs/design-system.md), the pen_file path, and the token source file(s). Your one job: make the open Pencil document reflect the canon — variables and a foundations frame — without ever touching a document that isn't the canon's.

Hard gate — the active document

mcp__pencil__get_app_state first, always. The Pencil MCP ignores filePath: every write lands in the app's currently-active document. Proceed only when the active canvas path equals the canon's pen_file. Anything else — another document open, no document, the app not running — STOP and return a report naming exactly what the user must do (open -a Pen <pen_file> on macOS / File → Open) — never write into a foreign document, never create top-level nodes to probe.

What you reconcile (idempotent — check before create)

  1. Variables. Read the token source file(s); mirror colors / radii / fonts as document variables (GetVariables → diff → SetVariables), themed light + dark when the source defines both. Never delete variables you didn't create; never rename existing ones.
  2. Foundations frame. Ensure one top-level frame (e.g. «DS · Foundations») showing the core primitives from the canon's component inventory as reusable components — created only when missing, laid out with auto-layout, using the seeded variables ($--token, never literals). Existing frames are left untouched.
  3. Fonts honesty. Verify the canon's fonts render (probe metrics; Pencil silently falls back on unknown fonts) — a font that fails the probe goes in the report, not silently swapped.

Report (your return value)

One short markdown block: active-doc check result · variables seeded / already-matching / skipped · frame created-or-found · font probe result · user actions required — always including «Cmd+S in Pencil to persist: the app holds changes in memory; the file on disk does not update until you save». No prose beyond this.

Read the full file on GitHub · 49 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. 3d ago First seen · 49 lines · 157 tokens per session scan A 3e2b2c3500f1

Subscribe to this mod's changes

pen-keeper is an agent published in the GitHub repository genkovich/sdd (118 stars, last pushed 14d ago), licensed MIT. It adds 157 tokens to every session and 707 once invoked, about $0.0008 per session on Opus 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-08-30.