{"slug": "claude-shortcuts", "title": "Claude Shortcuts !", "summary": "An engineer compiled a cheat sheet of Claude Code CLI flags, covering automation, permissions, cost control, workspace management, session handling, and prompt customization. The flags enable non-interactive scripting, strict output validation, tool permissions, financial circuit breakers, and session forking.", "body_md": "##\n🚀 Automation & Scripting\n\n- -p / --print: Non-interactive mode. Runs a query, outputs the result to stdout, and terminates immediately (essential for CI/CD).\n- --output-format : Formats Claude's responses, enabling structured JSON parsing using tools like jq.\n- --json-schema : Strict output validation. Compels Claude to respond using a specific, predefined JSON structure (only works with -p).\n- --bare: Minimal start mode. Bypasses MCP servers, plugins, hooks, and CLAUDE.md to optimize launch times for scripting tasks. [4, 5, 6, 7, 8]\n\n##\n🔒 Permissions & Security\n\n- --permission-mode : Sets the target initial session layer (default, plan, acceptEdits, bypassPermissions).\n- --allowedTools / --allowed-tools: Declares specific tools (like Read or Bash) that Claude can run automatically without prompting for manual approval.\n- --disallowedTools: Completely strips specified tools out of Claude's runtime environment.\n- --dangerously-skip-permissions: Completely turns off all confirmation prompts for tool executions. [4, 5, 9, 10]\n\n##\n⏱️ Cost Control & Safety Caps\n\n- --max-turns : Defines an upper ceiling for multi-step agentic execution loops to prevent runaway token spend.\n- --max-budget-usd : Sets a strict financial circuit breaker by capping the session's overall API dollar cost. [3, 5, 6, 11]\n\n##\n📁 Workspace & Context\n\n- --add-dir : Integrates secondary directories into Claude’s execution space so it can read and update external code.\n- -w / --worktree: Instructs Claude to open and execute inside an isolated git worktree, keeping your main branch clean. [4, 6, 9, 12]\n\n##\n💬 Session Management\n\n- -c / --continue: Picks up right where you left off in the directory's most recent conversation thread.\n- -r / --resume : Re-opens an exact target historic thread using its specific Session UUID or name.\n- --fork-session: Branches an active historical context into a fresh, distinct session ID without altering your past logs. [5, 7, 13]\n\n##\n📝 Prompt Customization\n\n- --system-prompt : Fully replaces Claude Code's stock system rules with your own string.\n- --append-system-prompt : Appends specialized custom formatting or architecture constraints seamlessly onto the existing system instructions. [5, 7]\n\n[1] [https://x.com](https://x.com/_avichawla/status/2073327425711460834)\n\n[2] [https://shipyard.build](https://shipyard.build/blog/claude-code-cheat-sheet/)\n\n[3] [https://www.linkedin.com](https://www.linkedin.com/posts/vamsipenmetsa_claude-code-has-20-cli-flags-most-engineers-activity-7477298683571728384-Albo)\n\n[4] [https://code.claude.com](https://code.claude.com/docs/en/cli-reference)\n\n[5] [https://github.com](https://github.com/shanraisshan/claude-code-best-practice/blob/main/best-practice/claude-cli-startup-flags.md)\n\n[6] [https://www.gravitee.io](https://www.gravitee.io/blog/claude-code-cli-documentation-commands-flags-and-governance)\n\n[7] [https://www.mager.co](https://www.mager.co/blog/2026-04-20-claude-code-cli-flags/)\n\n[8] [https://codingnomads.com](https://codingnomads.com/claude-code-cli-commands-flags-reference)\n\n[9] [https://phosailabs.com](https://phosailabs.com/blog/claude-code-cli-commands-guide)\n\n[10] [https://www.gravitee.io](https://www.gravitee.io/blog/claude-code-cli-documentation-commands-flags-and-governance)\n\n[11] [https://codingnomads.com](https://codingnomads.com/claude-code-cli-commands-flags-reference)\n\n[12] [https://timdietrich.me](https://timdietrich.me/blog/claude-code-commands-guide/)\n\n[13] [https://github.com](https://github.com/shanraisshan/claude-code-best-practice/blob/main/best-practice/claude-cli-startup-flags.md)", "url": "https://wpnews.pro/news/claude-shortcuts", "canonical_source": "https://dev.to/hiteshchawla/claude-shortcuts--59n", "published_at": "2026-07-12 14:40:47+00:00", "updated_at": "2026-07-12 14:45:20.504249+00:00", "lang": "en", "topics": ["developer-tools", "ai-tools", "large-language-models", "ai-agents", "ai-infrastructure"], "entities": ["Claude Code", "Anthropic"], "alternates": {"html": "https://wpnews.pro/news/claude-shortcuts", "markdown": "https://wpnews.pro/news/claude-shortcuts.md", "text": "https://wpnews.pro/news/claude-shortcuts.txt", "jsonld": "https://wpnews.pro/news/claude-shortcuts.jsonld"}}