From f8ae36275df9e8f0ecd6fa72b2f2e174c29cb21f Mon Sep 17 00:00:00 2001 From: Jeroen Schweitzer Date: Thu, 19 Feb 2026 12:17:34 +0100 Subject: [PATCH] chore(config): add .tmp/ repo directory for agent temp files Gitignored .tmp/ avoids Bash permission prompts when writing temp files for tea comment posting. Added sed -n blanket permission. Updated review-pr skill to use Write tool into .tmp/ instead of Bash heredocs to /tmp/. Co-Authored-By: Claude Opus 4.6 --- .claude/settings.json | 1 + .claude/skills/review-pr/SKILL.md | 15 ++++++--------- .gitignore | 1 + 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.claude/settings.json b/.claude/settings.json index 8cacc72e8..754586f82 100644 --- a/.claude/settings.json +++ b/.claude/settings.json @@ -50,6 +50,7 @@ "Bash(find *)", "Bash(list *)", "Bash(tree *)", + "Bash(sed -n *)", "Skill(commit)", "Skill(worktree-update)", diff --git a/.claude/skills/review-pr/SKILL.md b/.claude/skills/review-pr/SKILL.md index aac3b4859..abcc37882 100644 --- a/.claude/skills/review-pr/SKILL.md +++ b/.claude/skills/review-pr/SKILL.md @@ -156,19 +156,16 @@ Note: `tea pr reject` does not work on your own PRs. Use `tea comment` instead. **IMPORTANT — `tea comment` hangs with inline heredocs and multi-line strings.** Always use a two-step approach: write to a temp file first, then pass via `$(cat)`: -```bash -# Step 1: Write review to temp file (use Bash heredoc, NOT the Write tool) -cat > /tmp/review-.md << 'EOF' -## Review: -> main -...review content... -EOF +``` +# Step 1: Write review to .tmp/ using the Write tool (no permission prompt) +Write(file_path: "/.tmp/review-.md", content: "...review content...") # Step 2: Post to Gitea (separate Bash call) -tea comment --login schweitz --repo jpmschweitzer/settled-reach "$(cat /tmp/review-.md)" +tea comment --login schweitz --repo jpmschweitzer/settled-reach "$(cat .tmp/review-.md)" ``` -These MUST be separate sequential Bash calls — do not chain them in a single -command. The heredoc write must complete before `tea comment` reads the file. +Use the Write tool for step 1 (avoids Bash permission prompts). The `.tmp/` +directory is gitignored and exists in the repo root for this purpose. ## 7. Merging approved PRs diff --git a/.gitignore b/.gitignore index ae1470453..cbc8bc4d1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ # Build and cache .cache/ +.tmp/ server/target/ tooling/content-converter/target/ tooling/line-previewer/target/