# lint

Checks formatting and lint rules for C and Rust code prior to committing. Catches style mismatches and flags strict build warnings.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · ★ 6244 repo stars
- Author: RediSearch
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/RediSearch/RediSearch/tree/HEAD/.skills/lint/SKILL.md
- Updated: 2026-10-29
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/lint

## What it does

This skill outlines verification steps before committing code to RediSearch. For C and C++, it executes `clang-format` using rules from `.clang-format` with the `-Werror` flag. If issues arise, it formats files in place. Next, `./build.sh` runs to guarantee that critical warnings like implicit function declarations or incompatible pointer types cause immediate build failures.

On the Rust side, the instructions handle `make lint` and formatting checks via `make fmt CHECK=1`. A targeted check can run directly through `cargo clippy` targeting `src/redisearch_rs/Cargo.toml`. When copyright notes are missing, the skill calls `cargo license-fix` inside the `src/redisearch_rs` directory.

Every `unsafe` block strictly needs an accompanying `// SAFETY:` comment, while lint suppressions must use `#[expect(...)]` over `#[allow(...)]`.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add RediSearch/RediSearch --skill lint -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/lint/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/lint/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add RediSearch/RediSearch --skill lint -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/lint/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add RediSearch/RediSearch --skill lint -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/lint/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install RediSearch/RediSearch .skills/lint/SKILL.md
```

2. **Manually: put the files in place**
- File: `.github/skills/lint/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add RediSearch/RediSearch --skill lint -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/RediSearch/RediSearch --path .skills/lint
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/lint/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add RediSearch/RediSearch --skill lint -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/RediSearch/RediSearch/tree/HEAD/.skills/lint/SKILL.md

## When to use it
- verify C and C++ source formatting against `.clang-format`
- run Clippy inspections and formatting checks across Rust packages
- insert missing project license headers with `cargo license-fix`
- annotate unsafe Rust blocks with required `// SAFETY:` remarks

## Example prompts
- Check formatting on modified C sources and verify the build
- Run clippy on the Rust components and list all warnings
- Apply missing license headers to files in redisearch_rs

## Similar
- [lint-fix](https://affpapa.org/en/nevibecode/commands/lint-fix.md) — command · ★ 1424 repo stars
- [lint-check](https://affpapa.org/en/nevibecode/commands/lint-check.md) — command · ★ 1424 repo stars
- [rust-best-practices](https://affpapa.org/en/nevibecode/skills/rust-best-practices.md) — skill · 23400 installs
- [bugfix-crate](https://affpapa.org/en/nevibecode/skills/bugfix-crate.md) — skill · 117 installs
- [rust-coder](https://affpapa.org/en/nevibecode/skills/rust-coder.md) — skill · ★ 869 repo stars
- [verify](https://affpapa.org/en/nevibecode/skills/mag123c-verify.md) — skill · ★ 196 repo stars

From the same set: [redisearch/redisearch](https://affpapa.org/en/nevibecode/by/redisearch/redisearch.md) — 4 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
