.claudeignore
Status Fixed / completed
Maintainer reply ✓ Yes — rboyce-ant
Activity 5 comments · opened Mar 21, 2025 · closed Jun 2, 2025
💡 Likely answer: A maintainer (rboyce-ant, contributor)
responded on this thread — see the highlighted reply below.
Please add a feature that will allow for a .claudeignore file in the root. Just like other .ignore files, this would prevent claude from considering any of the files in the .claudeignore. For instance, if I have some deprecated features, I don't want Claude scanning those and cluttering the context. The same goes for package files that Claude might not otherwise know to ignore.
5 Comments
Great idea 👍 I think there should be a way to import from
.gitignoreas well.You can do this now with deny permission rules! https://docs.anthropic.com/en/docs/claude-code/settings#permissions
For example:
This is fantastic! Thank you to the maintainers for adding this feature. On Jun 2, 2025, at 4:48 PM, Robert Boyce @.*> wrote:rboyce-ant left a comment (anthropics/claude-code#579)
You can do this now with deny permission rules! https://docs.anthropic.com/en/docs/claude-code/settings#permissions
For example:
{
"permissions": {
"deny": [
"Read(deprecated_files/)"
]
}
}
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>
As described here, the above is insufficient as these secrets will be accessed in other way as soon as a
Readoperation is denied.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.