agentleFS
jjmrochajjmrocha/coding-skills/style-checker/SKILL.md

style-checker

Skill1 starsChanged 30 days agoMITView on GitHub

Use when checking, reviewing, or auditing code style, formatting, or naming conventions — even if the user just says 'check my code style' or 'does this follow Google style'.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 4 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If no supported-language files are detected, report this and exit.

    line 38
  2. Distinctive:

    If the user asks a style question rather than requesting a scan (e.g., "how should I name constants in Go?"), answer directly from the …

    line 42
  3. Distinctive:

    If a file has many violations of the same rule, report the first 3 occurrences and note "and N more".

    line 93
  4. Distinctive:

    Reporting test/spec files when not asked: when the user says "check my code", they almost always mean source files — deprioritize tests …

    line 101

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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

Google Style Checker

Reviews code against Google's official style guidelines for formatting and naming only. Does not check logic, architecture, or code quality (SOLID, smells). Does not auto-fix — reports violations to fix.

Supported languages: C++, C#, Go, Haskell, HTML/CSS, Java, JavaScript, JSON, Kotlin, Python, TypeScript, Shell, Markdown.

Workflow

When invoked from analyze-code: return a flat findings list (severity + file:line + rule). Skip the full report template in Step 4 — the outer audit owns the report shape.

Step 1: Identify languages and load references

Scan the repo (or the path the user provided) and, for each supported language present, load its reference file before scanning code.

LanguageReference fileDetection
Pythonreferences/python.md*.py
Javareferences/java.md*.java
JavaScriptreferences/javascript.md*.js, *.jsx, *.mjs
TypeScriptreferences/typescript.md*.ts, *.tsx
Goreferences/go.md*.go
Shellreferences/shell.md*.sh, *.bash
Markdownreferences/markdown.md*.md
C++references/cpp.md*.cc, *.cpp, *.cxx, *.h, *.hh, *.hpp
C#references/csharp.md*.cs
Haskellreferences/haskell.md*.hs, *.lhs
HTML/CSSreferences/htmlcss.md*.html, *.htm, *.css, *.scss, *.sass, *.gss
Kotlinreferences/kotlin.md*.kt, *.kts
JSONreferences/json.md*.json (data and API payloads; the reference lists tool config files to skip)

Always skip: vendor/, node_modules/, .git/, *.pb.go, *_generated.go, and any file whose first lines contain // Code generated or # Generated. Deprioritize test/spec files (*_test.go, *.spec.*, test_*.py) unless the user explicitly asks to include them.

If no supported-language files are detected, report this and exit.

Step 2: Advisor mode (optional)

If the user asks a style question rather than requesting a scan (e.g., "how should I name constants in Go?"), answer directly from the loaded reference. You can also answer, then offer to scan relevant files.

Step 3: Scan for violations

For each file, check against the reference rules. Focus on:

  • Naming conventions (case style for identifiers, packages, files)
  • Formatting (indentation, line length, brace style)
  • Import/module organization
  • Comment and documentation style

Step 4: Produce the report

# Google Style Check Report

## Summary
- Files scanned: N
- Languages: [list]
- Total violations: N (Critical: N, High: N, Medium: N, Low: N)

## Critical
### <Language>
- `path/to/file.go:12` — **Rule**: Expected `lowerCamelCase` for unexported function, found `my_Function`

## High
### <Language>
- `path/to/file.py:45` — **Rule**: Class names must use `CapWords`, found `my_class`

## Medium
### <Language>
- `path/to/file.java:88` — **Rule**: Line exceeds 100 characters (found 117)

## Low
### <Language>
- `path/to/file.ts:10` — **Rule**: Use `import type` for type-only imports

## Clean files
List any files with zero violations. Omit this section if all files have violations.

Severity Classification

SeverityWhat it covers
CriticalWrong exported/unexported casing in Go; tabs vs spaces; fundamental structure violations
HighWrong case style for identifiers (classes, functions, constants, variables)
MediumLine length, indentation size, brace placement, import ordering
LowComment formatting, blank lines, minor whitespace, optional style preferences

Tips

  • If a file has many violations of the same rule, report the first 3 occurrences and note "and N more".
  • Go projects: gofmt compliance is the source of truth — note if running gofmt would auto-fix issues.
  • See expected_outputs/sample-report.md for a full example.

Common Mistakes

  • Wrong severity for Go constants: UPPER_SNAKE_CASE in Go is Critical (breaks the fundamental MixedCaps rule), not High.
  • Scanning generated or vendored code: the Step 1 skip list is mandatory, not optional.
  • Reporting test/spec files when not asked: when the user says "check my code", they almost always mean source files — deprioritize tests unless explicitly requested.

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.