plugin-authoring

plugin-authoring is a skill for Claude Code from asgeirtj/system_prompts_leaks. It costs 83 tokens per session (1,805 once invoked), scanned A, original, CC0-1.0.

A guide to writing or debugging Claude Code plugins built from event hooks. A hook is a function that runs when an event such as a tool call, prompt submission, or session start occurs.

In plain words
What is it for?
Use it when creating or changing a plugin manifest, hook module, event matcher, or hook behaviour, including how a hook passes control to the next handler.
Why use it?
It explains the plugin structure and points to the generated type definitions, which matter because this early-access interface can change between releases.

Skill for Claude Code

Written for Claude Code: Claude Code plugin machinery. Also seen: mentions subagents; mentions Claude Code.

Good fit Use it when creating or changing a plugin manifest, hook module, event matcher, or hook behaviour, including how a hook passes control to the next handler.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/asgeirtj/system_prompts_leaks/plugin-authoring
About the project

System Prompts Leaks is a collection of captured system instructions used to guide AI chatbots and coding agents before they receive user messages. It serves researchers and developers studying how different AI assistants are directed.

asgeirtj/system_prompts_leaks · 64,893 stars · on GitHub

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.

Any agent
npx skills add asgeirtj/system_prompts_leaks --skill plugin-authoring
Clone the repo
git clone --depth 1 https://github.com/asgeirtj/system_prompts_leaks

Made for: Claude Code.

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 plugin-authoring

README.md
[![agentmods](https://agentmods.dev/badge/skills/asgeirtj/system_prompts_leaks/plugin-authoring/github.svg)](https://agentmods.dev/skills/asgeirtj/system_prompts_leaks/plugin-authoring)
Your own site
<a href="https://agentmods.dev/skills/asgeirtj/system_prompts_leaks/plugin-authoring"><img src="https://agentmods.dev/badge/skills/asgeirtj/system_prompts_leaks/plugin-authoring/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 plugin-authoring

Your own site · 80×15
<a href="https://agentmods.dev/skills/asgeirtj/system_prompts_leaks/plugin-authoring"><img src="https://agentmods.dev/badge/skills/asgeirtj/system_prompts_leaks/plugin-authoring.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 83 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,805 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.00083 $0.01805
Opus 5 $0.00042 $0.00903
Sonnet 5 $0.00017 $0.00361
Haiku 4.5 $0.00008 $0.00180

Measured 2d ago against content hash a4884b9cb174, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

plugin-authoring 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 2 executable files (reference/claude-code-mcp.d.ts, reference/claude-code.d.ts), 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.

Anthropic/claude-code/skills/plugin-authoring/SKILL.md · 126 lines

How it starts

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

You are about to write, extend or debug a plugin made of function hooks. This note is orientation: what such a plugin is, where its exact contract is written down for the build you are running in, and where to look when something does not take. The API is early access and moves between releases, so treat the generated declarations as the authority and this note as the map to them.

What a plugin of function hooks is

A plugin is a folder with a .claude-plugin/plugin.json manifest. Its function hooks live in one hooks module: a TypeScript or JavaScript file that hooks/hooks.json names under modules (one path, relative to that file), exporting register(on, options). on(event, matcher?, hook) adds a hook; options holds the values of the fields the manifest's userConfig declares. Every hook has the shape ($, e, next): $ is the engine interface (display, model, session, prompt, tools, filesystem, store, clock, network, host commands, settings, environment and the rest), e is the event's input as a plain value, and next(e) continues to the other plugins and then the engine's own behaviour, resolving to the event's result. A hook that returns without calling next answers for itself; one that calls next({ ...e, ... }) rewrites what the rest of the chain sees, within what that event allows. The module runs in an environment of its own, with no DOM and no Node: everything outside it is reached through $. JSX is available with h as the factory.

The events cover tool calls and their descriptions, the prompt as submitted, the system prompt's sections and the first message's context blocks, what the interface draws, the turn's start, steps and completion, the session's start and its inbound deliveries, skills, subagents and attribution text. Which of them a feature is, and what it needs from $, are the two questions worth settling before writing anything.

The types are the reference

Do not guess at an event's input, a method on $, or an element's props. Run /plugin-types in the session (it takes an optional directory and defaults to .claude/types). It writes two files from the running build: claude-code.d.ts, which declares the module claude-code (import types from it; at run time the import is empty), the globals a hooks module has, and the inputs of this build's built-in tools; and claude-code-mcp.d.ts, the inputs of the MCP tools connected right now, so e narrows per tool. The header of claude-code.d.ts carries a tsconfig.json that fits a hooks module and shows how to type register against Register.

Read the full file on GitHub · 126 lines

Files

What ships with it

2 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 · 126 lines · 83 tokens per session scan A a4884b9cb174

Subscribe to this mod's changes

plugin-authoring is a skill published in the GitHub repository asgeirtj/system_prompts_leaks (64,893 stars, last pushed 2d ago), licensed CC0-1.0. It adds 83 tokens to every session and 1,805 once invoked, about $0.0004 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-09-10.