Agent skill

Coding Standards

by apache in apache/shardingsphere

Apply Apache ShardingSphere's written coding standards when explicitly requested, or when code-implementation routes task-changed production, test, script, build, generated, or Maven POM artifacts…

Apache-2.0Auto-check passedDevelopment

Install Coding Standards

skills CLI
$ npx skills add apache/shardingsphere --skill coding-standards -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install apache/shardingsphere coding-standards --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/apache/shardingsphere.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.codex/skills/coding-standards .claude/skills/coding-standards && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
coding-standards
GitHub stars
21k
Token cost
~2.2k tokens
SKILL.md length
946 words
Files
18 (incl. scripts, references)
Skills in repo
5
Repo updated
First seen
Licence
Apache-2.0

At a glance

Apply Apache ShardingSphere's written coding standards when explicitly requested, or when code-implementation routes task-changed production, test, script, build, generated, or Maven POM artifacts…

  • Tasks that involve Code quality
  • SKILL.md covers Implementation Guidance Mode and Standalone Compliance Audit Mode
  • Runs Python scripts from its folder
  • Tasks that involve Policy and terms drafting

What it does

Coding Standards is an agent skill from apache/shardingsphere. Apply Apache ShardingSphere's written coding standards when explicitly requested, or when code-implementation routes task-changed production, test, script, build, generated, or Maven POM artifacts through repository standards. Also perform a standalone read-only compliance audit of a user-specified scope. Use CODEOFCONDUCT.md, applicable AGENTS.md rules, Checkstyle, Spotless, and other repository-defined standards, including naming and evidence-based defensive-code rules. Do not invoke independently for an…

Its SKILL.md is about 2.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 21 other files, including scripts and reference files (for example `agents/openai.yaml`, `references/rules/defensive-code.md` and `references/rules/java-annotation-order.md`).

It sits in Development, covering Code quality and Policy and terms drafting. It works with Java and SQL. The repository describes itself as: Empowering Data Intelligence with Distributed SQL for Sharding, Scalability, and Security Across All Databases. The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Code quality
  • Tasks that involve Policy and terms drafting

Example prompts

  • “/coding-standards”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit 44e364e. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 2 files in scripts/ (Python, from the files we listed), which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • apache.org

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Coding Standards loads about 2.2k tokens when it runs, and up to ~18k if it reads all its reference files. Until then it costs about 170 tokens; SKILL.md has 946 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~170
When it runs · the whole SKILL.md, loaded when a task matches
~2.2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~18k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from apache/shardingsphere at commit 44e364e, republished under its Apache-2.0 licence (© apache). 946 words, ~2,203 tokens.

