File tree Expand file tree Collapse file tree
claude-code/.devcontainer Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ {
2+ "model" : " opus" ,
3+ "permissions" : {
4+ "allow" : [
5+ " Bash(bun:*)" ,
6+ " Bash(npx:*)" ,
7+ " Bash(git:*)" ,
8+ " Bash(mise:*)" ,
9+ " Bash(curl:*)" ,
10+ " Bash(ls:*)" ,
11+ " Bash(mkdir:*)" ,
12+ " Bash(cat:*)" ,
13+ " Bash(find:*)"
14+ ]
15+ },
16+ "attribution" : {
17+ "commit" : " " ,
18+ "pr" : " "
19+ }
20+ }
Original file line number Diff line number Diff line change @@ -44,9 +44,10 @@ for plugin in "${PLUGINS[@]}"; do
4444 }
4545done
4646
47- # Initialize rtk global hook for Claude Code (auto-rewrite mode)
47+ # Initialize rtk global hook for Claude Code (auto-rewrite mode).
48+ # --hook-only: installs only the PreToolUse rewrite hook, no workspace artifacts.
4849echo " Initializing rtk (token optimizer)..."
49- rtk init -g --auto-patch || {
50+ rtk init -g --hook-only -- auto-patch || {
5051 echo " Note: rtk init may have already been configured or rtk not available"
5152}
5253
Original file line number Diff line number Diff line change @@ -47,10 +47,10 @@ if [ "$(uname -m)" = "aarch64" ] && [ -f "$PLAYWRIGHT_MCP_CONFIG" ]; then
4747fi
4848
4949# ── rtk init (token-optimized CLI proxy) ────────────────────────────────────
50- # Configures rtk for the current workspace. Safe to run multiple times.
51- # rtk is pre-installed in the devcontainer image .
50+ # Global hook-first mode: installs only the PreToolUse rewrite hook to ~/.claude/,
51+ # no workspace artifacts (CLAUDE.md, .rtk/). Safe to run multiple times .
5252if command -v rtk & > /dev/null; then
53- rtk init 2> /dev/null || true
53+ rtk init -g --hook-only --auto-patch 2> /dev/null || true
5454fi
5555
5656# ── agent-browser skill ─────────────────────────────────────────────────────
Original file line number Diff line number Diff line change @@ -30,9 +30,9 @@ if [ -d /mnt/claude ]; then
3030
3131 # ── RTK: ensure rewrite hook is configured ─────────────────────────────
3232 # Host mount usually brings the hook, but init idempotently to cover
33- # standalone usage (no host mount). Runs as app user for correct paths .
33+ # standalone usage (no host mount). --hook-only avoids workspace artifacts .
3434 if command -v rtk > /dev/null 2>&1 ; then
35- gosu app rtk init -g --auto-patch 2> /dev/null || true
35+ gosu app rtk init -g --hook-only -- auto-patch 2> /dev/null || true
3636 fi
3737fi
3838
You can’t perform that action at this time.
0 commit comments