waku-agent: Skill for Claude Code

.claude/skills/pr-worktree/SKILL.md

pr-worktree is a skill for Claude Code from ShenSeanChen/waku-agent. It costs 56 tokens per session (1,070 once invoked), scanned C, original, MIT.

A guide for creating and removing temporary Git worktrees used to test community pull requests. A worktree is a separate checkout of the same repository.

In plain words
What is it for?
Use it to fetch a pull request into a throwaway checkout, link only the data or credentials the test needs, and clean up the worktree after the pull request is finished.
Why use it?
It keeps pull-request testing away from a live dashboard and helps prevent API keys from being copied into temporary folders.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is ShenSeanChen/waku-agent's own configuration. It tells Claude Code how to work on waku-agent itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything waku-agent configures →

About the project

Waku Agent is a local-first personal AI assistant whose readable code implements the agent loop, memory, and evaluation system. It is for people who want an assistant they can run and understand on their own laptop, with memory stored in SQLite and built-in testing. The catalogue add-ons support its agent workflow.

ShenSeanChen/waku-agent · 1,696 stars · on GitHub

Reuse

Borrowing it

Nothing to install: this file belongs to ShenSeanChen/waku-agent. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/ShenSeanChen/waku-agent/main/.claude/skills/pr-worktree/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/ShenSeanChen/waku-agent

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 pr-worktree

README.md
[![agentmods](https://agentmods.dev/badge/skills/shenseanchen/waku-agent/pr-worktree/github.svg)](https://agentmods.dev/skills/shenseanchen/waku-agent/pr-worktree)
Your own site
<a href="https://agentmods.dev/skills/shenseanchen/waku-agent/pr-worktree"><img src="https://agentmods.dev/badge/skills/shenseanchen/waku-agent/pr-worktree/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 pr-worktree

Your own site · 80×15
<a href="https://agentmods.dev/skills/shenseanchen/waku-agent/pr-worktree"><img src="https://agentmods.dev/badge/skills/shenseanchen/waku-agent/pr-worktree.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 56 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,070 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 5 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Privilege Escalation · line 34
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 50
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 82
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 90
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 98
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
How audits are shown
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.00056 $0.01070
Opus 5 $0.00028 $0.00535
Sonnet 5 $0.00011 $0.00214
Haiku 4.5 $0.00006 $0.00107

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

Security

Grade C, and why

pr-worktree scanned grade C 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 9d 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.

Enumerates the file system for secretshighData exfiltration

Searching home directories for .env, .ssh, .aws or credential files is reconnaissance for credential theft.

find ~/Developer/waku-prs -name ".env" 2>/dev/null
.claude/skills/pr-worktree/SKILL.md · 105 lines

How it starts

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

Throwaway worktrees for PR testing

Testing a contributor's PR must never disturb the live dashboard on 7777, and it must never leave a second copy of Sean's API keys on disk. Both have happened.

Setting one up

REPO=$(git rev-parse --show-toplevel)
N=<pr-number>
git -C $REPO fetch -q origin pull/$N/head:pr-$N
git -C $REPO worktree add -q ~/Developer/waku-prs/pr$N pr-$N
ln -sfn $REPO/.waku ~/Developer/waku-prs/pr$N/.waku   # real memory/traces/calendar

Never gh pr checkout — it switches the branch of the main working tree, and the live dashboard runs from there.

Only link .env when the test actually needs keys

Deterministic evals do not. Skip the symlink for a test-only pass, so untrusted contributor code never runs against real credentials. Link it only after you have read the diff:

ln -sfn $REPO/.env ~/Developer/waku-prs/pr$N/.env

The symlink trap (this cost us a full copy of every key)

python-dotenv's set_key — which the dashboard's Save & switch calls — replaces a symlinked .env with a regular file. The moment anyone saves a setting from a PR worktree's dashboard, that worktree gains a complete copy of every key in the real .env: Anthropic, OpenAI, Gemini, Moonshot, xAI, Zhipu, Tavily, Telegram, Discord.

So: after any test that saved settings, assume the .env is a real file and check before deleting the worktree, then move anything worth keeping into the main .env rather than losing it.

[ -L ~/Developer/waku-prs/pr$N/.env ] && echo "symlink (safe)" || echo "REAL FILE — copy of all keys"

New env vars a PR introduces belong in the main .env, not the worktree's. Copy the values across without printing them, and leave switches that would change what the live demo shows (e.g. WAKU_EPISODIC_STORE) on their old value — Sean films against the local data.

Running its dashboard

Always a second port, so 7777 stays untouched:

cd ~/Developer/waku-prs/pr$N
WAKU_DASHBOARD_PORT=7778 $REPO/.venv/bin/python -m waku.ops.dashboard

Read the full file on GitHub · 105 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. 9d ago First seen · 105 lines · 56 tokens per session scan C 17b37c91797c

Subscribe to this mod's changes

pr-worktree is a skill published in the GitHub repository ShenSeanChen/waku-agent (1,696 stars, last pushed 11d ago), licensed MIT. It adds 56 tokens to every session and 1,070 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it C with 1 finding (enumerates the file system for secrets). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.