Download SKILL.mdSave it as .claude/skills/coding-standards/SKILL.md (or your agent's skills folder). This skill also uses 17 other files; get the full folder from GitHub.
name
coding-standards
description
Apply Apache ShardingSphere's written coding standards when explicitly requested, or when code-implementation routes task-changed production, test, script, build, generated, or Maven POM artifacts through repository standards. Also perform a standalone read-only compliance audit of a user-specified scope. Use CODE_OF_CONDUCT.md, applicable AGENTS.md rules, Checkstyle, Spotless, and other repository-defined standards, including naming and evidence-based defensive-code rules. Do not invoke independently for an ordinary implementation already governed by code-implementation, and do not independently audit architecture, runtime ownership, caches, or lifecycle.
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->

Coding Standards

Use this Skill in exactly one of the following modes. Both modes derive compliance only from written standards that actually apply to the target files. For routing purposes, covered declaration annotations are HighFrequencyInvocation, AllArgsConstructor, RequiredArgsConstructor, NoArgsConstructor, Builder, Getter, Setter, EqualsAndHashCode, ToString, and Slf4j.

Implementation Guidance Mode

Use this mode when implementing, fixing, refactoring, or reviewing code, or when modifying or reviewing a Maven POM, unless the user explicitly requests a standalone coding-standards compliance audit. Read only the references whose conditions below match the affected files and task delta, and add each selected reference's applicable rules to one checklist grouped by governing file set.

  • Before starting a read-only code review or making the first write in an implementation task, read the portions of CODE_OF_CONDUCT.md, repository-level and path-level AGENTS.md, Checkstyle, Spotless, and other written repository standards that actually apply to every affected file.
  • For a changed or reviewed pom.xml, read Maven dependency version rules and apply them only to dependency declarations changed by the task.
  • Read Java naming rules when the task adds or changes a field, local variable, parameter, lambda, returned-value temporary or direct return, or enhanced loop. When a type declaration or its type annotations change, read Java type rules.
  • Before adding, changing, or reordering a covered declaration annotation, or when a Java declaration added or modified by the task contains at least two covered annotations, read the Java declaration annotation order rules through EOF and add each applicable rule to the checklist.
  • Read Java constructor rules before changing an explicit or generated constructor or a field that may alter its signature or behavior.
  • Before adding or changing a Java throw statement, a conditional branch that throws, a validation or precondition call, or a call to ShardingSpherePreconditions, read the Java precondition rules through EOF and add each applicable rule to the checklist.
  • Before adding or changing a Java method annotated with lombok.SneakyThrows or changing the checked-exception behavior of such a method, read the Java exception handling rules through EOF and add each applicable rule to the checklist.
  • Before adding or changing a Java declaration whose type is a java.util.Collection interface or implementation, read the Java collection declaration rules through EOF and add each applicable rule to the checklist.
  • Before adding or changing a Java expression that copies Collections.singleton, Collections.singletonMap, or Arrays.asList into ArrayList, LinkedList, HashMap, or LinkedHashMap, read the Java collection rules through EOF and add each applicable rule to the checklist.
  • Read Java expression rules before changing == or != when an operand may resolve to a named constant.
  • Before adding or changing a multi-line Java declaration header, statement, or expression, or a Java physical line that may exceed 200 characters, read the Java line-wrapping rules through EOF and add each applicable rule to the checklist.
  • For every affected Java test file, read the Java test code rules through EOF and add each applicable rule to the checklist.
  • Read defensive-code rules before adding, changing, removing, or reviewing a defensive construct.
  • Apply each rule according to whether its text governs existing code or only the current task delta, and never beyond authorized scope.
  • After the last write, manually recheck the effective task delta and only the surrounding declarations needed to evaluate every applicable checklist rule.
  • For Java, explicitly verify every applicable CODE_OF_CONDUCT.md coding rule, including declaration order; when a method uses private helpers, verify that those helpers immediately follow the caller and appear in the caller's call order, regardless of the caller's visibility.
  • For Java, explicitly verify every applicable Java declaration annotation order rule against each declaration added or modified by the task.
  • For Java, explicitly verify every applicable Java exception handling rule against each added or modified lombok.SneakyThrows annotation and the method bodies, invoked signatures, rethrown values, and contracts needed to resolve its exception types.
  • For Java, explicitly verify every applicable Java collection declaration rule against the effective task delta and the operations, callers, callees, overrides, and contracts needed to determine the least-specific required declaration type.
  • For Java, explicitly verify every applicable mutable-collection construction rule against the effective task delta and the operations, aliases, callers, callees, and contracts needed to determine whether mutability is required.
  • For Java, when line-wrapping rules were selected, explicitly verify them against each applicable declaration header, statement, and expression added or modified by the task.
  • For Java tests, explicitly verify every applicable Java test code rule against the effective task delta and the declarations and member types needed to resolve semantic applicability.
  • Recheck every other selected rule only against the task delta and the context needed to decide applicability.
  • Treat passing Checkstyle and Spotless as evidence only for the rules those tools enforce; neither result replaces the manual recheck.
  • A later write invalidates final-check evidence only for affected files and rules; recheck those portions before verification or handoff.
  • Do not invent rules from preference or nearby code, and do not report pre-existing violations outside task scope.
  • Run the applicable formatting and standards checks required by the repository workflow.
  • Do not run apply, format, or another file-modifying command unless the current task authority and repository rules authorize every possible write.
  • Do not build a complete file inventory or perform physical-line accounting in this mode.
Show full SKILL.md (88 more words)Show less

This mode constrains the current task; it is not a repository-wide audit.

Standalone Compliance Audit Mode

Use this mode only when the user explicitly asks for a coding-standards compliance audit of an exact file, package, Maven module, directory, or the whole repository. Keep the audit read-only and read the standalone compliance audit workflow through EOF; it defines reference selection, complete inventory, inspection, and reporting.

This Skill may inspect architecture, ownership, lifecycle, concurrency, and runtime paths only when those facts determine whether an applicable written coding standard is satisfied.

© apache, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 17 other files (scripts, references) in .codex/skills/coding-standards of apache/shardingsphere.

  • SKILL.md
  • agents/openai.yaml
  • references/rules/defensive-code.md
  • references/rules/java-annotation-order.md
  • references/rules/java-collections.md
  • references/rules/java-constructors.md
  • references/rules/java-exceptions.md
  • references/rules/java-expressions.md
  • references/rules/java-line-wrapping.md
  • references/rules/java-naming.md
  • references/rules/java-preconditions.md
  • references/rules/java-testing.md
  • references/rules/java-types.md
  • references/rules/maven-dependencies.md
  • references/standalone-audit.md
  • scripts/build_audit_inventory.py
  • scripts/tests
  • … and 1 more

Open the folder on GitHubat commit 44e364e

Compare with similar skills

Coding Standards next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Coding Standards compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Coding Standards this skillapache/shardingsphere21k—~2.2kAutomated safety check: PassApache-2.0
P3c Code QualityLeoYeAI/openclaw-master-skills2.2k—~2.8kAutomated safety check: PassMIT
Code Review Skillawesome-skills/code-review-skill2.1k—~2.8kAutomated safety check: NotesMIT
Code Nest Project Specxiaou61/Code-Nest770—~1.3kAutomated safety check: PassMIT
New Rule for sonar-javaSonarSource/sonar-java1.2k—~833Automated safety check: PassCustom licence
Cross-Language Coding Standardszereight/gitlab-mcp2k1 repos~1.4kAutomated safety check: PassMIT

Similar skills

  • P3c Code Quality

    LeoYeAI/openclaw-master-skills

    执行代码质量检查测试,基于阿里巴巴 P3C 规范对代码进行全面检查,包括命名规范、异常处理、并发安全、数据库规范、OOP 规范、安全规约和单元测试规范。Invoke when user needs to verify code quality against P3C standards.

    2.2k GitHub stars~2.8k tokensUpdated 2 mo ago
    DevelopmentAuto-check passed
  • Code Review Skill

    awesome-skills/code-review-skill

    Provides comprehensive code review guidance for React 19, Vue 3, Angular 17+, Svelte 5, Rust, TypeScript, Java, Java 8, PHP, Ruby, Rails, Python, Django, FastAPI, Go, C/.NET, Kotlin, Swift, Dart…

    2.1k GitHub stars~2.8k tokensUpdated 29 days ago
    DevelopmentAuto-check: notes
  • Code Nest Project Spec

    xiaou61/Code-Nest

    Code-Nest 多模块全栈项目协作规范与落点导航。Use when modifying this repository for feature development, bug fixing, refactor, API change, SQL migration, or frontend-backend联调 so changes land in the correct module…

    770 GitHub stars~1.3k tokensUpdated today
    DevelopmentAuto-check passed
  • New Rule for sonar-java

    SonarSource/sonar-java

    Official

    Sets the sonar-java conventions for adding an analyzer rule: metadata from rule-api, test locations, MethodMatchers and what not to commit or change.

    1.2k GitHub stars~833 tokensUpdated today
    DevelopmentAuto-check passed
  • Shared reference for naming, function size, complexity and error handling rules that reviewer agents apply across TypeScript, Python, Go, Rust, Java, C# and Swift.

    2k GitHub starsUsed in 1 repo~1.4k tokens
    DevelopmentAuto-check passed
  • Code Quality

    piomin/claude-ai-spring-boot

    Comprehensive code review for Java - clean code principles, API contracts, null safety, exception handling, and performance.

    1.3k GitHub stars~2.2k tokensUpdated 5 mo ago
    DevelopmentAuto-check passed

More from apache/shardingsphere

  • Review PR

    apache/shardingsphere

    Review Apache ShardingSphere or user-authorized downstream pull requests and PR discussions from public or authorized repository evidence.

    21k GitHub stars~6.4k tokensUpdated today
    Auto-check passed
  • Code Implementation

    apache/shardingsphere

    Implement, fix, refactor, or remove repository code under required scope, non-regression, verification, and review gates.

    21k GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Gen Ut

    apache/shardingsphere

    Generate standard unit tests for one or more target classes in Apache ShardingSphere; cover requested behavior and every affected SUT-owned branch, enforce an explicitly requested numeric coverage…

    21k GitHub stars~3k tokensUpdated today
    Auto-check passed
  • Analyze Issue

    apache/shardingsphere

    Used to analyze Apache ShardingSphere community issues. An agent skill from apache/shardingsphere.

    21k GitHub stars~6.5k tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Coding Standards

What does Coding Standards do?

Apply Apache ShardingSphere's written coding standards when explicitly requested, or when code-implementation routes task-changed production, test, script, build, generated, or Maven POM artifacts…. Coding Standards is an agent skill from apache/shardingsphere. Apply Apache ShardingSphere's written coding standards when explicitly requested, or when code-implementation routes task-changed production, test, script, build, generated, or Maven POM artifacts through repository standards.

When should I use Coding Standards?

Coding Standards fits situations like: tasks that involve Code quality; tasks that involve Policy and terms drafting.

How do I install Coding Standards in Claude Code?

Run `npx skills add apache/shardingsphere --skill coding-standards -a claude-code`. Or copy the skill folder (.codex/skills/coding-standards in apache/shardingsphere) into .claude/skills/coding-standards in your project. Claude Code loads it when a task matches its description.

How do I install Coding Standards in Codex?

Run `npx skills add apache/shardingsphere --skill coding-standards -a codex`. Or copy the skill folder (.codex/skills/coding-standards in apache/shardingsphere) into .agents/skills/coding-standards in your project. Codex loads it when a task matches its description.

Can I use Coding Standards in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add apache/shardingsphere --skill coding-standards -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/coding-standards, .gemini/skills/coding-standards, .github/skills/coding-standards and .opencode/skills/coding-standards in your project.

What does Coding Standards need to run?

Going by SKILL.md and its folder, Coding Standards needs Python for the scripts in its folder. Our summary lists: Python 3.

Does Coding Standards access the network?

SKILL.md names 1 domain. As links in the text: apache.org. This is read from the text; nothing was executed.

Is Coding Standards safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Coding Standards use?

Coding Standards is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Coding Standards use?

About 2.2k tokens (SKILL.md is roughly 8.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 16k tokens, read only when the agent opens those files.

What are the alternatives to Coding Standards?

Skills that share tags, products or a category with Coding Standards: P3c Code Quality (LeoYeAI/openclaw-master-skills, 2.2k stars), Code Review Skill (awesome-skills/code-review-skill, 2.1k stars), Code Nest Project Spec (xiaou61/Code-Nest, 770 stars) and New Rule for sonar-java (SonarSource/sonar-java, 1.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Coding Standards?

apache (a GitHub organization) maintains it in apache/shardingsphere, which has 20,804 GitHub stars. The repository holds 5 skills in this directory. The repository was last updated on October 7, 2026.

Source: apache/shardingsphere on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.