Code Patterns
Aedelon/claude-code-blueprint
Reference patterns for REST APIs, pytest/vitest testing, Docker multi-stage builds, GitHub Actions CI/CD, PostgreSQL, TypeScript generics, Python async, and React Server Components.
How Circuit Breaker is built, tested, packaged, and kept secret-safe — the make dev/verify/test targets, the PostgreSQL integration test database and its fixtures, the mono Docker image and native…
$ npx skills add BlkLeg/CircuitBreaker --skill cb-build-test -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install BlkLeg/CircuitBreaker cb-build-test --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/BlkLeg/CircuitBreaker.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/cb-build-test .claude/skills/cb-build-test && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "cb-build-test" agent skill from https://github.com/BlkLeg/CircuitBreaker/tree/main/.claude/skills/cb-build-test into .claude/skills/cb-build-test/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cb-build-test", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/BlkLeg/CircuitBreaker/tree/main/.claude/skills/cb-build-testType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add BlkLeg/CircuitBreaker --skill cb-build-test -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install BlkLeg/CircuitBreaker cb-build-test --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/BlkLeg/CircuitBreaker.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.claude/skills/cb-build-test .agents/skills/cb-build-test && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "cb-build-test" agent skill from https://github.com/BlkLeg/CircuitBreaker/tree/main/.claude/skills/cb-build-test into .agents/skills/cb-build-test/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cb-build-test", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add BlkLeg/CircuitBreaker --skill cb-build-test -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install BlkLeg/CircuitBreaker cb-build-test --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/BlkLeg/CircuitBreaker.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.claude/skills/cb-build-test .cursor/skills/cb-build-test && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "cb-build-test" agent skill from https://github.com/BlkLeg/CircuitBreaker/tree/main/.claude/skills/cb-build-test into .cursor/skills/cb-build-test/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cb-build-test", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/BlkLeg/CircuitBreaker.git --path .claude/skills/cb-build-test--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add BlkLeg/CircuitBreaker --skill cb-build-test -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install BlkLeg/CircuitBreaker cb-build-test --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/BlkLeg/CircuitBreaker.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.claude/skills/cb-build-test .gemini/skills/cb-build-test && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "cb-build-test" agent skill from https://github.com/BlkLeg/CircuitBreaker/tree/main/.claude/skills/cb-build-test into .gemini/skills/cb-build-test/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cb-build-test", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install BlkLeg/CircuitBreaker cb-build-testInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add BlkLeg/CircuitBreaker --skill cb-build-test -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/BlkLeg/CircuitBreaker.git skills-src && mkdir -p .github/skills && cp -r skills-src/.claude/skills/cb-build-test .github/skills/cb-build-test && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "cb-build-test" agent skill from https://github.com/BlkLeg/CircuitBreaker/tree/main/.claude/skills/cb-build-test into .github/skills/cb-build-test/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cb-build-test", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add BlkLeg/CircuitBreaker --skill cb-build-test -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install BlkLeg/CircuitBreaker cb-build-test --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/BlkLeg/CircuitBreaker.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.claude/skills/cb-build-test .opencode/skills/cb-build-test && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "cb-build-test" agent skill from https://github.com/BlkLeg/CircuitBreaker/tree/main/.claude/skills/cb-build-test into .opencode/skills/cb-build-test/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cb-build-test", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
cb-build-testHow Circuit Breaker is built, tested, packaged, and kept secret-safe — the make dev/verify/test targets, the PostgreSQL integration test database and its fixtures, the mono Docker image and native…
Cb Build Test is an agent skill from BlkLeg/CircuitBreaker. How Circuit Breaker is built, tested, packaged, and kept secret-safe — the make dev/verify/test targets, the PostgreSQL integration test database and its fixtures, the mono Docker image and native deb/rpm/apk/AppImage packages, and the Fernet vault plus air-gap handling for credentials. Use this whenever running or writing tests, setting up or debugging the dev environment, working on Dockerfile.mono or the entrypoint/supervisord config, building or releasing packages, adding an integration that stores…
Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in DevOps & Cloud, covering Containers and Integration testing. It works with Docker and PostgreSQL. The repository describes itself as: Bring your homelab to life. A self-hosted IPAM and service mapper that visualizes complex hardware, compute, and network relationships in real-time. The licence is MIT.
Read from SKILL.md and the folder at commit fc44f2e. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
makeFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names these keys or tokens, usually read from environment variables:
CB_VAULT_KEYCB_DB_PASSWORDCB_JWT_SECRETNATS_AUTH_TOKENGPG_KEY_IDFrom names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Cb Build Test loads about 1.9k tokens when it runs. Until then it costs about 153 tokens; SKILL.md has 789 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from BlkLeg/CircuitBreaker at commit fc44f2e, republished under its MIT licence (© BlkLeg). 789 words, ~1,906 tokens.
.claude/skills/cb-build-test/SKILL.md (or your agent's skills folder).make install # bootstrap once
make dev # deps + migrations + backend + frontend + monitor workers
make deps-up # Postgres / Redis / NATS in Docker, nothing else
make migrate # alembic
make reset-oobe # rewind to the first-run wizardmake dev runs the app natively against Dockerized dependencies. The
Makefile calls this "ZERO DOCKER DRIFT" for make backend — the point is that
the thing you debug is the thing that ships. Reach for make deps-native-up
when you need prod parity, since it uses the same systemd units install.sh
installs on a user's box.
Note make backend has no reload; make backend-watch does. The comment marks
watch mode as post-fix only, because auto-reload masks import-time failures that
a real start would surface.
make test-backend # tests/integration — provisions the test DB first
make test-frontend # vitest
make test # both
make verify # the pre-push gate
make verify-composed # Tier 2: the browser suite, the composed journey and the mono smoke
make verify-composed-mono # Tier 2: build Dockerfile.mono and run the compose smoke CI runsCB_COMPOSED_QUARANTINED=0 lifts QUAR-001 locally: the suite runs, minus the tests that have live register
rows, which are deselected exactly as CI deselects them. Add CB_E2E_NO_DESELECT=1 to run those too; it is
local only, and no workflow may set it. In CI, the composed journey will not re-run on the same
inputs after a failure until each failed test is fixed or has a register row
(scripts/ci/composed_rerun_guard.py). Local runs are not guarded, since they are how a fix gets made.
Test code lives in four places, and putting a test in the wrong one is how it silently never runs:
apps/backend/tests/ unit + service tests, own pyproject config
tests/integration/ backend-scoped, needs live PostgreSQL
tests/unit/ repo-root scoped
tests/build/ repo-policy / governance suites
apps/frontend/src/__tests__/ vitest, *.test.jsxtests/build/ is a real enforcement suite — tracked-file policy, governance
files, CLI parity, restart probes, version parity. It once collected zero tests
because pytest's default norecursedirs contains "build"; pytest.ini at the
repo root exists specifically to override that. Read the comments in that file
before changing collection settings, because the failure mode is a suite that
looks green and enforces nothing.
make test-db runs scripts/ensure_test_db.py against CB_TEST_DB_URL and
never drops the database. Integration tests run with:
CB_ALLOW_DEGRADED_DEPENDENCIES=true # Redis/NATS optional
CB_ALLOW_DIRECT_EGRESS=trueThese tests hit real PostgreSQL on purpose. Don't mock the database in
tests/integration/ — assert against real persisted state, because the bugs
worth catching there are constraint, migration, and transaction bugs that a mock
cannot express. Fixtures and factories are in apps/backend/tests/conftest.py
and factories.py.
When a test fails, decide explicitly whether the test is wrong (fixture drifted from the schema) or the code is wrong (missing field, bad query), and say which. Batch fixes by category instead of re-running the full suite after each one — the backend suite is minutes, not seconds.
Coverage is gated at --cov-fail-under=56, ratcheted to measured reality.
Raise it only after coverage genuinely clears a higher number; never lower it
to turn a build green.
Two distribution paths, both real:
Native packages are the primary install route:
make build # tarball + deb + rpm + apk + AppImage + .pkg.tar.zst
make build-release # toolchain + build
make sign # GPG-sign artifacts + SHA256SUMS (needs GPG_KEY_ID)
make sbom # syftDriven by scripts/build_native_release.py and nfpm.yaml (arch from GOARCH).
Publishing a version is not a packaging task: it goes through release.yml
(make release-candidate, one approval, the promote creates the tag). Never
push a v* tag by hand — cb-release has the flow and its failure modes.
The mono Docker image packs Postgres, NATS, Redis, backend, workers, and nginx into one container:
make docker-build # Dockerfile.mono -> $(DOCKER_REGISTRY):$(cat VERSION)Facts about Dockerfile.mono that are easy to get wrong:
python:3.12-slim-bookworm — Debian, not Alpine.
Only the frontend builder stage uses Alpine. Use apt-get, not apk.breaker:1000 (uid/gid 1000, no home, nologin).
There is a checkov:skip=CKV_DOCKER_3 on that line explaining it. Do not
"fix" this by adding a top-level USER breaker — the bootstrap breaks.VOLUME ["/data"] is the only persistent path.HEALTHCHECK targets /livez, deliberately not /health or /readyz:
a failing healthcheck restarts the container, and readiness failing during a
slow dependency start must not become a restart loop.buildx imagetools create in release.yml — not one --platform
invocation. The combined build was OOM-killed; the comment there records why.
Preserve that split.Credentials for integrations are Fernet-encrypted at rest under CB_VAULT_KEY
via services/vault_service.py, with the API surface in api/vault.py. The key
auto-rotates on a daily APScheduler job that re-encrypts stored credentials and
hot-swaps the in-memory vault; cb-security-hardening covers the rotation
contract in detail.
Rules that keep this safe:
CB_DB_PASSWORD, CB_VAULT_KEY, CB_JWT_SECRET, and NATS_AUTH_TOKEN all
use ${VAR:?...} so a missing one fails the container at start rather than
booting something insecure.CB_AIRGAP=true must block outbound network calls. Any new integration that
reaches the internet needs to honor it, plus the CIDR allowlist in
core/network_acl.py. Air-gapped homelabs are a first-class deployment here,
not an edge case.gitleaks runs as a pre-commit hook. If it blocks a commit, remove the secret
and rotate it — the value is already in your working tree's history if you
staged it, so bypassing the hook is never the fix.
make security-check # gate mode — fails on HIGH/CRIT
make security-report # full report, non-blocking© BlkLeg, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .claude/skills/cb-build-test of BlkLeg/CircuitBreaker.
Open the folder on GitHubat commit fc44f2e
Cb Build Test next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Cb Build Test this skillBlkLeg/CircuitBreaker | 201 | — | ~1.9k | Automated safety check: Pass | MIT | |
| Code PatternsAedelon/claude-code-blueprint | 120 | — | ~1.2k | Automated safety check: Pass | Custom licence | |
| Run Testsansible-collections/community.postgresql | 144 | — | ~1k | Automated safety check: Pass | Custom licence | |
| Monstermq Broker Configvogler75/monster-mq | 143 | — | ~2.2k | Automated safety check: Pass | GPL-3.0 | |
| Docker Deploymentfossasia/eventyay | 1.7k | — | ~574 | Automated safety check: Notes | Apache-2.0 | |
| Mg Local DB Restoremodelguide/modelguide | 108 | — | ~645 | Automated safety check: Pass | MIT |
Aedelon/claude-code-blueprint
Reference patterns for REST APIs, pytest/vitest testing, Docker multi-stage builds, GitHub Actions CI/CD, PostgreSQL, TypeScript generics, Python async, and React Server Components.
ansible-collections/community.postgresql
Runs and writes tests (sanity, unit, integration) for the community.postgresql Ansible collection using ansible-test.
vogler75/monster-mq
Guide for configuring, deploying, and operating the MonsterMQ broker.
fossasia/eventyay
Docker Compose, container services, deployment. An agent skill from fossasia/eventyay.
modelguide/modelguide
Trigger phrases - "reset local db", "recreate local postgres", "restore dump to local", "reset local database", "load backup locally"
FreakStudioCN/mpy-hardware-extension
用本地前端插件连云端后端做端到端测试 / test the local VS Code extension against the deployed cloud backend.
BlkLeg/CircuitBreaker
Circuit Breaker code conventions and the quality gates that actually block a push — ruff, mypy, eslint, the pytest coverage ratchet, and the make verify tiers.
BlkLeg/CircuitBreaker
How Circuit Breaker moves data between backend and frontend — the NATS internal bus, Redis pub/sub, the WebSocket stream endpoints and their first-message JWT handshake, SSE log/event streams, and…
BlkLeg/CircuitBreaker
How a Circuit Breaker release is cut, approved, published and followed up — the candidate→approval→promote flow in release.yml, the release environment gate, the make release- targets, the…
BlkLeg/CircuitBreaker
Enforces Circuit Breaker security hardening conventions across backend, frontend, Docker, and nginx.
BlkLeg/CircuitBreaker
The maintenance automation around Circuit Breaker — which bots and scheduled workflows exist (Discord notifications, ledger watch, branch cleanup, Dependabot lockfile sync, the required-checks…
Works with
Categories
How Circuit Breaker is built, tested, packaged, and kept secret-safe — the make dev/verify/test targets, the PostgreSQL integration test database and its fixtures, the mono Docker image and native…. Cb Build Test is an agent skill from BlkLeg/CircuitBreaker. How Circuit Breaker is built, tested, packaged, and kept secret-safe — the make dev/verify/test targets, the PostgreSQL integration test database and its fixtures, the mono Docker image and native deb/rpm/apk/AppImage packages, and the Fernet vault plus air-gap handling for credentials.
Cb Build Test fits situations like: tasks that involve Containers; tasks that involve Integration testing.
Run `npx skills add BlkLeg/CircuitBreaker --skill cb-build-test -a claude-code`. Or copy the skill folder (.claude/skills/cb-build-test in BlkLeg/CircuitBreaker) into .claude/skills/cb-build-test in your project. Claude Code loads it when a task matches its description.
Run `npx skills add BlkLeg/CircuitBreaker --skill cb-build-test -a codex`. Or copy the skill folder (.claude/skills/cb-build-test in BlkLeg/CircuitBreaker) into .agents/skills/cb-build-test in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add BlkLeg/CircuitBreaker --skill cb-build-test -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/cb-build-test, .gemini/skills/cb-build-test, .github/skills/cb-build-test and .opencode/skills/cb-build-test in your project.
Going by SKILL.md and its folder, Cb Build Test needs the command-line tools its instructions call (make) and credentials named CB_VAULT_KEY, CB_DB_PASSWORD, CB_JWT_SECRET and NATS_AUTH_TOKEN. Our summary lists: Docker; A credential in CB_VAULT_KEY; A credential in CB_JWT_SECRET.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Cb Build Test is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.9k tokens (SKILL.md is roughly 7.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Cb Build Test: Code Patterns (Aedelon/claude-code-blueprint, 120 stars), Run Tests (ansible-collections/community.postgresql, 144 stars), Monstermq Broker Config (vogler75/monster-mq, 143 stars) and Docker Deployment (fossasia/eventyay, 1.7k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
BlkLeg (a GitHub user) maintains it in BlkLeg/CircuitBreaker, which has 201 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on October 5, 2026.
Source: BlkLeg/CircuitBreaker on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.