circleci-public/chunk-cli/chunk-sidecar
Claude Code and agent skill by circleci-public/chunk-cli
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Checking that the SKILL.md file is still in the repository.
Use when the user says "validate on the sidecar", "run tests on the sidecar", "sync to sidecar", "sidecar dev loop", "check this on the sidecar", "validate remotely", "scaffold test-suites.yml", "set up smarter testing", "write .circleci/test-suites.yml", "run smarter testing doctor", or "diagnose smarter testing", or when you have made edits and want to verify them on a remote `chunk` sidecar instead of running locally. Also covers creating sidecars, snapshotting a configured environment, customizing the sidecar image via `chunk sidecar`, and scaffolding `.circleci/test-suites.yml` for CircleCI Smarter Testing.
Install
npx vskill@latest install circleci-public/chunk-cli/chunk-sidecarSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as circleci-public/chunk-cli/chunk-sidecar.
Chunk Sidecar
Run your build, test, and validate commands on a remote CircleCI-provisioned Linux environment instead of locally. The 90% job is the sync → validate dev loop. This skill also handles first-time setup, debugging, test-suite scaffolding, and snapshot management.
Step 0 — Probe State, Then Ask
Run these probes before anything else. They are read-only and always safe:
If `chunk` is not installed: Stop. Tell the user to install chunk before using this skill.
If auth shows CircleCI "Not set": Run the OAuth login for them — see Logging in — then re-run chunk auth status. Only continue once CircleCI shows "Configured".
Otherwise, call AskUserQuestion based on detected state (choose the block that matches):
No active sidecar + no validation.sidecarImage in config (first time)
No active sidecar + validation.sidecarImage IS set
Active sidecar exists
Prerequisites
Before any chunk sidecar command, confirm:
chunk --version— CLI is installed and on PATH.chunk auth status— exit code 0, CircleCI shows "Configured". If not, see Logging in.- OrgID — read
cat .chunk/config.jsonand checkorgID. If missing, runtest -n "${CIRCLECI_ORG_ID:-}". If both are unset, runchunk org list --json: one org, use it automatically; several, show the list and ask exactly once; error or empty, stop and see Logging in. Persist withchunk config set orgID <id>.
Never run echo $CIRCLE_TOKEN, env, printenv, or any command that exposes credential env vars.
Logging in
OAuth is the default. It opens a browser, exchanges the code over PKCE, and stores the token in the system keychain — no token pasting, nothing on disk in plaintext.
Run it with a Bash timeout of 300000ms — the command blocks until the browser callback lands (5 minute limit). No browser opens when the agent runs it: stdin is not a terminal, so chunk auth login prints the authorize URL and waits. Relay that URL to the user and ask them to open it. Never open a browser on their behalf.
The callback listens on 127.0.0.1 on this machine, so the URL only works from a browser on the same host. --no-browser forces the same print-and-wait behaviour when a terminal is present.
Fall back to chunk auth set circleci (paste a personal API token) only when OAuth is unavailable, or when the user explicitly asks for token auth. Both paths land in the keychain; --insecure-storage writes to ~/.config/chunk/config.json instead.
If chunk auth status reports the CircleCI source as Environment, do not log in — CIRCLE_TOKEN is already set and takes precedence over the keychain, so a login would store a token that never gets used. Treat it as configured and move on.
Dev Loop
Once per project, after the sidecar is working, mark the commands that should run on it. A sidecar being up routes nothing on its own: chunk sidecar setup marks only install and gate-role commands, and a sidecar set up by hand has none marked. chunk validate --list tags each command [local|remote, role], so read it first, then:
The bare form deliberately skips autofix commands (formatters, codegen) and prints which ones it left alone — those rewrite files, and on the sidecar the edits never reach the local working tree. Mark one by name only if the user wants that. Already-marked commands report no change, so re-running is safe, and the flag persists in .chunk/config.json across sessions.
Caveat: this routing only applies while validation.sidecarImage is unset. Once a snapshot ID is recorded there, chunk validate sends every command to the sidecar regardless of marking or role — the same as --remote. On such a project, run formatters directly instead of through chunk validate.
Then, for each round of edits:
chunk sidecar sync— pushes the local working tree (staged + unstaged) to the active sidecar. Skip if nothing changed.chunk validate— runs configured commands. Commands markedremote: truein.chunk/config.jsonrun on the sidecar; others run locally.
- One command by name:
chunk validate <name> - Ad-hoc remote command:
chunk validate --remote --cmd "<cmd>" - Everything on the sidecar regardless of marking:
chunk validate --remote
- Zero exit = pass. Non-zero = go to Troubleshooting.
Snapshot Management
Snapshots save a configured sidecar state so future sessions boot fast.
- Create:
chunk sidecar snapshot create --name <name>— captures current sidecar and records it asvalidation.sidecarImagein.chunk/config.json. The source sidecar is deleted after a successful snapshot. Add--skip-configfor a throwaway checkpoint that should not become the project's image. - List:
chunk sidecar snapshot list - Launch from:
chunk sidecar create --image <snapshot-id>thenchunk sidecar sync
Snapshot once chunk validate passes after setting up the environment, or after changing its dependencies (new packages, lockfile or toolchain updates). If the project already records a different image, snapshot create asks before replacing it, and without a terminal it keeps the old one and prints the chunk config set validation.sidecarImage <snapshot-id> command. Confirm with the user before running it.
Scaffolding .circleci/test-suites.yml
CircleCI Smarter Testing splits your test suite into atoms and runs only the affected subset. Driven by .circleci/test-suites.yml.
File shape
Stack templates
Go:
Python (pytest):
Node (Jest):
Validate after writing
chunk sidecar sync- Run doctor on the sidecar:
`` chunk validate --remote --cmd 'script -q /dev/null circleci run testsuite "<suite-name>" --doctor' ``
- Fix reported issues locally, sync, re-run doctor. Repeat until all checks pass.
If circleci-testsuite is not installed, fall back to manual validation (see v1 skill for manual steps).
Troubleshooting
- `Could not select an organization` / `no interactive terminal` — orgID missing. Run
chunk org list --json, auto-select if there is one org, otherwise ask once, thenchunk config set orgID <id>. - Auth errors (401/403, "token invalid") — run
chunk auth status. If the CircleCI token is stale or missing, re-runchunk auth login(Logging in); otherwise follow the printed remediation. - Sidecar 404 on `current` / `sync` / `validate` — sidecar was deleted externally. Run
chunk sidecar forget, return to Step 0. - `permission denied (publickey)` — run
chunk sidecar add-ssh-key --public-key-file ~/.ssh/chunk_ai.pub. If it persists, tell user to remove~/.ssh/chunk_ai*to regenerate the keypair. - `context deadline exceeded` on SSH or API calls — sidecar is unhealthy. If
sidecarImageis set, create a fresh one from snapshot. Otherwisechunk sidecar forgetand redo setup viachunk-sidecar-setup. - Missing binary on sidecar —
chunk validate --remote --cmd "<install-command>". Re-snapshot afterchunk validatepasses. - `chunk validate` ran everything locally — no command is marked
remote: true. Runchunk validate --mark-remote(see Dev Loop). Do not paper over it with--remoteon every call. - `sync` errors about merge base — ask user to push the branch (
git push -u origin <branch>). - Snapshot `--image` won't boot — snapshot IDs are org-scoped. Confirm both the snapshot and new sidecar are in the same org.
Parallel Sessions
chunk scopes active-pool state to your session and branch (under XDG_DATA_HOME, keyed on CLAUDE_CODE_SESSION_ID, or CHUNK_SESSION_ID when set), so two sessions in the same repo target different pools and never sync into the same remote workspace. A session with no pool yet takes over one the project already has, unless another session owns it. Nothing to configure, and do not hand-edit those files.
Out of Scope
- Running
chunk initor bulk-editing.chunk/config.json. The skill may runchunk config setfororgIDandvalidation.sidecarImageonly. - Editing files on the sidecar over SSH — they will be overwritten on the next
sync.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/chunk-sidecar/SKILL.md
Popularity
- Repository stars
- 84
- Repository forks
- 41
- 7-day trend score
- 22
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 16 Aug 2026, 3 months ago.
Extension points
hookPre/post lifecycle hooks
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/circleci-public/chunk-cli/chunk-sidecar)