[FEATURE] Add a --append-system-prompt-file <path> argument
Status Closed — not planned
Maintainer reply None cached
Workaround ✓ Mentioned in thread ↓
Activity 13 comments · opened Aug 20, 2025 · closed Feb 27, 2026
I'm currently using:
claude --append-system-prompt "$(cat ROLE.md)" --permission-mode acceptEdits "Read the @SPEC.md file and start implementing the solution"
My role file is typically 30 to 200 lines of content.
The above command works but is not ideal. This is a feature request.
By adding a --append-system-prompt-file <path> argument, the command would become:
claude --append-system-prompt-file ROLE.md --permission-mode acceptEdits "Read the @SPEC.md file and start implementing the solution"
13 Comments
Hey, that's a great suggestion. A dedicated
--append-system-prompt-fileflag would be a really clean addition, much like how other CLI tools use@filenamefor inputs. I can see how that would make scripting with Claude Code much tidier.While we wait to see if the team implements that, I've found a couple of workarounds in the documentation that might achieve a similar result and could be even better for your workflow.
Option 1: Use the
CLAUDE.mdMemory FeatureThis is probably the closest to what you want. Claude Code automatically loads instructions from a
CLAUDE.mdfile in your project directory.Instead of passing the role on the command line, you can tell Claude to just import your
ROLE.mdfile as part of its permanent memory for this project.CLAUDE.mdin your project's root directory.``
markdown
``# My Role
Please follow the instructions outlined in @ROLE.md
Now, Claude will automatically load your
ROLE.mdfile into its context every time you run it in this project. Your command becomes much simpler:The
--append-system-promptpart is no longer needed because it's handled automatically by the memory system. This is great because you don't have to remember to add it for every command.(Reference: I found this in the "CLAUDE.md imports" section of the Manage Claude's memory docs).
Option 2: Create a Custom Slash Command
If this is a command you run often, you could wrap the entire thing into a custom slash command. This is more for interactive use but can be super powerful.
.claude/commands/implement.md.ROLE.mdinto it, followed by your prompt. You can use$ARGUMENTSto pass in the spec file dynamically..claude/commands/implement.md:
```markdown
---
description: "Implements a spec file based on our standard role."
argument-hint: "<path_to_spec_file>"
---
[... paste the full 30-200 lines from your ROLE.md file here ...]
---
Okay, now with those instructions in mind, read the @$ARGUMENTS file and start implementing the solution.
```
claudesession, you can just run:``
``> /implement SPEC.md
This encapsulates the whole workflow into a reusable command. It's a bit different from your non-interactive script but might be useful for other situations.
(Reference: I pulled this from the Custom slash commands docs).
---
Hope one of those helps streamline your process! I still think your original feature request for
--append-system-prompt-fileis a good one for scripting use cases.P.S. I was digging around, and it looks like the Python SDK has an option for this (
add --system-prompt-file), so the concept definitely exists in the ecosystem. It would be great to see it in the CLI too.@coygeek Memory != System Prompt
Consider the following:
CLAUDE.md@importsp.s. Your account indicates <ins>48 feature requests</ins> in <ins>8 days</ins> against this repository. That could be considered beyond excessive, so perhaps keep that in mind, especially for the sake of the maintainers.
A CLAUDE.md file is a memory configuration file for Claude Code that persists project-specific instructions and preferences across sessions. It's not exactly a
system prompt, but serves a similar purpose in a more flexible way.
Did I say that the OP wasn't familiar or insult the OP's knowledge?
Did I imply that this workflow is the only solution?
Appreciate your contributions.
@grantcarthew, the
--append-system-prompt-fileis available starting from Claude Code v2.0.34.This is great news, thanks.
Although, it's not in the help:
Actually, the help lacks many things, but it doesn't prevent us from using "undocumented" features 🙂
Hi @alex-feel, 👋
OT but do you happen to know any place where I can look up all those undocumented features?
haha, I was already think about this @aofei
Clone the repo, launch Claude Code, tell it to find all the undocumented stupidity that customers should not have to go hunting for, raise a pull request to this repo.
Do you guys use AI?
I finally did the above. I cloned this repo, got Claude Code to analyse it, and this is not the source code.
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
I think the issue should remain open as it still would be useful if this flag was documented in
claude --help!Closing for now — inactive for too long. Please open a new issue if this is still relevant.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.