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.
Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/asgeirtj/system_prompts_leaksnpx agentmods add skills/asgeirtj/system_prompts_leaks/session-start-hookWrote 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.
[](https://agentmods.dev/skills/asgeirtj/system_prompts_leaks/session-start-hook)<a href="https://agentmods.dev/skills/asgeirtj/system_prompts_leaks/session-start-hook"><img src="https://agentmods.dev/badge/skills/asgeirtj/system_prompts_leaks/session-start-hook/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.
<a href="https://agentmods.dev/skills/asgeirtj/system_prompts_leaks/session-start-hook"><img src="https://agentmods.dev/badge/skills/asgeirtj/system_prompts_leaks/session-start-hook.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00052 | $0.01940 |
| Opus 5.5 | $0.00021 | $0.00776 |
| Sonnet 5.5 | $0.00010 | $0.00388 |
| Haiku 4.5 | $0.00005 | $0.00194 |
Grade B, and why
startup-hook-skill scanned grade B with 1 finding 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 15d 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.
Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
cat > .claude/hooks/session-start.sh << 'EOF' How it starts
The opening of the file, as written. The whole thing — 186 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Startup Hook Skill for Claude Code cloud sessions
Create SessionStart hooks that install dependencies so tests and linters work in Claude Code cloud sessions.
If the user asked to set up an environment rather than for a hook, stop here and commit nothing.
Use get_environment, then create_environment or update_environment as it says, if you have them.
Otherwise tell the user to set it up in the environment's settings.
Hook Basics
Input (via stdin)
{
"session_id": "abc123",
"source": "startup|resume|clear|compact",
"transcript_path": "/path/to/transcript.jsonl",
"permission_mode": "default",
"hook_event_name": "SessionStart",
"cwd": "/workspace/repo"
}
Async Mode
#!/bin/bash
set -euo pipefail
echo '{"async": true, "asyncTimeout": 300000}'
npm install
The hook runs in background while the session starts. Using async mode reduces latency, but introduces a race condition where the agent loop might depend on something that is being done in the startup hook before it completed.
Environment Variables
Available environment variables:
$CLAUDE_PROJECT_DIR- Repository root path$CLAUDE_ENV_FILE- Path to write environment variables$CLAUDE_CODE_REMOTE- If running in a remote environment (i.e. a Claude Code cloud session)
Use $CLAUDE_ENV_FILE to persist variables for the session:
echo 'export PYTHONPATH="."' >> "$CLAUDE_ENV_FILE"
Use $CLAUDE_CODE_REMOTE to only run a script in a remote env:
if [ "${CLAUDE_CODE_REMOTE:-}" != "true" ]; then
exit 0
fi
Workflow
Make a todo list for all the tasks in this workflow and work on them one after another
1. Analyze Dependencies
Find dependency manifests and analyze them. Examples:
package.json/package-lock.json→ npmpyproject.toml/requirements.txt→ pip/PoetryCargo.toml→ cargogo.mod→ goGemfile→ bundler
Additionally, read though any documentation (i.e. README.md or similar) to see if you can get additional context on how the environment setup works
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.
- 15d ago Changed · +32 lines a7ea9670135d
- 2mo ago First seen · 154 lines · 52 tokens per session scan B 7f4d1f07db82
startup-hook-skill is a skill published in the GitHub repository asgeirtj/system_prompts_leaks (73,683 stars, last pushed yesterday), licensed CC0-1.0. It adds 52 tokens to every session and 1,940 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-01.
startup-hook-skill compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| startup-hook-skillasgeirtj/system_prompts_leaks | Skill | 74k | yesterday | CC0-1.0 | B | 52 | Claude Code |
| mapsNousResearch/hermes-agent | Skill | 267k | today | MIT | A | 20 | Claude Code, Codex |
| imagegenopenai/codex | Skill | 137k | today | Apache-2.0 | A | 113 | Codex |
| playwright-climicrosoft/playwright | Skill | 101k | today | Apache-2.0 | A | 19 | Claude Code |
| browser-automationopenclaw/openclaw | Skill | 395k | today | MIT | A | 36 | Claude Code |
| systematic-debuggingobra/superpowers | Skill | 330k | 2d ago | MIT | A | 21 | Claude Code |
| free-llm-apismnfst/awesome-free-llm-apis | Skill | 14k | today | CC0-1.0 | A | 113 | Claude Code, Codex |