pentest-exit

pentest-exit is a command for Claude Code from Stickman230/claude-pentest. It costs 26 tokens per session (945 once invoked), scanned A, original, MIT.

A command for closing a penetration-testing session, an authorized security assessment. It reviews documented findings, checks that reports and outputs are saved, summarizes the engagement, and asks whether the session should be cleared.

In plain words
What is it for?
Use it at the end of a security assessment to review findings, locate reports, save the session summary, and close the testing workspace.
Why use it?
It provides a final review step so recorded findings are not skipped even when output folders are empty. It also helps finish the session with the correct engagement records.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the AskUserQuestion tool.

Part of the pentest plugin — 7 skills, 5 commands, 15 agents shipped together

Good fit Use it at the end of a security assessment to review findings, locate reports, save the session summary, and close the testing workspace.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/stickman230/claude-pentest/pentest-exit
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.

Clone the repo
git clone --depth 1 https://github.com/Stickman230/claude-pentest

Made for: Claude Code.

Or install pentest, the plugin that ships this one along with the rest of its 7 skills, 5 commands, 15 agents.

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 pentest-exit

README.md
[![agentmods](https://agentmods.dev/badge/commands/stickman230/claude-pentest/pentest-exit/github.svg)](https://agentmods.dev/commands/stickman230/claude-pentest/pentest-exit)
Your own site
<a href="https://agentmods.dev/commands/stickman230/claude-pentest/pentest-exit"><img src="https://agentmods.dev/badge/commands/stickman230/claude-pentest/pentest-exit/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 pentest-exit

Your own site · 80×15
<a href="https://agentmods.dev/commands/stickman230/claude-pentest/pentest-exit"><img src="https://agentmods.dev/badge/commands/stickman230/claude-pentest/pentest-exit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 26 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 945 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.00026 $0.00945
Opus 5 $0.00013 $0.00473
Sonnet 5 $0.00005 $0.00189
Haiku 4.5 $0.00003 $0.00094

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

Security

Grade A, and why

pentest-exit 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 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.

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.

plugins/pentest/commands/pentest-exit.md · 110 lines

How it starts

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

Output the following closing banner verbatim:

============================================================
[PENTEST SESSION CLOSING]
============================================================

Step 1 — Identify Engagement

Use AskUserQuestion to ask:

"What is the engagement name for this session? (the name used in outputs/{name}/ — check your engagement summary or activity logs)"

Store the answer as {engagement_name}.

Step 2 — Findings Review

You MUST complete this step before outputting the session summary. Do not skip it even if the engagement folder appears empty.

First, try Schema A paths: Read all files matching: outputs/{engagement_name}/findings/finding-*/description.md Also read outputs/{engagement_name}/pentest-report.json if it exists.

If outputs/{engagement_name}/findings/ is empty or does not exist, try Schema B paths: Read all files matching: outputs/{engagement_name}/processed/findings/finding-*/description.md Also read outputs/{engagement_name}/report/pentest-report.json if it exists.

Use the schema that produced findings. If both are empty, record: "No findings documented in outputs/{engagement_name}/"

From the files found:

  • Count findings by severity: Critical, High, Medium, Low, Info
  • Note the title or one-line description of each finding

Step 3 — Notes Flush

You MUST complete this step before outputting the session summary. Do not skip it.

Check whether any findings or notes are held in the current conversation context but NOT yet written to disk. This includes:

  • Any finding analysis discussed but not saved
  • Any vulnerability details drafted in conversation but without a corresponding description.md
  • Any activity summaries not yet appended to logs

If any such in-progress work exists, write it to disk now:

  • Findings go to: outputs/{engagement_name}/findings/finding-{NNN}/description.md (where NNN is the next sequential number)
  • Activity logs go to: outputs/{engagement_name}/activity/
  • Final report (if complete) goes to: outputs/{engagement_name}/pentest-report.json

Read the full file on GitHub · 110 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 · 110 lines · 26 tokens per session scan A 7e7675eb997b

Subscribe to this mod's changes

pentest-exit is a command published in the GitHub repository Stickman230/claude-pentest (100 stars, last pushed 3mo ago), licensed MIT. It adds 26 tokens to every session and 945 once invoked, about $0.0001 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-08-30.