agentleFS
TrarothTraroth/claude-dev-framework/skills/api-consistency-check/SKILL.md

api-consistency-check

Skill1 starsChanged 7 months agoMITView on GitHub

Verify that the public API of a class in the project follows consistent naming, null handling, and design conventions across the library.

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:

    After adding new public methods

    line 12
  2. Distinctive:

    When the user asks for an API review

    line 13
  3. Distinctive:

    Before releasing a new version

    line 14
  4. Distinctive:

    If no issues are found in a category, skip it entirely.

    line 78

≈ “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

API Consistency Check

When to run

  • After adding new public methods
  • When the user asks for an API review
  • Before releasing a new version

Consistency checklist

Report only findings or recommendations.

1. Naming

  • Method names follow standard conventions for the language and implemented interfaces
  • Symmetric methods use consistent naming across classes (e.g. add/remove, get/set, open/close)
  • Boolean methods use appropriate prefixes (is, has, can)
  • No abbreviations unless they are standard convention

2. Null handling

  • Methods whose result may be absent use the language-appropriate pattern (e.g. Optional<T> in Java, T | undefined in TypeScript, Optional[T] in Python)
  • Nullable types are not used where forbidden by project standards
  • Methods constrained by an interface to return null document it explicitly
  • Null checks or assertions used where the contract requires it

3. Exceptions

  • Appropriate exception types used for each error case
  • Unsupported operations documented in the API
  • No unexpected unchecked exceptions thrown without documentation
  • Exception messages are in English and descriptive

4. Symmetry

  • Methods that conceptually form pairs are symmetrical in name, signature, and return type
  • Synchronized variants expose the same public API as their unsynchronized counterparts
  • Factory or copy methods return the concrete type where appropriate

5. Documentation

  • All public methods have documentation
  • Parameters, return values, and exceptions documented where applicable
  • Overrides with different semantics have their own documentation
  • Snapshot cost documented for copy-based operations in synchronized classes

6. Versioning

  • File header version matches the build file
  • New public methods justify a minor version bump (semver)

Output format

Report findings grouped by category. For each finding, state:

  • The method or class concerned
  • The violation
  • The recommended fix

If no issues are found in a category, skip it entirely.

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.