Skip to main content

Cyberstrike is now open source! AI-powered penetration testing for security professionals. Star on GitHub

Session Commands

Session commands help you manage conversation sessions, maintain context, and organize your security testing workflow.

🎬 GIF: session-commands.gif

Session management commands in action

Session Management

/clear

Clear the current conversation and start fresh.

/clear

Removes all messages from the current session while keeping the same session ID.

Info

Use /clear to reset context without losing your session history.

/compact

Summarize and compact the session to reduce context size.

/compact

Creates an AI-generated summary of the conversation, replacing detailed history with a condensed version.

When to use:

  • Session is getting long
  • Token usage is high
  • Context window approaching limits
  • Want to continue without losing key information

Example output:

Session compacted:
- Target: example.com
- Discovered: 3 subdomains, 15 open ports
- Findings: 2 SQL injection, 1 XSS
- Current task: Testing authentication

/share

Create a shareable link to the current session.

/share

Generates a URL that others can use to view your session.

Options:

/share --public # Anyone with link can view
/share --team # Team members only
/share --expires 24h # Link expires after time

Session History

/history

View session history.

/history

Lists recent sessions with timestamps and summaries.

Output:

Session History
━━━━━━━━━━━━━━━
1. [2025-01-15 10:30] Web app scan - example.com
2. [2025-01-14 15:45] Network recon - 192.168.1.0/24
3. [2025-01-14 09:00] Code review - auth module
4. [2025-01-13 14:20] Bug bounty - target.com

/resume

Resume a previous session.

/resume

Opens a session picker to continue a past conversation.

/resume 1 # Resume session by number
/resume abc123 # Resume by session ID

/sessions

List all saved sessions.

/sessions

Shows all sessions with filtering options:

/sessions --today
/sessions --week
/sessions --target "example.com"
/sessions --agent web-application

Context Management

/context

View current context information.

/context

Output:

Session Context
━━━━━━━━━━━━━━━
Working Directory: /home/user/projects/webapp
Target: example.com
Agent: web-application
Model: anthropic/claude-sonnet-4-20250514
Memory:
- 3 discovered subdomains
- 15 open ports identified
- 2 vulnerabilities found
Token Usage:
- Input: 45,230
- Output: 12,450
- Total: $0.42

/memory

Manage session memory.

/memory

Shows stored memories for the current context.

/memory add "Target uses PostgreSQL 14.2"
/memory list
/memory clear
/memory export

/cost

View token usage and costs.

/cost

Output:

Token Usage (Session)
━━━━━━━━━━━━━━━━━━━━━
Input Tokens: 45,230
Output Tokens: 12,450
Cache Hits: 32,100
Total Cost: $0.42
Breakdown:
- Recon phase: $0.15
- Scan phase: $0.20
- Report: $0.07

Export and Save

/export

Export session data.

/export

Options:

/export --format markdown # Export as Markdown
/export --format json # Export as JSON
/export --format html # Export as HTML
/export --file report.md # Save to file

Markdown export:

# Security Assessment: example.com
## Summary
- Date: 2025-01-15
- Duration: 2h 15m
- Findings: 3 high, 2 medium, 5 low
## Findings
### SQL Injection (High)
Location: /api/users
...

/save

Save the current session.

/save

Saves session to disk with automatic naming.

/save "example-com-scan" # Custom name

Session Configuration

/rename

Rename the current session.

/rename "Web App Security Scan - Example.com"

/tag

Add tags to the session.

/tag security webapp high-priority

View tags:

/tags

/note

Add a note to the session.

/note "Remember to test payment flow tomorrow"

Quick Actions

/undo

Undo the last message/action.

/undo

Reverts to the previous state, removing the last exchange.

/retry

Retry the last prompt with fresh generation.

/retry

Re-sends the previous prompt for a new response.

/continue

Continue from where the AI left off.

/continue

Useful when response was truncated or incomplete.

Session Templates

/template

Use or create session templates.

/template list
/template use webapp-scan
/template save my-template

Templates include:

  • Initial context
  • Agent selection
  • Permission settings
  • Memory presets

Examples

Starting a New Scan

/clear
/memory add "Target: example.com"
/memory add "Scope: *.example.com"
Let's begin reconnaissance on example.com

Mid-Session Management

/compact # If context is getting long
/save # Save progress
/cost # Check usage

Ending a Session

/export --format markdown --file report.md
/share --team
/save "completed-scan-example-com"

Tip

Use /compact regularly during long sessions to maintain performance and reduce costs.