Agent skill

Check Code Quality

by r3bl-org in r3bl-org/r3bl-open-core

Run comprehensive Rust code quality checks including compilation, linting, documentation, and tests.

Apache-2.0Auto-check passedDevelopment

Install Check Code Quality

skills CLI
$ npx skills add r3bl-org/r3bl-open-core --skill check-code-quality -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install r3bl-org/r3bl-open-core check-code-quality --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/r3bl-org/r3bl-open-core.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/check-code-quality .claude/skills/check-code-quality && rm -rf skills-src

Use ~/.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/

Facts

Skill name
check-code-quality
GitHub stars
485
Token cost
~3.8k tokens
SKILL.md length
1,756 words
Files
2
Skills in repo
25
Repo updated
First seen
Licence
Apache-2.0

At a glance

Run comprehensive Rust code quality checks including compilation, linting, documentation, and tests.

  • Works in 12 steps: Fast Typecheck → Compile Production Code → Format Rustdoc Comments → …
  • Tasks that involve Code quality
  • SKILL.md covers When to Use, Non-Blocking Execution via…, Quick Approach (Recommended) and Step-by-Step Approach…, plus 7 more sections
  • Calls cargo and git

What it does

Check Code Quality is an agent skill from r3bl-org/r3bl-open-core. Run comprehensive Rust code quality checks including compilation, linting, documentation, and tests. Use after completing code changes and before creating commits.

Its SKILL.md is about 3.8k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file (for example `reference.md`).

It sits in Development, covering Code quality and Linting and formatting. It works with Rust. The repository describes itself as: TUI framework and developer productivity apps in Rust 🦀. The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Code quality
  • Tasks that involve Linting and formatting

Example prompts

  • “/check-code-quality”

Workflow steps

12 steps, taken from the step headings in SKILL.md.

  1. Fast Typecheck
  2. Compile Production Code
  3. Format Rustdoc Comments
  4. Generate Documentation
  5. Link Rot Check (External URLs)
  6. Clean Inline Crate Prefixes
  7. Git Diff Audit (Surgical Precision)
  8. Linting
  9. Concurrency Safety Check
  10. Bounds Safety Check
  11. Audit Test Coverage (Zero Bloat) on Modified Files
  12. Run All Tests

What it can do on your machine

Read from SKILL.md and the folder at commit 89db352. It shows what the files ask for, not the result of running them.

  • Tool permissions

    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.

  • Runs code

    Shell commands in SKILL.md call:

    • cargo
    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Check Code Quality loads about 3.8k tokens when it runs. Until then it costs about 46 tokens; SKILL.md has 1,756 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~46
When it runs · the whole SKILL.md, loaded when a task matches
~3.8k

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.

Safety

Auto-check passed

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.

SKILL.md

The full file from r3bl-org/r3bl-open-core at commit 89db352, republished under its Apache-2.0 licence (© r3bl-org). 1,756 words, ~3,752 tokens.

Download SKILL.mdSave it as .claude/skills/check-code-quality/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
check-code-quality
description
Run comprehensive Rust code quality checks including compilation, linting, documentation, and tests. Use after completing code changes and before creating commits.

Rust Code Quality Checks

When to Use

  • After completing significant code changes
  • Before creating commits
  • Before creating pull requests
  • When user says "check code quality", "run quality checks", "make sure code is good", etc.

Non-Blocking Execution via Subagents

Long-running verification commands (such as ./check.fish --test, ./check.fish --doc, ./check.fish --quick-doc, and ./check.fish --full) can take multiple minutes. To keep the primary conversation responsive and unblocked:

  1. Fast Synchronous Checks: Lightweight checks like ./check.fish --check (fast typecheck) and ./check.fish --fmt take only a few seconds and can run directly in the conversation.
  2. Long-Running Checks via Subagent: Delegate time-consuming checks to a background subagent (e.g., invoke_subagent with TypeName: "self").
  3. Continuous Collaboration: While the subagent runs tests or builds docs in the background, the primary agent remains completely free to converse, review diffs, answer questions, or plan next steps with the user.

Run the comprehensive check script which handles everything automatically:

bash
./check.fish --full

This runs all checks in order: typecheck → build → clippy → tests → doctests → docs

Benefits of using check.fish --full:

  • ICE recovery: Automatically cleans cache and retries on Internal Compiler Errors
  • Toolchain escalation: If ICE persists, escalates to rust-toolchain-update.fish to find a stable nightly
  • Config change detection: Auto-cleans stale artifacts when Cargo.toml or toolchain changes
  • Performance optimized: Uses tmpfs, ionice, and parallel jobs for speed
