Generic experiment workflow guard: sync configured upstream remote and base branch, stop immediately on merge conflicts, prefer containerized verification when POLYGLOT_DOCKER_IMAGE or project docs specify it, and require explicit human approval before delivery/PR actions.
How this skill is triggered — by the user, by Claude, or both
Slash command
/polyglot-agent-harness:experiment-guardThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Use this skill whenever the user is doing non-trivial work in the active Git repository: experiments, refactors, running tests, changing dependencies, or preparing a PR.
Use this skill whenever the user is doing non-trivial work in the active Git repository: experiments, refactors, running tests, changing dependencies, or preparing a PR.
All paths are repository-relative unless noted. Set these in your shell profile, direnv, CI, or project docs/ai/env.example.
| Variable | Default | Meaning |
|---|---|---|
POLYGLOT_UPSTREAM_REMOTE | upstream | Remote to fetch/merge from |
POLYGLOT_BASE_BRANCH | main | Branch to align with (use dev if that is your integration branch) |
POLYGLOT_ORIGIN_REMOTE | origin | Your fork / push remote (informational) |
POLYGLOT_DOCKER_IMAGE | (empty) | If set, final build/test verification should run inside this image |
POLYGLOT_DOCKERFILE | (empty) | If set (e.g. container/Dockerfile), document or use docker build -f per project README |
From the active repository root (the workspace Git root, not a hardcoded path):
git fetch "${POLYGLOT_UPSTREAM_REMOTE:-upstream}" --prunegit fetch "${POLYGLOT_ORIGIN_REMOTE:-origin}" --pruneHEAD, remote tracking branch if any, and resolved ${POLYGLOT_BASE_BRANCH} tip on upstream.git merge "${POLYGLOT_UPSTREAM_REMOTE:-upstream}/${POLYGLOT_BASE_BRANCH:-main}"git rebase "upstream/${POLYGLOT_BASE_BRANCH}" only if that is the team convention.Conflict rule: If Git reports conflicts (unmerged paths or conflict markers), stop. Do not auto-resolve. Show git status and the list of conflicted paths. Wait for human resolution.
docker, docker compose, or container-backed tests, run the harness check from the harness (or consumer) repo root:
python3 scripts/docker-check.py0 means the daemon answered docker info; non-zero means stop and tell the user to start Docker / fix permissions — do not silently fall back to “host-only” tests if the project requires containers.POLYGLOT_DOCKER_IMAGE is set or the project documents a Dev Container / Docker workflow.docker run --rm containers for iterative verification when the image installs or syncs toolchains at runtime. Prefer one of:
docker run -it --name <project>-dev ... <image> bash, then later docker start -ai <project>-dev.docker run --rm is still used, mention that toolchain/package downloads may repeat and that failures in those downloads are environment/cache issues unless the build itself fails after dependencies are available.Before delivery (preparing a PR draft, force-pushing, or any upstream-bound commit):
cargo fmt --all -- --check and fix until exit 0 before claiming ready or committing for upstream. See pr-workflow for the full gate order: fmt → clippy → tests → E2E.Co-authored-by: / Co-Authored-By: or similar co-author trailers unless the user explicitly asks (see pr-workflow step 6).gh pr create or push for PR creation on upstream unless the user explicitly asks. Prepare paste-ready title/body and save the draft outside git repos (see pr-workflow → pr-drafts/).Provides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub jiaxin2006/polyglot-agent-harness --plugin polyglot-agent-harness