refactor(claude-isolated-test): simplify to use packnplay CLI directly - #239
Conversation
Remove wrapper script and tmux integration. Simplify documentation to focus on packnplay CLI usage only. Co-Authored-By: Claude <noreply@anthropic.com>
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📝 WalkthroughWalkthroughThe pull request rewrites the SKILL.md documentation for the claude-isolated-test plugin, converting it from Korean-centric to English with modernized content structure, and completely removes the shell.sh orchestration script that previously managed tmux sessions and packnplay container operations. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Fix all issues with AI agents
In `@plugins/me/skills/claude-isolated-test/SKILL.md`:
- Around line 20-27: The markdown tables in SKILL.md use compact pipe syntax and
must have spaces around pipe characters to satisfy MD060; update both tables
(the one at lines ~20-27 and the one at ~85-88) so every cell separator has a
single space before and after each pipe (e.g., "| Install | `go install...` |"),
normalizing spacing consistently across headers and rows and ensuring no
trailing/leading extra spaces.
- Around line 10-16: The SKILL.md is missing the required sections: add a new
"Activation Guidelines" section after "When to Use" that lists context-aware
triggers, explicit non-goals, and when to NOT activate the skill (e.g.,
production data, persistent state changes), and add a "Best Practices" section
that covers domain-specific safe isolated testing rules (sandboxing notes,
resource/time limits, network port forwarding cautions, data handling and
cleanup, and concurrency limits); update the SKILL.md headings exactly (e.g.,
"Activation Guidelines" and "Best Practices") so automated validators and
readers can locate them alongside the existing "When to Use" content.
- Around line 1-89: The markdown tables in SKILL.md ("Quick Reference" and
"Troubleshooting") have separator rows without spaces around pipe characters
causing MD060; update the separator lines under the headers (the rows currently
like `|------|---------|` and `|-------|----------|`) to include spaces around
each pipe to match the header style (e.g., change to `| ------ | --------- |`
and `| ------- | ---------- |`) so the table column style is consistent with the
header rows.
| --- | ||
| name: isolated-test-guide | ||
| description: Docker 컨테이너에서 Claude Code를 대화형으로 테스트 | ||
| name: isolated-claude-testing | ||
| description: Use when needing to test Claude Code in an isolated Docker container, or when user asks about sandboxed, safe, or containerized Claude testing environment | ||
| --- | ||
|
|
||
| # Claude Isolated Test | ||
| # Isolated Claude Testing | ||
|
|
||
| packnplay를 사용하여 격리된 Docker 환경에서 Claude Code를 실행하고 테스트합니다. | ||
| Run Claude Code in isolated Docker containers using packnplay for safe testing. | ||
|
|
||
| ## 설치 | ||
| ## When to Use | ||
|
|
||
| ```bash | ||
| go install github.com/obra/packnplay@latest | ||
| ``` | ||
| - Isolated/sandboxed Claude Code testing | ||
| - Testing dangerous code changes | ||
| - Evaluating Claude performance in clean environments | ||
| - Port forwarding for web server testing | ||
| - Multiple concurrent test sessions | ||
|
|
||
| ## 빠른 시작 | ||
| ## Quick Reference | ||
|
|
||
| ```bash | ||
| # 현재 디렉토리에서 Claude Code 실행 | ||
| packnplay run claude | ||
| | Task | Command | | ||
| |------|---------| | ||
| | Install | `go install github.com/obra/packnplay@latest` | | ||
| | Run | `packnplay run claude` | | ||
| | Port mapping | `packnplay run -p 3000:3000 claude` | | ||
| | With credentials | `packnplay run --ssh-creds --gh-creds claude` | | ||
| | List | `packnplay list` | | ||
| | Stop | `packnplay stop <name>` | | ||
|
|
||
| # 커스텀 워크스페이스 지정 | ||
| packnplay run --path /path/to/project claude | ||
| ## Installation | ||
|
|
||
| # 포트 매핑 (예: 웹 서버 테스트) | ||
| packnplay run -p 3000:3000 claude | ||
| ```bash | ||
| go install github.com/obra/packnplay@latest | ||
| ``` | ||
|
|
||
| ## 인증 설정 | ||
| **Requirements:** Go 1.21+, Docker running | ||
|
|
||
| packnplay는 자동으로 인증 정보를 로드합니다: | ||
| ## Authentication | ||
|
|
||
| ```bash | ||
| # API 키 사용 (권장) | ||
| export ANTHROPIC_API_KEY=sk-ant-xxx | ||
| packnplay run claude | ||
|
|
||
| # 또는 config profile 지정 | ||
| packnplay run --config anthropic-work claude | ||
| ``` | ||
|
|
||
| 지원하는 config 프로필: `anthropic`, `z.ai`, `anthropic-work`, `claude-personal` | ||
|
|
||
| ## 개발 워크플로우 | ||
|
|
||
| ### 1. 기본 개발 사이클 | ||
| ## Common Operations | ||
|
|
||
| ```bash | ||
| # 새 워크트리 생성 및 컨테이너 시작 | ||
| packnplay run --worktree feature-branch claude | ||
|
|
||
| # 개발 진행... | ||
| # (컨테이너 내에서 작업) | ||
|
|
||
| # 컨테이너에서 분리 (터미널 유지) | ||
| # Ctrl+B, D (tmux 사용 시) | ||
|
|
||
| # 나중에 재연결 | ||
| packnplay attach | ||
| ``` | ||
|
|
||
| ### 2. 자격 증명 마운트 | ||
|
|
||
| ```bash | ||
| # SSH 키 (git push용) | ||
| packnplay run --ssh-creds claude | ||
|
|
||
| # Git 설정 | ||
| packnplay run --git-creds claude | ||
|
|
||
| # GitHub CLI | ||
| packnplay run --gh-creds claude | ||
|
|
||
| # 모든 자격 증명 | ||
| packnplay run --all-creds claude | ||
| ``` | ||
| # With credentials (git push, GitHub CLI) | ||
| packnplay run --ssh-creds --gh-creds claude | ||
|
|
||
| ### 3. 포트 매핑 | ||
|
|
||
| ```bash | ||
| # 단일 포트 | ||
| packnplay run -p 3000:3000 claude | ||
| # Worktree isolation | ||
| packnplay run --worktree feature-branch claude | ||
|
|
||
| # 여러 포트 | ||
| # Port forwarding | ||
| packnplay run -p 3000:3000 -p 8080:8080 claude | ||
|
|
||
| # 특정 호스트 IP | ||
| packnplay run -p 127.0.0.1:3000:3000 claude | ||
| ``` | ||
|
|
||
| ### 4. 컨테이너 재사용 | ||
|
|
||
| ```bash | ||
| # 실행 중인 컨테이너 목록 | ||
| # List running containers | ||
| packnplay list | ||
|
|
||
| # 기존 컨테이너에 재연결 | ||
| packnplay run --reconnect claude | ||
|
|
||
| # 특정 컨테이너 중지 | ||
| packnplay stop <container_name> | ||
|
|
||
| # 모든 컨테이너 중지 | ||
| packnplay stop --all | ||
| ``` | ||
|
|
||
| ## 평가 및 벤치마킹 | ||
|
|
||
| ### 성능 테스트 | ||
|
|
||
| ```bash | ||
| # 워크트리 사용으로 격리된 테스트 환경 | ||
| packnplay run --worktree eval-task-1 --reconnect claude | ||
|
|
||
| # 결과 수집 후 컨테이너 정리 | ||
| packnplay stop --path /path/to/project | ||
| # Stop container | ||
| packnplay stop <container-name> | ||
| ``` | ||
|
|
||
| ### 반복 테스트 | ||
|
|
||
| ```bash | ||
| # 동일 환경에서 여러 테스트 실행 | ||
| for i in {1..5}; do | ||
| packnplay run --worktree "test-$i" --no-worktree claude | ||
| done | ||
|
|
||
| # 결과 분석 후 일괄 정리 | ||
| packnplay stop --all | ||
| ``` | ||
|
|
||
| ## 고급 옵션 | ||
|
|
||
| ### 추가 환경 변수 | ||
| ## Web Server Testing | ||
|
|
||
| ```bash | ||
| packnplay run --env NODE_ENV=development --env DEBUG=* claude | ||
| ``` | ||
|
|
||
| ### 런타임 선택 | ||
|
|
||
| ```bash | ||
| # Podman 사용 | ||
| packnplay run --runtime podman claude | ||
| ``` | ||
|
|
||
| ### 상세 출력 | ||
|
|
||
| ```bash | ||
| # Docker/Git 명령 표시 | ||
| packnplay run --verbose claude | ||
| ``` | ||
|
|
||
| ## 래퍼 스크립트 사용 | ||
|
|
||
| `shell.sh`는 packnplay에 tmux 통합을 추가한 편의 래퍼입니다: | ||
|
|
||
| ```bash | ||
| # 기본 실행 | ||
| "${CLAUDE_PLUGIN_ROOT}/plugins/me/skills/claude-isolated-test/shell.sh" | ||
|
|
||
| # 포트 매핑 | ||
| ./shell.sh -p 3000:3000 | ||
|
|
||
| # tmux 세션 이름 지정 | ||
| ./shell.sh --session mysession | ||
|
|
||
| # 활성 tmux 세션 목록 | ||
| ./shell.sh --list | ||
|
|
||
| # 특정 세션 종료 | ||
| ./shell.sh --kill mysession | ||
|
|
||
| # 컨테이너 정지 | ||
| ./shell.sh --stop | ||
| ``` | ||
|
|
||
| ### 래퍼 스크립트 장점 | ||
|
|
||
| - **tmux 자동 시작**: 컨테이너 시작 후 자동으로 tmux 세션 생성/연결 | ||
| - **세션 관리**: 여러 tmux 세션을 동시에 실행 가능 | ||
| - **영속성**: 컨테이너가 종료되지 않고 tmux만 분리됨 | ||
|
|
||
| ## 기존 shell.sh와의 호환성 | ||
|
|
||
| 기존 `shell.sh` 스크립트는 packnplay를 백엔드로 사용하도록 업데이트되었습니다: | ||
|
|
||
| ```bash | ||
| "${CLAUDE_PLUGIN_ROOT}/plugins/me/skills/claude-isolated-test/shell.sh" | ||
| ``` | ||
|
|
||
| ## 문제 해결 | ||
|
|
||
| ### 컨테이너가 시작되지 않음 | ||
|
|
||
| ```bash | ||
| # Docker 실행 확인 | ||
| docker info | ||
|
|
||
| # 이미지 업데이트 | ||
| packnplay refresh-container | ||
| ``` | ||
|
|
||
| ### 인증 오류 | ||
|
|
||
| ```bash | ||
| # API 키 확인 | ||
| echo $ANTHROPIC_API_KEY | ||
|
|
||
| # config 프로필 확인 | ||
| packnplay configure | ||
| ``` | ||
|
|
||
| ### 포트 충돌 | ||
|
|
||
| ```bash | ||
| # 사용 중인 포트 확인 | ||
| lsof -i :3000 | ||
|
|
||
| # 다른 포트 사용 | ||
| packnplay run -p 3001:3000 claude | ||
| ``` | ||
| # Start with port mapping | ||
| packnplay run -p 3000:3000 claude | ||
|
|
||
| ### 워크트리 문제 | ||
| # Inside container: start server | ||
| cd /workspace && npm run dev | ||
|
|
||
| ```bash | ||
| # 디렉토리 직접 사용 (워크트리 건너뜀) | ||
| packnplay run --no-worktree claude | ||
| # Access from host: http://localhost:3000 | ||
| ``` | ||
|
|
||
| ## 구성 | ||
| **Port conflicts:** `lsof -i :3000` to find conflicts, use `-p 3001:3000` for alternate port. | ||
|
|
||
| packnplay 설정 파일 위치: | ||
| ## Default Container | ||
|
|
||
| - 설정: `~/.config/packnplay/config.json` | ||
| - 자격 증명: `~/.local/share/packnplay/credentials/` | ||
| - 워크트리: `~/.local/share/packnplay/worktrees/` | ||
| - **Image:** `ghcr.io/obra/packnplay/devcontainer:latest` | ||
| - **Includes:** Node.js, GitHub CLI, Claude Code | ||
| - **Agents:** claude, codex, gemini, copilot, qwen, cursor, amp, deepseek | ||
|
|
||
| ## 참고 | ||
| ## Troubleshooting | ||
|
|
||
| - 기본 컨테이너: `ghcr.io/obra/packnplay/devcontainer:latest` | ||
| - 지원 AI 에이전트: claude, codex, gemini, copilot, qwen, cursor, amp, deepseek | ||
| - 포함 도구: Node.js, GitHub CLI, GitHub Copilot, OpenAI Codex, Google Gemini, Qwen Code, Cursor CLI, Sourcegraph Amp | ||
| | Issue | Solution | | ||
| |-------|----------| | ||
| | Container not starting | `docker info` to verify Docker running | | ||
| | Auth errors | Check `ANTHROPIC_API_KEY` is set | | ||
| | Port conflicts | `lsof -i :3000` to find conflicts | |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
# Check for pre-commit configuration file
find . -name ".pre-commit-config.yaml" -o -name ".pre-commit-config.yml" | head -5Repository: baleen37/claude-plugins
Length of output: 92
🏁 Script executed:
# List files in the repository root to see configuration files
ls -la | grep -E "(pre-commit|\.yaml|\.yml)"Repository: baleen37/claude-plugins
Length of output: 204
🏁 Script executed:
# Check if markdownlint is installed or available
which markdownlint || npm list -g markdownlint 2>/dev/null || echo "markdownlint not found in PATH"Repository: baleen37/claude-plugins
Length of output: 300
🏁 Script executed:
# Check the pre-commit configuration
cat .pre-commit-config.yamlRepository: baleen37/claude-plugins
Length of output: 823
🏁 Script executed:
# Run markdownlint on the specific file
markdownlint-cli2 plugins/me/skills/claude-isolated-test/SKILL.mdRepository: baleen37/claude-plugins
Length of output: 1554
🏁 Script executed:
# Check the markdownlint configuration
cat .markdownlint.jsonRepository: baleen37/claude-plugins
Length of output: 212
🏁 Script executed:
# Show the specific lines with table formatting issues (lines 20-22 and 85-87)
sed -n '20,22p; 85,87p' plugins/me/skills/claude-isolated-test/SKILL.mdRepository: baleen37/claude-plugins
Length of output: 274
Fix table formatting: add spaces around pipe separators.
The file has 8 markdownlint violations (MD060/table-column-style) in the two tables at lines 21 and 86. Table separator rows must have spaces around the pipe characters to match the header row format.
Change:
- Line 21:
|------|---------|→| ------ | --------- | - Line 86:
|-------|----------|→| ------- | ---------- |
🧰 Tools
🪛 markdownlint-cli2 (0.20.0)
[warning] 21-21: Table column style
Table pipe is missing space to the right for style "compact"
(MD060, table-column-style)
[warning] 21-21: Table column style
Table pipe is missing space to the left for style "compact"
(MD060, table-column-style)
[warning] 21-21: Table column style
Table pipe is missing space to the right for style "compact"
(MD060, table-column-style)
[warning] 21-21: Table column style
Table pipe is missing space to the left for style "compact"
(MD060, table-column-style)
[warning] 86-86: Table column style
Table pipe is missing space to the right for style "compact"
(MD060, table-column-style)
[warning] 86-86: Table column style
Table pipe is missing space to the left for style "compact"
(MD060, table-column-style)
[warning] 86-86: Table column style
Table pipe is missing space to the right for style "compact"
(MD060, table-column-style)
[warning] 86-86: Table column style
Table pipe is missing space to the left for style "compact"
(MD060, table-column-style)
🤖 Prompt for AI Agents
In `@plugins/me/skills/claude-isolated-test/SKILL.md` around lines 1 - 89, The
markdown tables in SKILL.md ("Quick Reference" and "Troubleshooting") have
separator rows without spaces around pipe characters causing MD060; update the
separator lines under the headers (the rows currently like `|------|---------|`
and `|-------|----------|`) to include spaces around each pipe to match the
header style (e.g., change to `| ------ | --------- |` and `| ------- |
---------- |`) so the table column style is consistent with the header rows.
| ## When to Use | ||
|
|
||
| ```bash | ||
| go install github.com/obra/packnplay@latest | ||
| ``` | ||
| - Isolated/sandboxed Claude Code testing | ||
| - Testing dangerous code changes | ||
| - Evaluating Claude performance in clean environments | ||
| - Port forwarding for web server testing | ||
| - Multiple concurrent test sessions |
There was a problem hiding this comment.
Add explicit activation guidelines + domain best practices section.
The current “When to Use” list isn’t enough to satisfy the required SKILL.md structure. Please add a dedicated “Activation Guidelines” section (context-aware triggers/non-goals) and a “Best Practices” section for safe isolated testing.
As per coding guidelines: “Create SKILL.md files in skills/*/SKILL.md structure with context-aware activation guidelines and domain-specific best practices.”
📝 Suggested structure
## When to Use
- Isolated/sandboxed Claude Code testing
- Testing dangerous code changes
- Evaluating Claude performance in clean environments
- Port forwarding for web server testing
- Multiple concurrent test sessions
+
+## Activation Guidelines
+
+- Activate when users request sandboxed/containerized testing or safety isolation.
+- Do **not** activate for production deployments or non-container workflows.
+- Ask for required ports and credentials up front.
+
+## Best Practices
+
+- Use least-privilege credentials; avoid mounting host secrets unless required.
+- Prefer worktree isolation for concurrent branches.
+- Keep port mappings minimal and document exposed ports.📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| ## When to Use | |
| ```bash | |
| go install github.com/obra/packnplay@latest | |
| ``` | |
| - Isolated/sandboxed Claude Code testing | |
| - Testing dangerous code changes | |
| - Evaluating Claude performance in clean environments | |
| - Port forwarding for web server testing | |
| - Multiple concurrent test sessions | |
| ## When to Use | |
| - Isolated/sandboxed Claude Code testing | |
| - Testing dangerous code changes | |
| - Evaluating Claude performance in clean environments | |
| - Port forwarding for web server testing | |
| - Multiple concurrent test sessions | |
| ## Activation Guidelines | |
| - Activate when users request sandboxed/containerized testing or safety isolation. | |
| - Do **not** activate for production deployments or non-container workflows. | |
| - Ask for required ports and credentials up front. | |
| ## Best Practices | |
| - Use least-privilege credentials; avoid mounting host secrets unless required. | |
| - Prefer worktree isolation for concurrent branches. | |
| - Keep port mappings minimal and document exposed ports. |
🤖 Prompt for AI Agents
In `@plugins/me/skills/claude-isolated-test/SKILL.md` around lines 10 - 16, The
SKILL.md is missing the required sections: add a new "Activation Guidelines"
section after "When to Use" that lists context-aware triggers, explicit
non-goals, and when to NOT activate the skill (e.g., production data, persistent
state changes), and add a "Best Practices" section that covers domain-specific
safe isolated testing rules (sandboxing notes, resource/time limits, network
port forwarding cautions, data handling and cleanup, and concurrency limits);
update the SKILL.md headings exactly (e.g., "Activation Guidelines" and "Best
Practices") so automated validators and readers can locate them alongside the
existing "When to Use" content.
| | Task | Command | | ||
| |------|---------| | ||
| | Install | `go install github.com/obra/packnplay@latest` | | ||
| | Run | `packnplay run claude` | | ||
| | Port mapping | `packnplay run -p 3000:3000 claude` | | ||
| | With credentials | `packnplay run --ssh-creds --gh-creds claude` | | ||
| | List | `packnplay list` | | ||
| | Stop | `packnplay stop <name>` | |
There was a problem hiding this comment.
Fix markdown table spacing (MD060).
markdownlint flags compact-style table pipes without surrounding spaces. Please normalize spacing in both tables.
✅ Proposed fixes
-| Task | Command |
-|------|---------|
-| Install | `go install github.com/obra/packnplay@latest` |
-| Run | `packnplay run claude` |
-| Port mapping | `packnplay run -p 3000:3000 claude` |
-| With credentials | `packnplay run --ssh-creds --gh-creds claude` |
-| List | `packnplay list` |
-| Stop | `packnplay stop <name>` |
+| Task | Command |
+| ---- | ------- |
+| Install | `go install github.com/obra/packnplay@latest` |
+| Run | `packnplay run claude` |
+| Port mapping | `packnplay run -p 3000:3000 claude` |
+| With credentials | `packnplay run --ssh-creds --gh-creds claude` |
+| List | `packnplay list` |
+| Stop | `packnplay stop <name>` |-| Issue | Solution |
-|-------|----------|
-| Container not starting | `docker info` to verify Docker running |
-| Auth errors | Check `ANTHROPIC_API_KEY` is set |
-| Port conflicts | `lsof -i :3000` to find conflicts |
+| Issue | Solution |
+| ----- | -------- |
+| Container not starting | `docker info` to verify Docker running |
+| Auth errors | Check `ANTHROPIC_API_KEY` is set |
+| Port conflicts | `lsof -i :3000` to find conflicts |Also applies to: 85-88
🧰 Tools
🪛 markdownlint-cli2 (0.20.0)
[warning] 21-21: Table column style
Table pipe is missing space to the right for style "compact"
(MD060, table-column-style)
[warning] 21-21: Table column style
Table pipe is missing space to the left for style "compact"
(MD060, table-column-style)
[warning] 21-21: Table column style
Table pipe is missing space to the right for style "compact"
(MD060, table-column-style)
[warning] 21-21: Table column style
Table pipe is missing space to the left for style "compact"
(MD060, table-column-style)
🤖 Prompt for AI Agents
In `@plugins/me/skills/claude-isolated-test/SKILL.md` around lines 20 - 27, The
markdown tables in SKILL.md use compact pipe syntax and must have spaces around
pipe characters to satisfy MD060; update both tables (the one at lines ~20-27
and the one at ~85-88) so every cell separator has a single space before and
after each pipe (e.g., "| Install | `go install...` |"), normalizing spacing
consistently across headers and rows and ensuring no trailing/leading extra
spaces.
Remove shell.sh wrapper tests. Add SKILL.md documentation tests. Co-Authored-By: Claude <noreply@anthropic.com>
Summary
Test plan
Summary by CodeRabbit
Documentation
Chores
✏️ Tip: You can customize this high-level summary in your review settings.