Hook Development for Claude Code Plugins
anthropics/claude-plugins-official
Explains how to write Claude Code plugin hooks, both prompt-based checks and bash commands, for events such as PreToolUse, Stop and SessionStart.
Run a prompt or slash command on a recurring interval (e.g. An agent skill from asgeirtj/system_prompts_leaks.
The automated check flagged lines worth reading first. See the safety section below.
$ npx skills add asgeirtj/system_prompts_leaks --skill loop -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install asgeirtj/system_prompts_leaks loop --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/asgeirtj/system_prompts_leaks.git skills-src && mkdir -p .claude/skills && cp -r skills-src/Anthropic/claude-code/skills/loop .claude/skills/loop && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "loop" agent skill from https://github.com/asgeirtj/system_prompts_leaks/tree/main/Anthropic/claude-code/skills/loop into .claude/skills/loop/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "loop", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/asgeirtj/system_prompts_leaks/tree/main/Anthropic/claude-code/skills/loopType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add asgeirtj/system_prompts_leaks --skill loop -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install asgeirtj/system_prompts_leaks loop --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/asgeirtj/system_prompts_leaks.git skills-src && mkdir -p .agents/skills && cp -r skills-src/Anthropic/claude-code/skills/loop .agents/skills/loop && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "loop" agent skill from https://github.com/asgeirtj/system_prompts_leaks/tree/main/Anthropic/claude-code/skills/loop into .agents/skills/loop/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "loop", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add asgeirtj/system_prompts_leaks --skill loop -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install asgeirtj/system_prompts_leaks loop --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/asgeirtj/system_prompts_leaks.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/Anthropic/claude-code/skills/loop .cursor/skills/loop && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "loop" agent skill from https://github.com/asgeirtj/system_prompts_leaks/tree/main/Anthropic/claude-code/skills/loop into .cursor/skills/loop/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "loop", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/asgeirtj/system_prompts_leaks.git --path Anthropic/claude-code/skills/loop--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add asgeirtj/system_prompts_leaks --skill loop -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install asgeirtj/system_prompts_leaks loop --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/asgeirtj/system_prompts_leaks.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/Anthropic/claude-code/skills/loop .gemini/skills/loop && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "loop" agent skill from https://github.com/asgeirtj/system_prompts_leaks/tree/main/Anthropic/claude-code/skills/loop into .gemini/skills/loop/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "loop", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install asgeirtj/system_prompts_leaks loopInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add asgeirtj/system_prompts_leaks --skill loop -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/asgeirtj/system_prompts_leaks.git skills-src && mkdir -p .github/skills && cp -r skills-src/Anthropic/claude-code/skills/loop .github/skills/loop && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "loop" agent skill from https://github.com/asgeirtj/system_prompts_leaks/tree/main/Anthropic/claude-code/skills/loop into .github/skills/loop/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "loop", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add asgeirtj/system_prompts_leaks --skill loop -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install asgeirtj/system_prompts_leaks loop --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/asgeirtj/system_prompts_leaks.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/Anthropic/claude-code/skills/loop .opencode/skills/loop && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "loop" agent skill from https://github.com/asgeirtj/system_prompts_leaks/tree/main/Anthropic/claude-code/skills/loop into .opencode/skills/loop/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "loop", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
loopRun a prompt or slash command on a recurring interval (e.g. An agent skill from asgeirtj/system_prompts_leaks.
Loop is an agent skill from asgeirtj/system_prompts_leaks. Run a prompt or slash command on a recurring interval (e.g. /loop 5m /foo). Omit the interval to let the model self-pace.
Its SKILL.md is about 2.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `autonomous-interval.md` and `autonomous.md`).
It sits in Agent Workflows, covering Hooks and plugins. The repository describes itself as: Documented system prompts from Anthropic - Claude Fable 5.1, Opus 5.5, Claude Design, Claude Code. OpenAI - ChatGPT GPT-6-Astra, Codex. Google - Gemini 3.8 Flash, 3.1 Pro… The licence is CC0-1.0.
3 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit f015440. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md.
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Loop loads about 2.2k tokens when it runs. Until then it costs about 32 tokens; SKILL.md has 1,275 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found patterns that need a careful read before installing.
hat skill's instructions to completion. Do NOT tell the user to run /schedule themselves. **Then stop — do not continueAutomated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from asgeirtj/system_prompts_leaks at commit f015440, republished under its CC0-1.0 licence (© asgeirtj). 1,275 words, ~2,176 tokens.
.claude/skills/loop/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.Parse the input below into [interval] <prompt…> and schedule it.
^\d+[smhd]$ (e.g. 5m, 2h), that's the interval; the rest is the prompt.every <N><unit> or every <N> <unit-word> (e.g. every 20m, every 5 minutes, every 2 hours), extract that as the interval and strip it from the prompt. Only match when what follows "every" is a time expression — check every PR has no interval.If the resulting prompt is empty, show usage /loop [interval] <prompt> and stop.
Examples:
5m /babysit-prs → interval 5m, prompt /babysit-prs (rule 1)check the deploy every 20m → interval 20m, prompt check the deploy (rule 2)run tests every 5 minutes → interval 5m, prompt run tests (rule 2)check the deploy → no interval → dynamic mode, prompt check the deploy (rule 3)check every PR → no interval → dynamic mode, prompt check every PR (rule 3 — "every" not followed by time)5m → empty prompt → show usageBefore any scheduling step, check whether EITHER is true:
If either is true, call AskUserQuestion first:
question: "This loop stops when you close this session. Set it up as a cloud schedule instead so it keeps running?"header: "Schedule"options: [{label: "Cloud schedule (recommended)", description: "Runs in Anthropic's cloud even after you close this session"}, {label: "This session only", description: "Runs in this terminal until you exit"}]If they pick Cloud schedule: do NOT call CronCreate. Invoke the schedule skill directly via the Skill tool with args set to their original input verbatim (e.g. Skill({skill: "schedule", args: "every morning tell me a joke"})), then follow that skill's instructions to completion. Do NOT tell the user to run /schedule themselves. Then stop — do not continue to any section below (no CronCreate, no ScheduleWakeup, no "execute the prompt now").
If they pick This session only:
/loop with an explicit shorter interval (e.g. /loop 1h <prompt>) if they want a session loop. Then stop.If neither trigger condition was met: continue below.
Convert the interval to a cron expression:
| Interval pattern | Cron expression | Notes |
|---|---|---|
Nm where N ≤ 59 | */N * * * * | every N minutes |
Nm where N ≥ 60 | 0 */H * * * | round to hours (H = N/60, must divide 24) |
Nh where N ≤ 23 | 0 */N * * * | every N hours |
Nd | 0 0 */N * * | every N days at midnight local |
Ns | treat as ceil(N/60)m | cron minimum granularity is 1 minute |
If the interval doesn't cleanly divide its unit (e.g. 7m → */7 * * * * gives uneven gaps at :56→:00; 90m → 1.5h which cron can't express), pick the nearest clean interval and tell the user what you rounded to before scheduling.
Then:
cron (the expression above), prompt (the parsed prompt verbatim), recurring: true._Runs until you close this session · For durable cloud-based loops, use /schedule_. If the user already answered that question, omit this line.The user wants you to self-pace. Decide what makes the next iteration worth running — a passage of time, or an observable event.
timeout_ms: 1800000. Its events arrive as <task-notification> messages and wake this loop immediately — you do not wait for the ScheduleWakeup deadline. A monitor expires after at most 30 minutes and tells you; on later iterations call TaskList first and re-arm only if no monitor for it is still running.delaySeconds: with a Monitor armed this is the fallback heartbeat — how long to wait if no event fires (lean 1200–1800s; idle ticks more frequent than the task needs are pure overhead). Without a Monitor this is the cadence — pick based on what you observed. Read the tool's own description for cache-aware delay guidance.reason: one short sentence on why you picked that delay.prompt: the full original /loop input verbatim, prefixed with /loop so the next firing re-enters this skill and continues the loop. For example, if the user typed /loop check the deploy, pass /loop check the deploy as the prompt.noop: true if this tick changed nothing ("still waiting", "quiet hold"); false if it did something worth keeping. Consecutive noop: true ticks collapse in the terminal.<task-notification> rather than this prompt: handle the event in the context of the loop task, then make the same decision. If the loop should continue, write the same brief update as visible text, then call ScheduleWakeup again with the same prompt and the same 1200–1800s delaySeconds from the schedule step above (the Monitor remains the wake signal; the new wakeup is only the fallback heartbeat). If the event means the work is finished, stop (step 6).stop: true (no other fields) and TaskStop any Monitor you armed (use TaskList to find the task ID if it is no longer in context). Then write the loop's outcome for the user as ordinary visible response text — a stopped loop has no next tick to surface it. Stopping is the loop's normal ending — the user can restart it anytime with /loop. Before you stop, send a one-line outcome via PushNotification — the user may be away and waiting to hear it's done. Skip this if you're stopping because the user just told you to; they're already here.$ARGUMENTS
© asgeirtj, CC0-1.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 2 other files in Anthropic/claude-code/skills/loop of asgeirtj/system_prompts_leaks.
Open the folder on GitHubat commit f015440
Loop next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Loop this skillasgeirtj/system_prompts_leaks | 69k | — | ~2.2k | Automated safety check: Warn | CC0-1.0 | |
| Hook Development for Claude Code Pluginsanthropics/claude-plugins-official | 37k | 11 repos | ~4.1k | Automated safety check: Notes | Apache-2.0 | |
| Claude Code Agent Developmentanthropics/claude-plugins-official | 37k | 8 repos | ~2.8k | Automated safety check: Pass | Apache-2.0 | |
| Claude Code Skill Developer Guidediet103/claude-code-infrastructure-showcase | 10k | 10 repos | ~3.5k | Automated safety check: Pass | MIT | |
| Plugin Settings Patternanthropics/claude-plugins-official | 37k | 7 repos | ~3k | Automated safety check: Pass | Apache-2.0 | |
| MCP Integration for Pluginsanthropics/claude-plugins-official | 37k | 11 repos | ~3.1k | Automated safety check: Pass | Apache-2.0 |
anthropics/claude-plugins-official
Explains how to write Claude Code plugin hooks, both prompt-based checks and bash commands, for events such as PreToolUse, Stop and SessionStart.
anthropics/claude-plugins-official
Explains how to write agents for Claude Code plugins: the markdown file with YAML frontmatter, trigger descriptions, model and color settings, and system prompt design.
diet103/claude-code-infrastructure-showcase
A guide to creating and managing Claude Code skills with auto-activation: skill-rules.json triggers, hooks, enforcement levels, YAML frontmatter and progressive disclosure.
anthropics/claude-plugins-official
Shows how Claude Code plugins keep per-project settings and state in .claude/plugin-name.local.md files with YAML frontmatter and a markdown body.
anthropics/claude-plugins-official
Explains how to bundle Model Context Protocol servers in a Claude Code plugin, covering config files, stdio, SSE, HTTP and WebSocket server types, and authentication.
anthropics/claude-plugins-official
Explains how to write Claude Code slash commands: Markdown files with YAML frontmatter, arguments, file references, bash context and interactive prompts.
asgeirtj/system_prompts_leaks
Shows one digest of coding-agent sessions across your connected machines and lets you open, read, steer, approve, stop and close them, over Herdr, tmux or MSP.
asgeirtj/system_prompts_leaks
Diagnoses a Muse Code installation's own failures from binary and session evidence, instead of treating the report as an ordinary repository bug.
asgeirtj/system_prompts_leaks
Runs a goal as a project in which the agent coordinates separate agent threads, judging when to split the work, and interviews you first when nothing can be verified.
asgeirtj/system_prompts_leaks
Creates and validates a new native Muse plugin package in the current workspace, limited to five capability families, and leaves installation to you.
asgeirtj/system_prompts_leaks
Inspects Figma designs through the figma CLI and Figma's MCP server to read variants, spacing, tokens and layouts and to extract assets for implementation.
asgeirtj/system_prompts_leaks
Renders a calm, single-page HTML morning brief from your connected calendar, email and chat, or sets it up to run automatically on weekdays.
Categories
Run a prompt or slash command on a recurring interval (e.g. An agent skill from asgeirtj/system_prompts_leaks. Loop is an agent skill from asgeirtj/system_prompts_leaks.g.
Loop fits situations like: tasks that involve Hooks and plugins.
Run `npx skills add asgeirtj/system_prompts_leaks --skill loop -a claude-code`. Or copy the skill folder (Anthropic/claude-code/skills/loop in asgeirtj/system_prompts_leaks) into .claude/skills/loop in your project. Claude Code loads it when a task matches its description.
Run `npx skills add asgeirtj/system_prompts_leaks --skill loop -a codex`. Or copy the skill folder (Anthropic/claude-code/skills/loop in asgeirtj/system_prompts_leaks) into .agents/skills/loop in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add asgeirtj/system_prompts_leaks --skill loop -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/loop, .gemini/skills/loop, .github/skills/loop and .opencode/skills/loop in your project.
SKILL.md names no scripts, command-line tools or credentials: Loop is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md flagged 1 warning(s): contains instruction-override wording (e.g. “without asking the user”). Read the flagged lines before installing; the check is not a guarantee either way.
Loop is published under the CC0-1.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.2k tokens (SKILL.md is roughly 8.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Loop: Hook Development for Claude Code Plugins (anthropics/claude-plugins-official, 37k stars), Claude Code Agent Development (anthropics/claude-plugins-official, 37k stars), Claude Code Skill Developer Guide (diet103/claude-code-infrastructure-showcase, 10k stars) and Plugin Settings Pattern (anthropics/claude-plugins-official, 37k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
asgeirtj (a GitHub user) maintains it in asgeirtj/system_prompts_leaks, which has 69,041 GitHub stars. The repository holds 121 skills in this directory. The repository was last updated on October 6, 2026.
Source: asgeirtj/system_prompts_leaks on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.