Cb Code Quality
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.
Configure and use automated code quality tools (ruff, mypy, pre-commit) for scientific Python projects.
$ npx skills add Yikai-Liao/symusic --skill code-quality-tools -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install Yikai-Liao/symusic code-quality-tools --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/Yikai-Liao/symusic.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/code-quality-tools .claude/skills/code-quality-tools && 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 "code-quality-tools" agent skill from https://github.com/Yikai-Liao/symusic/tree/main/.agents/skills/code-quality-tools into .claude/skills/code-quality-tools/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "code-quality-tools", 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/Yikai-Liao/symusic/tree/main/.agents/skills/code-quality-toolsType 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 Yikai-Liao/symusic --skill code-quality-tools -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install Yikai-Liao/symusic code-quality-tools --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Yikai-Liao/symusic.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/code-quality-tools .agents/skills/code-quality-tools && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "code-quality-tools" agent skill from https://github.com/Yikai-Liao/symusic/tree/main/.agents/skills/code-quality-tools into .agents/skills/code-quality-tools/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "code-quality-tools", 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 Yikai-Liao/symusic --skill code-quality-tools -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install Yikai-Liao/symusic code-quality-tools --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Yikai-Liao/symusic.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/code-quality-tools .cursor/skills/code-quality-tools && 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 "code-quality-tools" agent skill from https://github.com/Yikai-Liao/symusic/tree/main/.agents/skills/code-quality-tools into .cursor/skills/code-quality-tools/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "code-quality-tools", 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/Yikai-Liao/symusic.git --path .agents/skills/code-quality-tools--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 Yikai-Liao/symusic --skill code-quality-tools -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install Yikai-Liao/symusic code-quality-tools --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Yikai-Liao/symusic.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/code-quality-tools .gemini/skills/code-quality-tools && 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 "code-quality-tools" agent skill from https://github.com/Yikai-Liao/symusic/tree/main/.agents/skills/code-quality-tools into .gemini/skills/code-quality-tools/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "code-quality-tools", 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 Yikai-Liao/symusic code-quality-toolsInstalls 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 Yikai-Liao/symusic --skill code-quality-tools -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/Yikai-Liao/symusic.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/code-quality-tools .github/skills/code-quality-tools && 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 "code-quality-tools" agent skill from https://github.com/Yikai-Liao/symusic/tree/main/.agents/skills/code-quality-tools into .github/skills/code-quality-tools/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "code-quality-tools", 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 Yikai-Liao/symusic --skill code-quality-tools -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install Yikai-Liao/symusic code-quality-tools --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/Yikai-Liao/symusic.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/code-quality-tools .opencode/skills/code-quality-tools && 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 "code-quality-tools" agent skill from https://github.com/Yikai-Liao/symusic/tree/main/.agents/skills/code-quality-tools into .opencode/skills/code-quality-tools/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "code-quality-tools", 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.
code-quality-toolsConfigure and use automated code quality tools (ruff, mypy, pre-commit) for scientific Python projects.
Code Quality Tools is an agent skill from Yikai-Liao/symusic. Configure and use automated code quality tools (ruff, mypy, pre-commit) for scientific Python projects. Covers linting rules, type checking configuration, formatting, and CI integration.
Its SKILL.md is about 2.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 7 other files, including reference files and assets (for example `assets/pre-commit-config.yaml`, `references/common-issues.md` and `references/configuration-patterns.md`).
It sits in Development, covering Linting and formatting, Type safety and Code quality. It works with Ruff and Python. The repository describes itself as: A swift and unified toolkit for symbolic music processing. The licence is MIT.
3 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 3cdd0ee. 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:
ruffuvmypygitFrom the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
docs.astral.shpre-commit.comnumpy.orgpre-commit.cilearn.scientific-python.orgnumpydoc.readthedocs.ioFrom 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.
Code Quality Tools loads about 2.9k tokens when it runs, and up to ~5.8k if it reads all its reference files. Until then it costs about 51 tokens; SKILL.md has 1,100 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 Yikai-Liao/symusic at commit 3cdd0ee, republished under its MIT licence (© Yikai-Liao). 1,100 words, ~2,917 tokens.
.claude/skills/code-quality-tools/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.Master the essential code quality tools that keep scientific Python projects maintainable, consistent, and error-free. Learn how to configure ruff for lightning-fast linting and formatting, mypy for static type checking, and pre-commit hooks for automated quality gates. These tools help catch bugs early, enforce consistent style across teams, and make code reviews focus on logic rather than formatting.
Key Tools:
# Using uv (recommended for scientific projects)
uv add --dev ruff mypy pre-commit
# Or install into the active virtual environment
uv pip install ruff mypy pre-commit
# Initialize pre-commit
pre-commit install# Check code (linting)
ruff check .
# Fix auto-fixable issues
ruff check --fix .
# Format code
ruff format .
# Check and format together
ruff check --fix . && ruff format .# Type check entire project
mypy src/
# Type check with strict mode
mypy --strict src/
# Type check specific file
mypy src/mymodule/analysis.py
# Generate type coverage report
mypy --html-report mypy-report src/# Run all hooks on all files
pre-commit run --all-files
# Run hooks on staged files only
pre-commit run
# Update hook versions
pre-commit autoupdate
# Skip hooks temporarily (not recommended)
git commit --no-verifyNeed to enforce code style and catch common errors?
YES → Use Ruff (linting + formatting)
NO → Skip to type checking
Want to catch type-related bugs before runtime?
YES → Add MyPy
NO → Ruff alone is sufficient
Need to ensure checks run automatically?
YES → Set up pre-commit hooks
NO → Run tools manually (not recommended for teams)
Working with legacy code without type hints?
YES → Start with Ruff only, add MyPy gradually
NO → Use both Ruff and MyPy from the startUse this skill to establish or improve code quality practices in scientific Python projects:
Ruff is a blazingly fast Python linter and formatter written in Rust that replaces multiple tools you might be using today.
What Ruff Replaces:
Why Ruff for Scientific Python:
Ruff is 10-100x faster than traditional tools, which matters when you have large codebases with thousands of lines of numerical code. Instead of managing multiple configuration files and tool versions, you get a single tool that handles everything. Ruff can auto-fix most issues automatically, saving time during development. It includes NumPy-aware docstring checking, understanding the conventions used throughout the scientific Python ecosystem. Best of all, it's compatible with existing black and flake8 configurations, making migration straightforward.
Example:
# Before ruff format
import sys
import os
import numpy as np
def calculate_mean(data):
return np.mean(data)
# After ruff format
import os
import sys
import numpy as np
def calculate_mean(data):
return np.mean(data)Ruff automatically organizes imports (standard library, third party, local) and applies consistent formatting.
MyPy analyzes type hints to catch errors before your code ever runs. This is especially valuable in scientific computing where dimension mismatches and type errors can lead to subtle bugs in numerical calculations.
Example of what MyPy catches:
import numpy as np
from numpy.typing import NDArray
def calculate_mean(data: NDArray[np.float64]) -> float:
"""Calculate mean of array."""
return float(np.mean(data))
# MyPy catches this error at type-check time:
result: int = calculate_mean(np.array([1.0, 2.0, 3.0]))
# Error: Incompatible types (expression has type "float", variable has type "int")Benefits for Scientific Code:
Type hints catch dimension mismatches in array operations before you run expensive computations. They validate function signatures, ensuring you pass the right types to numerical functions. Type hints serve as documentation, making it clear what types functions expect and return. They prevent None-related bugs that can crash long-running simulations. Modern IDEs use type hints to provide better autocomplete and inline documentation.
Pre-commit runs checks automatically before each commit, ensuring code quality standards are maintained without manual intervention.
Workflow:
git commitThis ensures that code quality issues are caught immediately, before they enter the codebase.
See assets/pyproject-ruff-mypy.toml for complete Ruff and MyPy configuration examples.
See assets/pre-commit-config.yaml for pre-commit hook configuration.
See references/configuration-patterns.md for detailed patterns including:
See references/type-hints.md for type hint patterns including:
See references/common-issues.md for solutions to:
pyproject.toml with tool configurations.pre-commit-config.yamlpre-commit install to enable git hookspre-commit run --all-files to check existing codeuv run or in project automationuv run workflows for common quality checksruff check --fix before committingruff format before committing# type: ignore without reason)--no-verifypre-commit autoupdate)Code quality tools are essential for maintaining scientific Python projects. Ruff provides fast, comprehensive linting and formatting. MyPy catches type errors before runtime. Pre-commit automates quality checks in your workflow.
Key takeaways:
Start with ruff for immediate impact as it replaces multiple tools with a single fast solution. Add mypy gradually as you add type hints to catch bugs early. Use pre-commit to enforce standards automatically without manual intervention. Integrate with uv for reproducible development environments. Configure tools in pyproject.toml for centralized management. Run quality checks in CI/CD to maintain standards across the team.
Next steps:
Set up ruff and pre-commit in your project today. Add type hints to new functions you write. Gradually increase mypy strictness as your codebase matures. Share configurations with your team for consistency. Integrate quality checks into your development workflow.
Quality tools save time by catching errors early and maintaining consistency across your scientific codebase. They make code reviews more productive by automating style discussions, allowing reviewers to focus on scientific correctness and algorithmic choices rather than formatting details.
© Yikai-Liao, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 5 other files (references, assets) in .agents/skills/code-quality-tools of Yikai-Liao/symusic.
Open the folder on GitHubat commit 3cdd0ee
Code Quality Tools 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 |
|---|---|---|---|---|---|---|
| Code Quality Tools this skillYikai-Liao/symusic | 189 | — | ~2.9k | Automated safety check: Pass | MIT | |
| Cb Code QualityBlkLeg/CircuitBreaker | 201 | — | ~1.9k | Automated safety check: Pass | MIT | |
| Vibe Python Style Guidemistralai/mistral-vibe | 5.1k | — | ~1.2k | Automated safety check: Pass | Apache-2.0 | |
| Minimizing Ty Ecosystem Changesastral-sh/ruff | 50k | — | ~4.6k | Automated safety check: Pass | MIT | |
| Kedro Babysitkedro-org/kedro | 11k | — | ~4k | Automated safety check: Pass | Custom licence | |
| Update Dependenciesalorence/django-modern-rpc | 111 | — | ~1.3k | Automated safety check: Pass | MIT |
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.
mistralai/mistral-vibe
Python conventions for the Mistral Vibe codebase covering style, strict typing, imports, Pydantic patterns, logging, error handling and file I/O.
astral-sh/ruff
A skill your agent uses when a user says "minimize this ty ecosystem change", "reproduce this ecosystem result", "investigate a primer difference", "investigate a mypyprimer difference"…
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…
alorence/django-modern-rpc
Routine update of all project dependencies — uv itself, uv.lock (all groups), tool versions pinned in GitHub workflows and .pre-commit-config.yaml (uv, ruff, mypy...), and SHA-pinned GitHub Actions.
google/adk-recipes
Brings a Python recipe's pyproject.toml in line with the repo's CI rules, either as a read-only dry run or by rewriting the file while keeping comments.
Yikai-Liao/symusic
Master the uv package manager for fast Python dependency management, virtual environments, and modern Python project workflows.
Yikai-Liao/symusic
Analyzes code diffs and files to identify bugs, security vulnerabilities (SQL injection, XSS, insecure deserialization), code smells, N+1 queries, naming issues, and architectural concerns, then…
Yikai-Liao/symusic
Writes, optimizes, and debugs C++ applications using modern C++20/23 features, template metaprogramming, and high-performance systems techniques.
Yikai-Liao/symusic
Create and publish distributable scientific Python packages following Scientific Python community best practices.
Yikai-Liao/symusic
Parses error messages, traces execution flow through stack traces, correlates log entries to identify failure points, and applies systematic hypothesis-driven methodology to isolate and resolve bugs.
Yikai-Liao/symusic
Creates Dockerfiles, configures CI/CD pipelines, writes Kubernetes manifests, and generates Terraform/Pulumi infrastructure templates.
Categories
Configure and use automated code quality tools (ruff, mypy, pre-commit) for scientific Python projects. Code Quality Tools is an agent skill from Yikai-Liao/symusic. Configure and use automated code quality tools (ruff, mypy, pre-commit) for scientific Python projects.
Code Quality Tools fits situations like: tasks that involve Linting and formatting; tasks that involve Type safety; tasks that involve Code quality.
Run `npx skills add Yikai-Liao/symusic --skill code-quality-tools -a claude-code`. Or copy the skill folder (.agents/skills/code-quality-tools in Yikai-Liao/symusic) into .claude/skills/code-quality-tools in your project. Claude Code loads it when a task matches its description.
Run `npx skills add Yikai-Liao/symusic --skill code-quality-tools -a codex`. Or copy the skill folder (.agents/skills/code-quality-tools in Yikai-Liao/symusic) into .agents/skills/code-quality-tools 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 Yikai-Liao/symusic --skill code-quality-tools -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/code-quality-tools, .gemini/skills/code-quality-tools, .github/skills/code-quality-tools and .opencode/skills/code-quality-tools in your project.
Going by SKILL.md and its folder, Code Quality Tools needs the command-line tools its instructions call (ruff, uv, mypy and git). Our summary lists: Python 3.
SKILL.md names 6 domains. As links in the text: docs.astral.sh, pre-commit.com, numpy.org, pre-commit.ci, learn.scientific-python.org and numpydoc.readthedocs.io. 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.
Code Quality Tools is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.9k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.9k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Code Quality Tools: Cb Code Quality (BlkLeg/CircuitBreaker, 201 stars), Vibe Python Style Guide (mistralai/mistral-vibe, 5.1k stars), Minimizing Ty Ecosystem Changes (astral-sh/ruff, 50k stars) and Kedro Babysit (kedro-org/kedro, 11k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
Yikai-Liao (a GitHub user) maintains it in Yikai-Liao/symusic, which has 189 GitHub stars. The repository holds 11 skills in this directory. The repository was last updated on August 11, 2026.
Source: Yikai-Liao/symusic on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.