agentleFS
zilliztechzilliztech/knowhere/.agents/skills/code-quality/SKILL.md

code-quality

Skill390 starsChanged 10 days agoApache-2.0View on GitHub

Use when checking code style, running pre-commit hooks, or before committing changes to ensure compliance with Google style guide

77 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use spring-boot, logging-patterns and 9 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • ffsshhttiikkSkill

    spring-boot

    Spring Boot framework and Java enterprise patterns

    Also in 3 projects that use this

  • DIL8654Skill

    logging-patterns

    Keep logs structured, correlated, low-noise, and safe for production support. Use when adding operational logging, reviewing observability, or improving diagnostics in .NET services.

    Also in 3 projects that use this

  • mstuder-slalomSkill

    jpa-patterns

    JPA/Hibernate patterns for entity design, relationships, query optimization, transactions, auditing, indexing, pagination, and pooling in Spring Boot.

    Also in 3 projects that use this

  • ffsshhttiikkSkill

    design-patterns

    Practical application and coding skills for Design Patterns

    Also in 4 projects that use this

  • glommerSkill

    pr-workflow

    General guidelines for Commits, formatting, CI, dependencies, security

    Also in 4 projects that use this

  • vm0-aiSkill

    cli-design

    Design patterns and conventions for the Okou CLI user experience

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 71 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    When a commit is authorized, stage only the intended files and include the DCO sign-off.

    line 39

“Common” is measured: kept by at least 6 in 10 of the 71 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Code Quality

Code Style

  • Base style: Google C++ Style Guide with repository overrides
  • Line limit: 120 characters
  • Indent: 4 spaces
  • Config: See .clang-format in repo root

Pre-commit Hooks

Setup

pip3 install pre-commit
pre-commit install --hook-type pre-commit --hook-type pre-push

Usage

# Run on staged files
pre-commit run

# Run on specific files
pre-commit run --files src/index/hnsw/hnsw.cc include/knowhere/index/index.h

# Run on all files
pre-commit run --all-files

Commit Workflow

When a commit is authorized, stage only the intended files and include the DCO sign-off. Replace <changed-files> with explicit paths and follow the git-workflow skill for commit and PR titles. If hooks change files or fail, inspect the changes, fix failures, and rerun the checks before committing.

# Review and validate the intended changes
git diff --check
pre-commit run --files <changed-files>

# Review hook edits, then stage and inspect the commit contents
git add -- <changed-files>
git diff --cached
git commit -s -m "type: description"

Common Issues

IssueSolution
Formatting errorsRun clang-format -i <file> or let pre-commit fix it
Line too longBreak line at logical points, max 120 chars
Include orderFollow Google style: related header, C system, C++ standard, other libs, project headers

Installed hooks run automatically at their configured commit/push stages. Fix failures before pushing; manual checks remain available when hooks are not installed.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.