DEV Community

Hitesh
Hitesh

Posted on

Claude Shortcuts !

πŸš€ Automation & Scripting

  • -p / --print: Non-interactive mode. Runs a query, outputs the result to stdout, and terminates immediately (essential for CI/CD).
  • --output-format : Formats Claude's responses, enabling structured JSON parsing using tools like jq.
  • --json-schema : Strict output validation. Compels Claude to respond using a specific, predefined JSON structure (only works with -p).
  • --bare: Minimal start mode. Bypasses MCP servers, plugins, hooks, and CLAUDE.md to optimize launch times for scripting tasks. [4, 5, 6, 7, 8]

πŸ”’ Permissions & Security

  • --permission-mode : Sets the target initial session layer (default, plan, acceptEdits, bypassPermissions).
  • --allowedTools / --allowed-tools: Declares specific tools (like Read or Bash) that Claude can run automatically without prompting for manual approval.
  • --disallowedTools: Completely strips specified tools out of Claude's runtime environment.
  • --dangerously-skip-permissions: Completely turns off all confirmation prompts for tool executions. [4, 5, 9, 10]

⏱️ Cost Control & Safety Caps

  • --max-turns : Defines an upper ceiling for multi-step agentic execution loops to prevent runaway token spend.
  • --max-budget-usd : Sets a strict financial circuit breaker by capping the session's overall API dollar cost. [3, 5, 6, 11]

πŸ“ Workspace & Context

  • --add-dir : Integrates secondary directories into Claude’s execution space so it can read and update external code.
  • -w / --worktree: Instructs Claude to open and execute inside an isolated git worktree, keeping your main branch clean. [4, 6, 9, 12]

πŸ’¬ Session Management

  • -c / --continue: Picks up right where you left off in the directory's most recent conversation thread.
  • -r / --resume : Re-opens an exact target historic thread using its specific Session UUID or name.
  • --fork-session: Branches an active historical context into a fresh, distinct session ID without altering your past logs. [5, 7, 13]

πŸ“ Prompt Customization

  • --system-prompt : Fully replaces Claude Code's stock system rules with your own string.
  • --append-system-prompt : Appends specialized custom formatting or architecture constraints seamlessly onto the existing system instructions. [5, 7]

[1] https://x.com
[2] https://shipyard.build
[3] https://www.linkedin.com
[4] https://code.claude.com
[5] https://github.com
[6] https://www.gravitee.io
[7] https://www.mager.co
[8] https://codingnomads.com
[9] https://phosailabs.com
[10] https://www.gravitee.io
[11] https://codingnomads.com
[12] https://timdietrich.me
[13] https://github.com

Top comments (0)