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.
In this repository12 other files it gives its agents.
- architecture-drift-checkSkill
- design-reviewSkill
- jml-completeness-checkSkill
- jml-conformance-checkSkill
- jml-designSkill
- jml-test-generationSkill
- new-classSkill
- refactor-classSkill
- static-analysisSkill
- test-coverage-reviewSkill
- update-backlogSkill
- update-readmeSkill
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
- Distinctive: line 12
After adding new public methods
- Distinctive: line 13
When the user asks for an API review
- Distinctive: line 14
Before releasing a new version
- Distinctive: line 78
If no issues are found in a category, skip it entirely.
≈ “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.
Files
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 | undefinedin 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.
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
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.

