This tool enforces coding standards, formats code, and verifies compilation for C, C++, and Rust projects.
Install
mkdir -p .claude/skills/lint && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/4165" && unzip -o skill.zip -d .claude/skills/lint && rm skill.zipInstalls to .claude/skills/lint
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Check code quality and formatting before committing changes. Use this to verify your changes meet our coding standards.Key capabilities
- →Validate C/C++ formatting against .clang-format
- →Apply automatic formatting to C/C++ files
- →Verify C/C++ project compilation with build.sh
- →Execute Rust lint checks via make lint
- →Check and apply Rust formatting
- →Add missing license headers to Rust source files
How it works
The skill executes specific shell commands or make targets to verify formatting and compilation. It uses clang-format for C/C++ and cargo-based tools for Rust linting and license management.
Inputs & outputs
When to use lint
- →Check C/C++ formatting
- →Run clippy on Rust code
- →Verify project builds
- →Fix formatting issues
About this skill
Lint Skill
Check code quality and formatting before committing changes.
Usage
Run this skill to check for lint errors and formatting issues.
Instructions
C Code
-
Check C/C++ formatting against
.clang-format:clang-format --dry-run -Werror <modified .c and .h files> -
If formatting check fails, apply formatting:
clang-format -i <modified .c and .h files> -
Verify the project compiles without warnings-as-errors:
./build.shThe CMake build promotes key warnings to errors (
-Werror=incompatible-pointer-types,-Werror=implicit-function-declaration). A successful build confirms these pass.
Rust Code
-
Run the lint check:
make lint -
If clippy reports warnings or errors, fix them before proceeding
-
Check formatting:
make fmt CHECK=1 -
If formatting check fails, apply formatting:
make fmt -
If license headers are missing, add them:
(cd src/redisearch_rs && cargo license-fix) # subshell: custom subcommand, no --manifest-path
Common Clippy Fixes
- Document unsafe blocks: Add
// SAFETY:comment explaining why the unsafe code is sound - Use
#[expect(...)]: Prefer over#[allow(...)]for lint suppressions
Rust-Only Quick Check
cargo clippy --manifest-path src/redisearch_rs/Cargo.toml --all-targets --all-features
When not to use it
- →Projects lacking a build.sh script
- →Non-C/C++/Rust codebases
Prerequisites
Limitations
- →Requires specific build scripts like build.sh or make
- →Rust license fixing is restricted to the src/redisearch_rs directory
How it compares
This skill automates project-specific build and linting commands instead of requiring manual execution of individual compiler or formatter flags.
Compared to similar skills
lint side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| lint (this skill) | 1 | 2mo | Review | Intermediate |
| rust-tests-guidelines | 7 | 5mo | No flags | Beginner |
| check-rust-coverage | 5 | 5mo | Review | Beginner |
| check-code-quality | 1 | 29d | Review | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by RediSearch
View all by RediSearch →You might also like
rust-tests-guidelines
RediSearch
Guidelines for writing Rust tests.
check-rust-coverage
RediSearch
Check which Rust lines are not covered by Rust tests.
check-code-quality
r3bl-org
Run comprehensive Rust code quality checks including compilation, linting, documentation, and tests. Use after completing code changes and before creating commits.
run-clippy
r3bl-org
Run clippy linting, enforce comment punctuation rules, format code with cargo fmt, and verify module organization patterns. Use after code changes and before creating commits.
move-code-quality
davila7
Analyzes Move language packages against the official Move Book Code Quality Checklist. Use this skill when reviewing Move code, checking Move 2024 Edition compliance, or analyzing Move packages for best practices. Activates automatically when working with .move files or Move.toml manifests.
pre_commit
pums974
Standardized pre-commit workflow for linting, formatting, and local quality gates.