usethis icon indicating copy to clipboard operation
usethis copied to clipboard

Helper for claude code settings

Open hadley opened this issue 1 month ago • 3 comments

i.e. create .claude/settings.json with this:

{
  "$schema": "https://json.schemastore.org/claude-code-settings.json",
  "permissions": {
    "allow": [
      "Bash(find:*)",
      "Bash(R:*)",
      "Bash(rm:*)",
      "Bash(air format:*)",
      "Edit(**)",
    ],
    "deny": []
  }
}

Rbuildignore:

  • .claude/

gitignore:

  • settings.local.json
  • .claude/plans/ (maybe, depending on whether we want to share team plans or not)

hadley avatar Nov 05 '25 13:11 hadley

  • This directory can also contain .claude/CLAUDE.md
  • We might want to exclude .Renviron by default: https://docs.claude.com/en/docs/claude-code/settings#excluding-sensitive-files (we don't use it, but others do. And whatever the dotenv package uses)
  • Rscript might be a better default
  • We might want to include .claude/skills/testing.md, .claude/skills/documentation.md, instead of putting those topics in CLAUDE.md

hadley avatar Nov 05 '25 14:11 hadley

I'm finding these additions to the allow permissions to be handy:

"WebFetch(domain:raw.githubusercontent.com)",
"WebFetch(domain:github.com)"

It helps with reading GitHub issues and files.

jennybc avatar Nov 05 '25 21:11 jennybc

It seems like CLAUDECODE=1 is set as an environment variable when Claude Code runs a process for you

DavisVaughan avatar Nov 14 '25 16:11 DavisVaughan