Python
ericrisco/rsc-harness
A skill your agent uses when the task is Python itself, in any framework or none: PEP 695 generics, mypy --strict typing, dataclass/Protocol/TypedDict/Enum choices, asyncio.TaskGroup, stdlib idioms…
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.
$ npx skills add BlkLeg/CircuitBreaker --skill cb-code-quality -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install BlkLeg/CircuitBreaker cb-code-quality --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-code-quality .claude/skills/cb-code-quality && 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-code-quality" agent skill from https://github.com/BlkLeg/CircuitBreaker/tree/main/.claude/skills/cb-code-quality into .claude/skills/cb-code-quality/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cb-code-quality", 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-code-qualityType 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-code-quality -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install BlkLeg/CircuitBreaker cb-code-quality --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-code-quality .agents/skills/cb-code-quality && 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-code-quality" agent skill from https://github.com/BlkLeg/CircuitBreaker/tree/main/.claude/skills/cb-code-quality into .agents/skills/cb-code-quality/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cb-code-quality", 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-code-quality -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install BlkLeg/CircuitBreaker cb-code-quality --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-code-quality .cursor/skills/cb-code-quality && 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-code-quality" agent skill from https://github.com/BlkLeg/CircuitBreaker/tree/main/.claude/skills/cb-code-quality into .cursor/skills/cb-code-quality/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cb-code-quality", 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-code-quality--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-code-quality -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install BlkLeg/CircuitBreaker cb-code-quality --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-code-quality .gemini/skills/cb-code-quality && 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-code-quality" agent skill from https://github.com/BlkLeg/CircuitBreaker/tree/main/.claude/skills/cb-code-quality into .gemini/skills/cb-code-quality/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cb-code-quality", 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-code-qualityInstalls 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-code-quality -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-code-quality .github/skills/cb-code-quality && 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-code-quality" agent skill from https://github.com/BlkLeg/CircuitBreaker/tree/main/.claude/skills/cb-code-quality into .github/skills/cb-code-quality/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cb-code-quality", 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-code-quality -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-code-quality --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-code-quality .opencode/skills/cb-code-quality && 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-code-quality" agent skill from https://github.com/BlkLeg/CircuitBreaker/tree/main/.claude/skills/cb-code-quality into .opencode/skills/cb-code-quality/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cb-code-quality", 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-code-qualityCircuit Breaker code conventions and the quality gates that actually block a push — ruff, mypy, eslint, the pytest coverage ratchet, and the make verify tiers.
Cb Code Quality is an agent skill from 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. Use this whenever writing, reviewing, or refactoring backend Python (FastAPI/SQLAlchemy under apps/backend/src/app) or frontend JavaScript/JSX (apps/frontend/src), before committing or pushing anything, when a lint or type error needs fixing, or when asked about naming, constants, error handling, file structure, or test requirements in this repo.
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 Development, covering Linting and formatting, Code quality and React components. It works with JavaScript, Ruff, Python and ESLint. 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:
makepythonmypyFrom 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 no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Cb Code Quality loads about 1.9k tokens when it runs. Until then it costs about 131 tokens; SKILL.md has 802 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). 802 words, ~1,885 tokens.
.claude/skills/cb-code-quality/SKILL.md (or your agent's skills folder).Every check below is wired into the Makefile. Prefer these over ad-hoc tool invocations — they carry the flags, paths, and env the repo actually needs, and they are the same commands CI runs.
make lint # ruff check + mypy src/app + eslint (fast)
make format # ruff format + prettier
make verify # Tier 0 static + Tier 1 unit — THE PRE-PUSH GATE (~3m20s)
make verify-full # verify + the backend suite (~6m45s)
make test-backend # integration tests; provisions the test DB first
make test-frontend # vitestmake verify is the gate to run before pushing. make verify-fast (~90s) is
the Tier 0 static subset when you only need a quick signal.
There is no flake8 and no cognitive-complexity plugin in this project. Do not
install them — ruff is the Python linter (line-length = 100,
select = ["E", "F", "I", "UP", "ASYNC"]) and it is also the formatter.
.pre-commit-config.yaml runs gitleaks, ruff, ruff-format, and mypy --strict
on commit. If a commit is rejected, read which hook failed before changing code —
a gitleaks rejection means a secret reached a staged file and the fix is to
remove the secret, never to bypass the hook.
apps/frontend/src is 318 .jsx + 123 .js files and one stray .ts. There
is a tsconfig.json, but it is not what the code is written in.
Write .jsx for components and .js for hooks, API modules, and helpers, and
match the surrounding file. Do not add TypeScript annotations, interface
declarations, or .ts/.tsx files to existing directories — a lone typed file
in a JS tree is churn for the next reader, not an upgrade. Type intent goes in
JSDoc and PropTypes where the surrounding code already uses them.
[tool.mypy] sets disallow_untyped_defs = true, check_untyped_defs = true,
and warn_return_any = true against src/app. Every function you add needs
annotated parameters and a return type, or make lint fails:
async def get_cached_telemetry(hardware_id: int) -> dict | None:ignore_missing_imports is on and import-untyped is disabled, so third-party
libraries without stubs will not fight you. Your own code has no such excuse.
Backend : apps/backend/src/app/core/constants.py
Frontend : apps/frontend/src/lib/constants.jsName any literal that carries meaning — a TTL, a threshold, a retry budget, a
port. The value is that a reader meets TELEMETRY_CACHE_TTL_SECONDS instead of
300 and does not have to reconstruct intent from a number.
await redis.setex(cache_key, TELEMETRY_CACHE_TTL_SECONDS, payload) # not 300Exempt: 0, 1, "", booleans, and format strings. A literal used exactly
once, immediately beside the thing that explains it, is often clearer inline —
use judgment rather than extracting on reflex.
Anything touching I/O — DB, Redis, NATS, HTTP, filesystem, SNMP/IPMI/Redfish — needs a handler that names the exception it expects. The reason to catch specifically is that a broad catch hides the failure you did not anticipate, and this project runs unattended in other people's homelabs where a silently swallowed error is indistinguishable from working software.
try:
raw = await get_redis().get(cache_key)
except redis.ConnectionError as exc:
logger.warning("[telemetry_cache] Redis unavailable for hw:%s: %s", hardware_id, exc)
return None
except json.JSONDecodeError as exc:
logger.error("[telemetry_cache] corrupt cache for hw:%s: %s", hardware_id, exc)
return NoneEvery handler either logs and returns a typed fallback, or re-raises. Never
except Exception: pass. Prefix log messages with [module_name] and use
logger, never print().
Degradation is a first-class path here: Redis or NATS being down should leave
the app serving REST, not crashing. CB_ALLOW_DEGRADED_DEPENDENCIES exists for
exactly this and the integration suite runs with it on.
Aim for functions under ~40 lines, nesting at or below 3 levels, and modules
that hold one responsibility. Prefer splitting a long function into named
helpers over compressing it — _is_active_hardware(r) tells a reader what the
condition means in a way a stacked boolean never does.
These are targets for new and modified code, not a mandate to refactor what
is already here. 166 of 301 backend files exceed 150 lines; db/models.py is
2846 and services/discovery_service.py is 2805. Those sizes are a known
property of the codebase, not a defect list to burn down. When you touch a large
file, add your change in the local style and leave the rest alone unless
splitting it is the task you were actually given. Unrequested refactors of a
2800-line module are how a small fix becomes an unreviewable diff.
Python functions : verb_noun() poll_device(), write_telemetry()
Python classes : PascalCase TelemetryCollector, VaultService
Constants : UPPER_SNAKE MAX_RETRY_COUNT, CACHE_TTL_SECONDS
Booleans : is_/has_/can_ is_active, has_telemetry, can_retry
JSX components : PascalCase.jsx TelemetryBadge, NodeCard
React hooks : useCamelCase.js useTelemetryStream, useDiscoveryStreamAvoid single letters outside loop counters, and avoid cfg/mgr/proc/res.
Comments explain why; the code should already say what.
apps/backend/tests/ unit + service tests (pytest, asyncio_mode=auto)
tests/integration/ needs live PostgreSQL (make test-backend)
tests/build/ repo-policy/governance suites
apps/frontend/src/__tests__/ vitest, *.test.jsxBackend coverage is gated at --cov-fail-under=56, deliberately ratcheted to
the suite's measured value. Never lower it to make a red build green — the
number moves up only after real coverage clears the new figure.
New endpoints, services, and hooks need at least a happy path and one error or
edge case. Root-suite pytest runs with filterwarnings = error: a new warning
fails the run, and the fix is the underlying defect, not an ignore entry. If an
ignore is genuinely unavoidable, it must name an owner and a removal condition —
tests/build/test_skip_register.py enforces that.
make lint clean — ruff, mypy, eslintmake verify passes (or make verify-full if you touched backend logic)[module] prefixconstants.py / constants.jsprint(), no commented-out code, no secrets in the diff.js/.jsx, matching the file around them© 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-code-quality of BlkLeg/CircuitBreaker.
Open the folder on GitHubat commit fc44f2e
Cb Code Quality 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 Code Quality this skillBlkLeg/CircuitBreaker | 201 | — | ~1.9k | Automated safety check: Pass | MIT | |
| Pythonericrisco/rsc-harness | 156 | — | ~3.8k | Automated safety check: Pass | MIT | |
| Python Rulessoftspark/ai-toolkit | 179 | — | ~2.9k | Automated safety check: Pass | Apache-2.0 | |
| Kedro Babysitkedro-org/kedro | 11k | — | ~4k | Automated safety check: Pass | Custom licence | |
| Ha Code QualityFutureTense/keymaster | 349 | — | ~462 | Automated safety check: Pass | MIT | |
| Modern Pythonmycelium-io/mycelium | 119 | — | ~752 | Automated safety check: Pass | Custom licence |
ericrisco/rsc-harness
A skill your agent uses when the task is Python itself, in any framework or none: PEP 695 generics, mypy --strict typing, dataclass/Protocol/TypedDict/Enum choices, asyncio.TaskGroup, stdlib idioms…
softspark/ai-toolkit
Python coding rules: style, patterns, security, testing. An agent skill from softspark/ai-toolkit.
kedro-org/kedro
Run Kedro's local lint / format / type-check / tests on changed files (uses the project's pre-commit hooks, ruff, mypy, pytest, lint-imports, detect-secrets, Make targets — in the right venv), or…
FutureTense/keymaster
Standards and commands for linting, code formatting, typing validation (Ruff, MyPy, Codespell, ESLint, Pre-commit/Prek, Tox), and adherence to Home Assistant Python 3.14 standards in Keymaster.
mycelium-io/mycelium
Modern Python tooling practices for the mycelium project. An agent skill from mycelium-io/mycelium.
Jeffallan/claude-skills
Writes type-annotated Python 3.11+ with async patterns, dataclasses and pytest suites, validated with mypy in strict mode, black and ruff.
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…
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…
Categories
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. Cb Code Quality is an agent skill from 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.
Cb Code Quality fits situations like: tasks that involve Linting and formatting; tasks that involve Code quality; tasks that involve React components.
Run `npx skills add BlkLeg/CircuitBreaker --skill cb-code-quality -a claude-code`. Or copy the skill folder (.claude/skills/cb-code-quality in BlkLeg/CircuitBreaker) into .claude/skills/cb-code-quality in your project. Claude Code loads it when a task matches its description.
Run `npx skills add BlkLeg/CircuitBreaker --skill cb-code-quality -a codex`. Or copy the skill folder (.claude/skills/cb-code-quality in BlkLeg/CircuitBreaker) into .agents/skills/cb-code-quality 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-code-quality -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-code-quality, .gemini/skills/cb-code-quality, .github/skills/cb-code-quality and .opencode/skills/cb-code-quality in your project.
Going by SKILL.md and its folder, Cb Code Quality needs the command-line tools its instructions call (make, python and mypy). Our summary lists: Python 3.
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 Code Quality 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.5k 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 Code Quality: Python (ericrisco/rsc-harness, 156 stars), Python Rules (softspark/ai-toolkit, 179 stars), Kedro Babysit (kedro-org/kedro, 11k stars) and Ha Code Quality (FutureTense/keymaster, 349 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.