Skip to content
dots
Esc
↑↓navigate↵open⌘Jpreview
On this page

Claude Code

Claude Code settings, hooks, plugins, slash commands, and skill links managed under ~/.claude.

Claude Code is Anthropic’s terminal coding agent. The repo manages its user-level settings, hook scripts, custom slash commands, and the skill links it loads. The claude binary itself is not installed by chezmoi.

Files

Source in repo Target Notes
dot_claude/settings.json ~/.claude/settings.json Plain file; in symlink mode the target is a symlink back into the repo
dot_claude/empty_CLAUDE.md ~/.claude/CLAUDE.md empty_ keeps the zero-byte file; no global memory instructions
dot_claude/hooks/executable_cmem-to-obsidian.py ~/.claude/hooks/cmem-to-obsidian.py Executable
dot_claude/hooks/executable_herdr-agent-state.sh ~/.claude/hooks/herdr-agent-state.sh Executable, generated by herdr
dot_claude/hooks/gitnexus/gitnexus-hook.cjs ~/.claude/hooks/gitnexus/gitnexus-hook.cjs Present but not wired in settings.json
dot_claude/commands/*.md ~/.claude/commands/*.md User slash commands
dot_claude/skills/symlink_* ~/.claude/skills/* Symlinks into ~/.agents/skills
dot_claude/skills/<dir>/ ~/.claude/skills/<dir>/ Claude-only skills kept as real directories

None of these are role-gated. Hook commands in settings.json use absolute /home/prad/... paths; on a machine with a different home directory, edit them after cloning.

settings.json

Model and UI

Key Value Effect
model fable Default model alias
tui fullscreen Full-screen terminal UI
agentPushNotifEnabled true Push notifications when the agent needs attention
skipDangerousModePermissionPrompt true No confirmation when starting in bypass-permissions mode
skipAutoPermissionPrompt true No confirmation when entering auto mode

No statusLine is configured; Claude Code uses its default status line.

Environment

env sets two variables for every session:

Variable Purpose
CLAUDE_CODE_DISABLE_AUTO_MEMORY Turns off Claude Code’s built-in auto memory. Session memory comes from the claude-mem plugin instead.
EDITOR Points the external editor at micro.

Permissions

  • defaultMode is auto, so sessions start in auto mode and the classifier approves routine actions.
  • The allow list pre-approves seven read-only tools from the codegraph MCP server: codegraph_search, codegraph_context, codegraph_callers, codegraph_callees, codegraph_impact, codegraph_node, and codegraph_status.
  • There is no deny or ask list.

autoMode.environment is a list of trust-boundary notes that auto mode reads when judging risk. It declares no org, cloud provider, secrets manager, or CI target. It names one private personal LeetCode repository as the trusted repo and treats routine work there as low risk. It marks .env* files as sensitive. Any host, namespace, or container with prod or production as a whole name segment counts as a sensitive remote target. IaC changes touching IAM, RBAC, networking, quota, and node pools count as protected.

Hooks

settings.json wires six hook commands:

Command What it does
pixtuoid-hook External binary that receives lifecycle events. Matcher .*.
~/.orca/agent-hooks/claude-hook.sh Orca’s agent hook. Runs through /bin/sh only if the file exists and is executable, so machines without Orca skip it silently.
atuin hook claude-code Records the agent’s Bash tool calls in atuin history. Matcher Bash.
python3 ~/.claude/hooks/cmem-to-obsidian.py Exports the session’s claude-mem learnings to Obsidian (below). 15 s timeout.
bash ~/.claude/hooks/herdr-agent-state.sh session Reports the session to herdr (below). 10 s timeout.
sh ~/skills/tldraw-offline/inject-server-context.sh SubagentStart Injects server context when the tldraw-offline subagent starts. The script lives outside this repo.

Event wiring:

Event pixtuoid orca atuin (Bash) Other
SessionStart yes herdr-agent-state session
UserPromptSubmit yes
PreToolUse yes yes yes
PermissionRequest yes
PostToolUse yes yes yes
PostToolUseFailure yes yes
Notification yes
SubagentStart yes tldraw-offline context (matcher tldraw-offline)
SubagentStop yes
Stop yes
StopFailure yes
SessionEnd yes cmem-to-obsidian

Plugins

enabledPlugins:

Plugin Marketplace State
caveman caveman enabled
claude-mem thedotmack enabled
context-mode context-mode enabled
context7 claude-plugins-official disabled
council council-of-high-intelligence enabled
exa claude-plugins-official enabled
frontend-design claude-plugins-official enabled
gopls-lsp claude-plugins-official enabled
gopls claude-code-lsps enabled
lua-lsp claude-plugins-official enabled
ponytail ponytail enabled
solidity-language-server claude-code-lsps enabled
understand-anything understand-anything enabled
vtsls claude-code-lsps enabled
yaml-lsp zircote-lsp enabled
diagram-design diagram-design enabled

The LSP plugins give the agent language-server diagnostics for Go, Lua, Solidity, TypeScript/JavaScript (vtsls), and YAML.

Marketplaces

extraKnownMarketplaces registers eleven plugin sources:

Name Source
caveman GitHub JuliusBrussee/caveman
claude-code-lsps GitHub Piebald-AI/claude-code-lsps
claude-plugins-official GitHub anthropics/claude-plugins-official
council-of-high-intelligence GitHub 0xNyk/council-of-high-intelligence
mempalace GitHub MemPalace/mempalace
omc git https://github.com/Yeachan-Heo/oh-my-claudecode.git
ponytail GitHub DietrichGebert/ponytail
thedotmack GitHub thedotmack/claude-mem
understand-anything GitHub Egonex-AI/Understand-Anything
zircote-lsp GitHub zircote/lsp-marketplace
diagram-design GitHub cathrynlavery/diagram-design

mempalace and omc are registered but no plugin from them is enabled. context-mode is enabled but its marketplace is not declared here; it comes from Claude Code’s own marketplace state.

Hook scripts

cmem-to-obsidian.py

A stdlib-only Python script run on SessionEnd. It reads the hook JSON from stdin and exports that session’s claude-mem observations to an Obsidian note. It fails soft: any error is logged and the script exits 0, so it never blocks the session.

  1. Opens the claude-mem SQLite database read-only (?mode=ro), so it never locks the live DB or its WAL.
  2. Maps the Claude Code session_id to claude-mem’s memory session via sdk_sessions.content_session_id, then loads that session’s observations and latest summary.
  3. Drops any observation containing <private>.
  4. Writes <vault>/<project>/<date> <project> <session-prefix>.md. The file name is keyed to the session, so re-runs overwrite the same note.
  5. Creates <vault>/<project>.md as a map-of-content note if it is missing, so the [[project]] wikilink resolves.

Note layout: frontmatter (date, project, session, source: claude-mem, tags claude-mem and project/<slug>), an abstract callout from the session summary, then sections by observation type. Each bullet links back to the claude-mem viewer at http://localhost:<port>/?observation=<id>.

Section Observation types
Decisions decision (rendered as note callouts)
Fixes & gotchas bugfix
Insights discovery, feature, change, refactor, plus any unmapped type
Variable Default
CLAUDE_MEM_DB ~/.claude-mem/claude-mem.db
CMEM_OBSIDIAN_DIR ~/Documents/Vault/90 - Archive/Learnings
CLAUDE_MEM_WORKER_PORT 37700

Log file: ~/.claude/hooks/cmem-to-obsidian.log.

herdr-agent-state.sh

Generated and versioned by herdr (integration id claude, version 7). The header says reinstalling herdr’s integration overwrites it, so put custom hooks in separate files. It runs on SessionStart with the session action and exits immediately for any other action.

It only acts inside a herdr pane: HERDR_ENV=1, HERDR_SOCKET_PATH, and HERDR_PANE_ID must be set, and python3 must be on PATH. It then sends one pane.report_agent_session request over herdr’s Unix socket with the pane id, the Claude session id, the transcript path, and the session start source. herdr uses this to link the pane to the agent session. Subagent events and SubagentStop are ignored, so a finished subagent cannot mark an idle pane as working again. Socket errors are swallowed and the script has a 0.5 s timeout.

gitnexus/gitnexus-hook.cjs

A Node PreToolUse handler that adds GitNexus code-graph context to searches. settings.json does not reference it, so it is inactive until you add a hook entry.

  • Runs only when .gitnexus exists in the working directory or one of its four nearest ancestors.
  • Pulls a search pattern from Grep (the pattern), Glob (the first identifier-like path segment), or Bash commands that call rg or grep (the first non-flag argument). Patterns under three characters are skipped.
  • Runs gitnexus augment <pattern>. It tries the bun global install at ~/.bun/install/global/node_modules/gitnexus first, then require.resolve, then npx -y gitnexus (8 s or 15 s timeout).
  • Returns the CLI’s stderr output as hookSpecificOutput.additionalContext.

Slash commands

dot_claude/commands/ becomes ~/.claude/commands/, one user-level slash command per file.

Command Arguments Purpose
/bd-drain optional priority filter (p0-p2), epic id, or dry-run Works through every open beads issue until all are closed with tests and builds passing. Records a green baseline first; dry-run prints the dependency-sorted plan and stops. Allowed tools: bd, git, go, pnpm, cargo, make, file tools, Task.
/cmem-to-beads none Pulls insight, decision, and gotcha learnings out of claude-mem and saves them as beads memories with bd remember. Actionable items are skipped.
/cmem-to-linear none Turns actionable claude-mem learnings (bugs, tech debt, follow-ups) into beads tasks, then pushes the new ones to Linear.
/create-task <task description or goal> Breaks a task into beads issues with dependencies, acceptance criteria, and priorities. The prompt includes live bd ready, in-progress, and recently-closed lists. Allowed tools: bd, git log, git status, rg, Task.
/rams optional file “Rams” accessibility (WCAG 2.1) and visual design review of a component file. Offers a project scan when no file is given.
/web-interface-guidelines <file-or-pattern> Reviews UI code against the Vercel Web Interface Guidelines: accessibility, focus, forms, animation, typography, and more.

Skills

~/.claude/skills/ holds two kinds of entries:

  • Symlinks (symlink_<name> in the source). Each file contains a relative target such as ../../.agents/skills/blume, so ~/.claude/skills/blume resolves to ~/.agents/skills/blume. The shared library is documented on the Skills page.
  • Real directories for Claude-only skills: absurd, agents-sdk, cloudflare, cloudflare-email-service, cloudflare-one, cloudflare-one-migrations, create-beads-orchestration, durable-objects, sandbox-sdk, todoist-cli, turnstile-spin, web-perf, workers-best-practices. See Claude-only skills.

Repo-local settings

This repo’s own .claude/settings.json applies only to Claude Code sessions opened inside the chezmoi source directory. chezmoi ignores dot-prefixed source entries, so it is never deployed. It runs bd prime on SessionStart and PreCompact, which reloads beads issue context at session start and before compaction.

Integrations

  • kitty tab bar shows a robot glyph for tabs running claude.
  • The fish ai picker launches claude --dangerously-skip-permissions; see fish.
  • The claude-mem plugin feeds both cmem-to-obsidian.py and the /cmem-to-* commands.

Was this page helpful?