Other check.fish Commands

For granular control, use individual commands:

CommandWhat it runs
./check.fish --checkcargo check (fast typecheck)
./check.fish --buildcargo build (compile production)
./check.fish --clippycargo clippy --all-targets (linting)
./check.fish --fmtcargo fmt + cargo rustdoc-fmt on git-changed files
./check.fish --testcargo test + doctests
./check.fish --doccargo doc --no-deps (quick docs)
./check.fish --quick-doccargo doc --no-deps (fastest, no staging/sync)
./check.fish --fullAll of the above + lychee link rot check

Step-by-Step Approach (Alternative)

If you need more control or want to run checks manually:

1. Fast Typecheck
bash
./check.fish --check
# (runs: cargo check)

Quickly verifies the code compiles without generating artifacts.

2. Compile Production Code
bash
./check.fish --build
# (runs: cargo build)

Ensures production code builds successfully.

3. Format Rustdoc Comments

Invoke the write-documentation skill to format rustdoc comments using cargo rustdoc-fmt.

This formats markdown tables, converts inline links to reference-style, and ensures dashes, en dashes, or em dashes (-, –, or —) are not used to connect sentences/clauses (prefer separate sentences or colons/semicolons).

4. Generate Documentation
bash
./check.fish --quick-doc
# (runs: cargo doc --no-deps, directly to serving dir - fastest for iteration)

Verify there are no documentation build warnings or errors. Use --quick-doc for fast feedback during development. Use --doc for final verification before commits (includes staging/sync).

If there are link warnings, use the /fix-intradoc-links command to resolve them.

