Export Claude Code's complete system prompt (all instructions, tool definitions, CLAUDE.md content, memory imports, and session context) to the console or a markdown file.
Exports Claude Code's complete system prompt including all instructions, tools, and session context.
/plugin marketplace add melodic-software/claude-code-plugins/plugin install claude-code-observability@melodic-softwareExport Claude Code's complete system prompt (all instructions, tool definitions, CLAUDE.md content, memory imports, and session context) to the console or a markdown file.
--output: Write to auto-generated path in .claude/temp/--output <path>: Write to specified path (.md extension added if missing)--output flag is present in $ARGUMENTS--output present, check if a path follows itconsole (no flag)file_auto (flag without path)file_custom (flag with path)Run: date -u +"%Y-%m-%dT%H:%M:%SZ" to get UTC timestamp for metadata.
The "system prompt" includes everything Claude sees as instructions at the start of each turn:
<system-reminder> tags)Important: Output the COMPLETE system prompt without truncation. This is the entire context Claude operates under.
Format as markdown with metadata header:
# System Prompt Export
**Exported:** {UTC timestamp}
**Working Directory:** {cwd from environment}
**Model:** {model name from system context}
---
## Complete System Prompt
{Everything from the system context - tools, instructions, CLAUDE.md, memory, hooks, etc.}
---
*Exported by `/claude-ecosystem:export-system-prompt`*
Console Mode (default):
Output the formatted markdown directly. The user will see the complete system prompt in the conversation.
File Mode (--output):
Determine output path:
.md if missing).claude/temp/YYYY-MM-DD_HHmmss-system-prompt-export.mdWrite formatted output to file using Write tool
Report success: Saved system prompt to: {path}
# System Prompt Export
**Exported:** {timestamp}
**Working Directory:** {cwd}
**Model:** {model}
---
## Complete System Prompt
### Tool Definitions
{List all available tools with their descriptions}
### System Instructions
{Base Claude Code instructions}
### Project Instructions (CLAUDE.md)
{Contents of CLAUDE.md and imported memory files}
### Session Context
{gitStatus, environment info, hook-injected reminders}
---
*Exported by `/claude-ecosystem:export-system-prompt`*
Before reporting completion, verify:
--output to save to a file.