Tooluck logoTooluck
SKILL.md

agentwhy-session-audit

Agent skill fromdavepoon/buildwithclaude

Checks which private files (.env, keys, secrets) Claude Code and its subagents reached in this project, whether a value came into an agent's context, and which key to change, by running the open source agentwhy CLI over the session records Claude Code already keeps on disk. Use when the user asks whether the agent or a subagent read their .env or other secrets, which private files a session touched, whether a key leaked into the conversation, or which key to rotate. Runs locally and never prints a secret value.

How to install agentwhy-session-audit

install agentwhy-session-audit
# install the buildwithclaude pack with the skills CLI
npx skills add davepoon/buildwithclaude

# or add only this skill to Claude Code: copy the folder

plugins/all-skills/skills/agentwhy-session-audit/

# into

~/.claude/skills/agentwhy-session-audit/ (all projects)

.claude/skills/agentwhy-session-audit/ (one project)

plugins/all-skills/skills/agentwhy-session-audit/SKILL.md

MITFull file
1# agentwhy session audit
2
3[agentwhy](https://github.com/karolkozer/agentwhy) (Apache 2.0, npm `@agentwhy/cli`) reads the session records Claude
4Code keeps on disk, including each subagent's own transcript, and says which private files were reached and how. It
5works by fixed rules: no AI model, no account, no network request once the package is installed. Values are replaced
6before the report is built, so its output names files, never their contents. It needs Node 22 or later.
7
8By default it treats these as private: `.env*`, `*.env`, `.npmrc`, `secrets/`, `.ssh/`, `id_rsa*`.
9
10Run every command below from the folder Claude Code was started in, the project root. If `command -v agentwhy` finds
11it installed, use `agentwhy` in place of `npx -y @agentwhy/cli@0.4.1`. The first `npx` run downloads that pinned
12version from npm; agentwhy never updates itself.
13
14Which command to run depends on what the user asked:
15
16- A question ("did an agent read my .env?", "which key do I change?", "did anything leak?"): run `check` (section 1)
17 and answer it here.
18- A request for the report ("show me the report", "open agentwhy", "what happened session by session"), or a
19 question about Codex sessions: open the page (section 2).
20
21If either command answers that no sessions are stored for this directory, the user is in a different folder from the
22one they worked in. Ask which folder it was and run it there.
23
24## 1. Answer a question: the short check
25
26```bash
27npx -y @agentwhy/cli@0.4.1 check
28```
29…

Excerpt shown under the repository's MIT license.

More skills in buildwithclaude

Keep exploring

Similar skill repositories

thedotmack /

claude-mem
116k

Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More

CCCXGHGM+135 skills

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates