Claude Code: Optimal CLI Flags for Package Exploration
What It Does
Configures Claude Code CLI with optimal flags for Python package exploration and API probing, focusing on context efficiency and workspace isolation.
Recommended Startup Command
claude --dangerously-skip-permissions --disallowed-tools "mcp__*" --add-dir /tmp --continue
Why Each Flag Matters
--disallowed-tools "mcp__*"
Problem: MCP tools often consume significant header context, even when unused.
Solution: Explicitly disable MCP tools to prevent accidental context burn.
Benefit: Saves context tokens for actual work, prevents forgetting to shut down unused MCP servers.
--add-dir /tmp
Problem: Without explicitly adding /tmp, Claude Code bounces back to the main workspace directory when working in temporary folders.
Solution: Pre-authorize /tmp as an additional working directory.
Benefits:
- Smooth experimentation outside main workspace
- No constant directory bouncing
- Isolated probing environment
- Work stays in temporary directory as intended
--continue
Problem: Sessions don't survive terminal restarts or system reboots.
Solution: Enable session persistence and auto-resume.
Best With:
- Tmux (terminal multiplexer)
- Zellij (GUI terminal with better session management)
Benefit: Resume work exactly where you left off, even after hard reboot or shutdown.
Footer Prompt Strategy
Use this footer/header prompt for accelerated package exploration:
API Probing: Accelerated package API probe: initial discovery, then phased spawning multiple uv CLI subagents sub-tasks, no files in tmp/probe/[package_name]/ using UVX or UV
Why This Works
Subagent Spawning:
- Saves token burn in main context window
- Each subagent handles discrete probing tasks
- More room in main session for insights after probing completes
uv/uvx Usage:
- Faster than pip for package operations
- Ephemeral environments (
uvx) perfect for probing
- No permanent installation overhead
Workspace Isolation:
- All probe files stay in
/tmp/probe/[package_name]/
- No pollution of main workspace
- No Git tracking of experimental files
- Easy cleanup after probing
Workflow Benefits
- Context Efficiency: Subagents isolate token usage from main session
- Speed:
uv performs package operations faster than traditional tools
- Cleanliness: Fake data and test routines stay in
/tmp, not workspace
- Insights Only: Extract knowledge without keeping experimental artifacts
Complete Workflow Example
# 1. Start optimized session
claude --dangerously-skip-permissions --disallowed-tools "mcp__*" --add-dir /tmp --continue
# 2. Session auto-includes footer prompt for API probing
# 3. Work happens in /tmp/probe/[package]/
# - Multiple subagents spawned via Task tool
# - Each probes different aspects of package API
# - uv handles fast package installation/testing
# 4. Main session receives insights
# - Subagents report findings
# - Token usage isolated from main context
# - Experimental files stay in /tmp
# 5. After reboot/shutdown
# - tmux/zellij preserves session
# - --continue flag auto-resumes
# - Work state fully recovered
Key Principles
- Context preservation: Disable unused tools (MCP), offload work to subagents
- Workspace isolation:
/tmp for experiments, main workspace stays clean
- Session persistence:
--continue + terminal multiplexer = bulletproof sessions
- Speed:
uv for all Python package operations
Use Case: Python package exploration, API discovery, ephemeral testing
Prevents: Context burn, workspace pollution, session loss, directory bouncing
Claude Code: Optimal CLI Flags for Package Exploration
What It Does
Configures Claude Code CLI with optimal flags for Python package exploration and API probing, focusing on context efficiency and workspace isolation.
Recommended Startup Command
claude --dangerously-skip-permissions --disallowed-tools "mcp__*" --add-dir /tmp --continueWhy Each Flag Matters
--disallowed-tools "mcp__*"Problem: MCP tools often consume significant header context, even when unused.
Solution: Explicitly disable MCP tools to prevent accidental context burn.
Benefit: Saves context tokens for actual work, prevents forgetting to shut down unused MCP servers.
--add-dir /tmpProblem: Without explicitly adding
/tmp, Claude Code bounces back to the main workspace directory when working in temporary folders.Solution: Pre-authorize
/tmpas an additional working directory.Benefits:
--continueProblem: Sessions don't survive terminal restarts or system reboots.
Solution: Enable session persistence and auto-resume.
Best With:
Benefit: Resume work exactly where you left off, even after hard reboot or shutdown.
Footer Prompt Strategy
Use this footer/header prompt for accelerated package exploration:
Why This Works
Subagent Spawning:
uv/uvx Usage:
uvx) perfect for probingWorkspace Isolation:
/tmp/probe/[package_name]/Workflow Benefits
uvperforms package operations faster than traditional tools/tmp, not workspaceComplete Workflow Example
Key Principles
/tmpfor experiments, main workspace stays clean--continue+ terminal multiplexer = bulletproof sessionsuvfor all Python package operationsUse Case: Python package exploration, API discovery, ephemeral testing
Prevents: Context burn, workspace pollution, session loss, directory bouncing