Heading Anchor (Slug) Integrity: If you modified any heading text (e.g., # My Heading), the automatically generated HTML anchor (e.g., #my-heading) will change.

  • Identify Changes: Look for changed headings in git-dirty files.
  • Proactive Search: Use grep_search to find any existing links (e.g., path#old-slug) that point to the old anchors and update them.
  • Validation: While cargo doc warns about many broken fragments, proactive searching prevents "orphan" links in external documentation or complex intra-doc paths.

CRITICAL: Never remove intra-doc links to fix warnings. When you encounter:

  • Unresolved link to a symbol → Fix the path using crate:: prefix (see write-documentation skill)
  • Unresolved link to a test module → Add #[cfg(any(test, doc))] visibility (see organize-modules skill)
  • Unresolved link to a platform-specific module → Use #[cfg(all(any(test, doc), target_os = "..."))]

Links provide refactoring safety - cargo doc catches stale references. Converting to plain backticks removes this protection.

Included automatically in ./check.fish --full. Runs lychee on git-modified files to detect broken external URLs in rustdoc comments.

cargo doc --no-deps (step 4) validates intra-doc links but not external HTTP/HTTPS URLs. lychee fills that gap. Config in lychee.toml (repo root) excludes known false positives (example file:// URIs, test fixture URLs, sites that block automated requests).

If lychee reports 404s, fix the URL by finding the new location. See the task file task/add-lychee-to-detect-link-rot.md for the full categorization of findings.

6. Clean Inline Crate Prefixes

Invoke the remove-crate-prefix skill to ensure the codebase follows the strict "Clean Imports over Inline Absolute Paths" rule before finalizing quality checks.

7. Git Diff Audit (Surgical Precision)
bash
git diff

Inspect git diff on all modified files to audit line-by-line that only intended modifications were made and zero collateral formatting, lost comments, or doc section drift occurred.

8. Linting
bash
./check.fish --clippy
# or invoke the `run-clippy` skill

Runs clippy and enforces code style standards. You MUST fix all warnings. Do not just report them. If ./check.fish --clippy reports warnings, use cargo clippy --all-targets --fix --allow-dirty to auto-fix where possible, and manually fix any remaining warnings. Never ignore warnings during a quality check.

9. Concurrency Safety Check

Invoke the concurrency-safety skill to verify thread-safety patterns.

Checklist:

  • Loud Lock Releases: Are drop(guard) calls explicit and as early as possible?
  • Chain of Custody: Are MutexGuards passed and returned by value to prevent stale usage?
  • Ergonomic Atomics: Is AtomicU8Ext used instead of raw load/store?
  • No Deadlocks: Are locks released before calling macros or long-running async blocks?
10. Bounds Safety Check

Invoke the check-bounds-safety skill to verify index and length handling.

Checklist:

  • Type Safety: Are Index and Length types used instead of raw usize?
  • Correct Trait: Is ArrayBoundsCheck used for buffer access and CursorBoundsCheck for positioning?
  • CSI Zero Prevention: Are TermRowDelta and TermColDelta used for relative cursor movement?
  • Off-by-One: verify index < length for access and index <= length for cursor.
11. Audit Test Coverage (Zero Bloat) on Modified Files

For every source file that is modified in the current working tree, invoke the check-test-coverage skill:

  • Branch-Targeted Verification: Ensure all custom logic branches, match arms, error paths, and state transitions are covered by tests.
  • Eliminate Test Bloat: Confirm zero test bloat (no redundant tests asserting standard library behaviors, compiler derives like #[derive(Default)], or third-party macros like strum and clap).
  • One Test per Branch: Confirm that each test serves a distinct purpose covering our code.
12. Run All Tests
bash
./check.fish --test
# (runs: cargo test --all-targets && cargo test --doc)

Runs all tests (unit, integration, doctests).

  • Test Scope Principle: Ensure tests strictly target our codebase's branches, state transitions, and logic paths (see organize-tests skill). Do NOT write redundant tests that merely re-verify standard library or third-party crate behaviors.
  • If tests fail, use the Task tool with subagent_type='test-runner' to fix failures.
13. Stress Test (Optional - After Major Refactors)

After major refactors or changes that affect process spawning, PTY tests, or async infrastructure, run the full test suite 20 times back-to-back to detect flaky regressions:

bash
for i in {1..20}; do echo "=== Run $i/20 ===" && cargo test --all-targets -- --nocapture 2>&1 | grep -E "^test result:" | head -3 || { echo "FAILED on run $i"; exit 1; }; done && echo "ALL 20 RUNS PASSED"

When to run:

  • After refactoring PTY test infrastructure (generate_pty_test!, spawn_controlled_in_pty)
  • After changes to process lifecycle, signal handling, or async I/O code
  • After modifying the resilient reactor thread (RRT) restart logic
  • Before merging large cross-cutting changes that touch many test files
Show full SKILL.md (695 more words)Show less
14. Cross-Platform Verification (Optional)

For code with platform-specific #[cfg] gates (especially Unix-only code), verify Windows compatibility:

bash
cargo rustc -p <crate_name> --target x86_64-pc-windows-gnu -- --emit=metadata

This checks that #[cfg(unix)] and #[cfg(not(unix))] gates compile correctly on Windows without needing a full cross-compiler toolchain.

When to run:

  • After adding or modifying #[cfg(unix)] or #[cfg(target_os = "...")] attributes
  • When working on platform-abstraction code
  • Before committing changes to DirectToAnsi input handling or other Unix-specific code
15. Final Step: Manual Review

A task, phase, or sub-phase is not complete until a manual review has been performed by the user. This is the final verification before marking a task as done.

  • Type-Safe Errors: Did you use custom error types (enums/structs with thiserror and miette) instead of raw String for Result errors?
  • No .and_then(): Did you avoid using .and_then() for Option/Result combinators, preferring idiomatic ? operator early returns instead?
  • Technical Precision: are terms like "parameter", "argument", "declaration", and "definition" used accurately in documentation and comments? See the Terminology Precision guide.
  • No Connecting Dashes/En Dashes/Em Dashes: Are dashes, en dashes, or em dashes (-, –, or —) avoided when connecting sentences or clauses in doc comments? (Prefer separate sentences, colons, or semicolons).
  • Mandatory Checkbox List: You MUST automatically add a "Mandatory manual review" step with a checkbox list of all modified files to the end of every task, phase, and sub-phase you create or update.
  • Review Workflow: When the user prompts for a manual review at the end of a task/phase/sub-phase:
    1. Use run_shell_command("codium-insider <file_path>") to open the first file with a checkbox.
    2. Ask the user to manually review it.
    3. Once the user confirms ("good" or similar), check the box in the task file using replace.
    4. Move to the next file and repeat until all checkboxes are checked.
  • Completion: Do not mark the task/phase as complete in the task file until ALL file-level checkboxes are checked and the user has given final approval.

ICE Recovery and Toolchain Escalation

The ./check.fish --full command includes automatic recovery from Internal Compiler Errors:

ICE detected → cleanup target/ → retry
                                   ↓
                            still ICE?
                                   ↓
              escalate to rust-toolchain-update.fish
              (searches 46 nightly candidates, validates each)
                                   ↓
                         new stable nightly installed
                                   ↓
                               retry checks

This is especially important since we use nightly Rust (for the parallel compiler frontend). Nightly toolchains occasionally have ICE bugs, and this automatic escalation finds a working version.

Reporting Results

After running all checks, report results concisely to the user:

  • ✅ All checks passed → "All quality checks passed! Ready to commit."
  • ⚠️ Some checks failed → Summarize which steps failed and what needs fixing
  • 🔧 Auto-fixed issues → Report what was automatically fixed

Communication Guardrails (Anti-Hallucination)

When performing quality checks or complex refactorings:

  1. Frequent Status Reports: Provide a concise summary of progress every 3-5 file modifications.
  2. Milestone Review Pauses: Stop and request a manual review after any meaningful progress (e.g., refactoring is complete and cargo check passes).
  3. Attention Signal: Run fish -c "beep" when stopping for a mandatory review point to alert the user.
  4. Validation First: Never present broken code to the user. Always run ./check.fish --check or cargo check before asking for a review.
  5. Strict Documentation Preservation: Maintain absolute byte-perfect integrity of surrounding documentation when performing surgical edits.
  6. Mandatory Manual Review: Follow the file-by-file codium-insider review workflow described in the "Final Step" section above for all modified files.

Optional Performance Analysis

For performance-critical code changes, consider also running:

  • cargo bench - Benchmarks (mark tests with #[bench])
  • cargo flamegraph - Profiling (requires flamegraph crate)
  • Invoke the analyze-performance skill for flamegraph-based regression detection

Supporting Files in This Skill

This skill includes additional reference material:

  • reference.md - Comprehensive guide to all cargo commands used in the quality checklist. Includes detailed explanations of what each command does, when to use it, common flags, and build optimizations (wild linker, parallel frontend, tmpfs). Read this when:
    • You need to understand what a specific cargo command does
    • Troubleshooting build issues
    • Want to know about build optimizations in .cargo/config.toml
    • Understanding the difference between cargo test --all-targets and cargo test --doc
  • write-documentation - For rustdoc formatting (step 3) and fixing doc link warnings (step 4)
  • run-clippy - For linting and code style (step 8)
  • concurrency-safety - For lock and atomic safety (step 9)
  • check-bounds-safety - For type-safe index/length handling (step 10)
  • check-test-coverage - For branch-targeted test coverage and zero bloat audit on modified files (step 11)
  • analyze-performance - For optional performance checks
  • test-runner agent - For fixing test failures (step 12)
  • /check - Explicitly invokes this skill

© r3bl-org, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in .agents/skills/check-code-quality of r3bl-org/r3bl-open-core.

  • SKILL.md
  • reference.md

Open the folder on GitHubat commit 89db352

Compare with similar skills

Check 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.

Check Code Quality compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Check Code Quality this skillr3bl-org/r3bl-open-core485—~3.8kAutomated safety check: PassApache-2.0
Code Qualitywaybarrios/opencode-power-pack533—~1.8kAutomated safety check: PassMIT
Install Anti-Slop Oxlint Rulesdmmulroy/anti-slop5.2k—~2.2kAutomated safety check: PassMIT
Rust Best Practicesfarm-fe/farm5.6k3 repos~1.1kAutomated safety check: PassMIT
Add Opik Code Quality Hookcomet-ml/opik22k—~2.3kAutomated safety check: PassApache-2.0
LobeHub Alint Rule Set Maintenancelobehub/lobehub83k—~1.9kAutomated safety check: PassCustom licence

Similar skills

  • Code Quality

    waybarrios/opencode-power-pack

    Agents should invoke this skill for code reviews, linting/formatting setup, maintainability checks, complexity concerns, warning cleanup, coding standards, or quality gates in Rust, TypeScript…

    533 GitHub stars~1.8k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Installs, updates or migrates the vendored anti-slop Oxlint plugin in a repository, keeping local rule changes and the plugin's license and provenance files.

    5.2k GitHub stars~2.2k tokensUpdated 27 days ago
    DevelopmentAuto-check passed
  • Guide for writing idiomatic Rust code based on Apollo GraphQL's best practices handbook.

    5.6k GitHub starsUsed in 3 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Checklist for wiring a new linter into Opik's Code Quality pipeline: the four files to edit, the silent-failure gotchas and the pass/fail verification loop.

    22k GitHub stars~2.3k tokensUpdated today
    DevelopmentAuto-check passed
  • Maintains LobeHub's model-backed alint rule set: writing rules, removing false positives against real code, deciding warn versus error and tracking token cost.

    83k GitHub stars~1.9k tokensUpdated today
    DevelopmentAuto-check passed
  • Code Quality Gate

    fengshao1227/ccg-workflow

    Scans code for complexity, long functions, duplicated blocks, naming problems and code smells with a Node script, then reports and suggests refactors.

    5.9k GitHub stars~593 tokensUpdated 22 days ago
    DevelopmentAuto-check: notes

More from r3bl-org/r3bl-open-core

All 25 skills in this repo
  • Analyze Log Files

    r3bl-org/r3bl-open-core

    Analyze log files by stripping ANSI escape sequences first. An agent skill from r3bl-org/r3bl-open-core.

    485 GitHub stars~632 tokensUpdated yesterday
    Auto-check: notes
  • Analyze Performance

    r3bl-org/r3bl-open-core

    Establish performance baselines and detect regressions using flamegraph analysis.

    485 GitHub stars~2k tokensUpdated yesterday
    Auto-check passed
  • Check Bounds Safety

    r3bl-org/r3bl-open-core

    Apply type-safe bounds checking patterns using VPIndex/VPLength types instead of usize.

    485 GitHub stars~4.1k tokensUpdated yesterday
    Auto-check passed
  • Release Crate

    r3bl-org/r3bl-open-core

    Publish a crate release to crates.io with changelog, standalone release notes, git tag, and GitHub release.

    485 GitHub stars~2.4k tokensUpdated yesterday
    Auto-check passed
  • Organize Modules

    r3bl-org/r3bl-open-core

    Apply private modules with public re-exports (barrel export) pattern for clean API design.

    485 GitHub stars~5.8k tokensUpdated yesterday
    Auto-check passed
  • Check Test Coverage

    r3bl-org/r3bl-open-core

    Audit and verify test coverage for a specific file or module, ensuring all custom logic branches, state transitions, and boundary conditions are covered while strictly eliminating dependency test…

    485 GitHub stars~1.7k tokensUpdated yesterday
    Auto-check passed

Works with

Categories

Questions about Check Code Quality

What does Check Code Quality do?

Run comprehensive Rust code quality checks including compilation, linting, documentation, and tests. Check Code Quality is an agent skill from r3bl-org/r3bl-open-core. Run comprehensive Rust code quality checks including compilation, linting, documentation, and tests.

When should I use Check Code Quality?

Check Code Quality fits situations like: tasks that involve Code quality; tasks that involve Linting and formatting.

How do I install Check Code Quality in Claude Code?

Run `npx skills add r3bl-org/r3bl-open-core --skill check-code-quality -a claude-code`. Or copy the skill folder (.agents/skills/check-code-quality in r3bl-org/r3bl-open-core) into .claude/skills/check-code-quality in your project. Claude Code loads it when a task matches its description.

How do I install Check Code Quality in Codex?

Run `npx skills add r3bl-org/r3bl-open-core --skill check-code-quality -a codex`. Or copy the skill folder (.agents/skills/check-code-quality in r3bl-org/r3bl-open-core) into .agents/skills/check-code-quality in your project. Codex loads it when a task matches its description.

Can I use Check Code Quality in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add r3bl-org/r3bl-open-core --skill check-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/check-code-quality, .gemini/skills/check-code-quality, .github/skills/check-code-quality and .opencode/skills/check-code-quality in your project.

What does Check Code Quality need to run?

Going by SKILL.md and its folder, Check Code Quality needs the command-line tools its instructions call (cargo and git).

Does Check Code Quality access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Check Code Quality safe to install?

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.

What licence does Check Code Quality use?

Check Code Quality is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Check Code Quality use?

About 3.8k tokens (SKILL.md is roughly 15k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Check Code Quality?

Skills that share tags, products or a category with Check Code Quality: Code Quality (waybarrios/opencode-power-pack, 533 stars), Install Anti-Slop Oxlint Rules (dmmulroy/anti-slop, 5.2k stars), Rust Best Practices (farm-fe/farm, 5.6k stars) and Add Opik Code Quality Hook (comet-ml/opik, 22k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Check Code Quality?

r3bl-org (a GitHub organization) maintains it in r3bl-org/r3bl-open-core, which has 485 GitHub stars. The repository holds 25 skills in this directory. The repository was last updated on October 6, 2026.

Source: r3bl-org/r3bl-open-core on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.