Who it is forA developer or CI maintainer calling Claude Code from a script where the inputs are already known.
The problemClaude Code searches the filesystem for CLAUDE.md, settings, and MCP configs before every run, which slows down scripted use.
The outcomeScripted runs start faster because they load only the config you pass in explicitly.
What you need first
- Claude Code installed and running in a terminal
- A project folder or git repository to work in
- Access to a Claude account that Claude Code can use
Steps
- Decide which system prompt, MCP config, and settings the script needs.
- Pass them explicitly with --system-prompt, --mcp-config, and --settings.
- Run
claude -p "summarize this codebase" --output-format=stream-json --verbose --barefrom your script. (inferred, check the README) - Check that the output stream arrives and that the run starts faster than before.
Prompt for your agent
In the repo at <repo-path>, run claude -p with --bare and explicit --system-prompt, --mcp-config, and --settings values to summarize <target-directory>. Expected output: a stream-json summary of the codebase. Verify that the command exits successfully and that no CLAUDE.md file was loaded by discovery.
Caveat. The README says the local file search default may change in a future version, so re-check the --bare behavior after updates.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for onmyway133/claude-code-tips-tricks and "Speed up Claude Code calls in scripts with --bare"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer