Skip to content
Security
Command

/pentest-exit

Close pentest session — summarizes findings, ensures outputs are saved, lifts isolation, and prompts for /clear

From plugin
claude-pentest
1375 skills15 agents5 commands
> /plugin marketplace add Stickman230/claude-pentest
> /plugin install pentest@claude-pentest

Command definition

pentest-exit.md
name: pentest-exit
description: Close pentest session — summarizes findings, ensures outputs are saved, lifts isolation, and prompts for /clear
disable-model-invocation: true
allowed-tools:
  - AskUserQuestion
  - Read
  - Write

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`

If nothing is pending, continue to the next step.

Step 4 — Session Summary

After completing the findings review and notes flush, output the following block with real values substituted in:

============================================================
SESSION SUMMARY — {engagement_name}
============================================================
Target tested:   {target_from_report_or_logs}
Findings:        Critical: N | High: N | Medium: N | Low: N | Info: N
Top findings:    [list up to 3 highest-severity findings with one-line description each]
Outputs saved:   outputs/{engagement_name}/
============================================================

If `pentest-report.json` was found, use its data for the target and finding counts. If not, use whatever was found in the findings/ files. If nothing was found, set all counts to 0, set target to "unknown", and note "No findings documented."

Step 5 — Isolation Lift

Output the following instruction block verbatim:

============================================================
[PENTEST MODE — ISOLATION LIFTED]

The pentest session isolation constraint is now removed.
You may use agents and skills from all plugins again.
Normal operating mode restored.
============================================================

Step 6 — Scope and Attacks Reset

Try to Read `.pentest-scope.json`. If the file exists, write it back with the `"status"` field set to `"pending"` and all other fields unchanged. This marks the scope as no longer active so a future `/pentest:pentest` will ask whether to reuse it rather than assuming it is live.

Try to Read `.pentest-attacks.json`. If the file exists, write it back with the `"status"` field set to `"pending"` and all other fields unchanged. This marks the attack profile as no longer active so a future `/pentest:pentest` will ask whether to reuse it rather than assuming it is still valid.

Step 7 — Close Message

Output the following:

Pentest session closed. Engagement outputs remain in outputs/{engagement_name}/.

Run /clear to fully reset the context window and remove all session context (recommended before starting a new engagement or switching tasks).
Read more
@stickman230
Ships withclaude-pentest

An open source plugin for enabeling claude to gain offensive pentesting capabilities

1377 skills15 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
137
Star history of Stickman230/claude-pentest on GitHub, a chart by star-history.com

Other commands on claude-pentest.

pentest-attacks

pentest-attacks

Command

Define the attack profile for an engagement — select which attack categories and skills to use. Saves to .pentest-attacks.json.…

pentest-kali

pentest-kali

Command

Connect to a Metasploit-Kali Server (MKS) REST API — verifies connectivity, discovers available Kali tools, and configures agents…

pentest-scope

pentest-scope

Command

Define or update engagement scope — saves scope to disk without launching a pentest. Can be run before or during an engagement.…

pentest

pentest

Command

Activate pentest mode — displays ASCII art, configures session isolation, collects engagement scope, then OWNS the engagement:…

More commands from other plugins.

deslop-reborn

deslop-reborn

Command

One iteration of the IronClaw Reborn de-slop loop — take ONE Reborn crate, fan out parallel review sub-agents (thermo-nuclear…

@nearai@nearaiInstall Command
audit

audit

Command

Audit a file, directory, or whole repo for insecure default configuration: fallback secrets, default credentials, fail-open…

@trailofbits@trailofbitsInstall Command
arsenal

arsenal

Command

Show which external bug-bounty tools are installed on this machine and print install hints for the missing ones. Curated from…

@awarexone@awarexoneInstall Command