smithery.ai

coding-standard-java

Enforce Java coding standards including camelCase variables, PascalCase classes, and PascalCase filenames matching class names.

First seen Mar 30, 2026

Installation

$ npx skills add https://smithery.ai

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery.ai · top by installs.

npx skills add https://smithery.ai

Browse all from smithery.ai

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,390 B
  • docs SUMMARY.md 155 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 1 installs

SKILL.md

Java Coding Standards

When reviewing or generating Java code, follow these rules:

File Naming

  • Source files: PascalCase matching the public class name (e.g., UserService.java)
  • One public class per file: File name must match the public class name exactly
  • Test files: Class name with Test suffix (e.g., UserServiceTest.java)
  • Interface files: PascalCase (e.g., Comparable.java, UserRepository.java)

Package Naming

  • Packages: All lowercase, dot-separated (e.g., com.example.service, org.project.utils)
  • No underscores or hyphens in package names
  • Follow reverse domain name convention

Variable Naming

  • Local variables: camelCase (e.g., userName, isActive, totalCount)
  • Instance variables: camelCase (e.g., userId, createdAt)
  • Constants: UPPERSNAKECASE with static final (e.g., MAXRETRIES, DEFAULTTIMEOUT)
  • Boolean variables: Prefix with is, has, can, should (e.g., isEnabled, hasPermission)

Method Naming

  • Methods: camelCase, verb or verb phrase (e.g., calculateTotal(), getUserById())
  • Getters: get prefix (e.g., getName(), getId())
  • Setters: set prefix (e.g., setName(), setId())
  • Boolean getters: is or has prefix (e.g., isActive(), hasChildren())
  • Factory methods: create, of, from, valueOf (e.g., createInstance(), of())

Class/Interface Naming

  • Classes: PascalCase, noun or noun phrase (e.g., UserService, OrderProcessor)
  • Interfaces: PascalCase, adjective or noun (e.g., Comparable, UserRepository)
  • Abstract classes: PascalCase, optionally prefix with Abstract (e.g., AbstractHandler)
  • Exception classes: PascalCase with Exception suffix (e.g., InvalidInputException)
  • Enums: PascalCase for type, UPPERSNAKECASE for values

Generics

  • Type parameters: Single uppercase letter (e.g., T, E, K, V)
  • Meaningful names: When clarity needed (e.g., <Key, Value>)

Organization

  • Package statement first
  • Import statements (java., javax., third-party, project imports)
  • Class declaration with fields, constructors, methods
  • Public methods before private methods