shardingsphere: Skill for Codex

.codex/skills/gen-ut/SKILL.md

gen-ut is a skill for Codex from apache/shardingsphere. It costs 60 tokens per session (2,605 once invoked), scanned A, original, Apache-2.0.

A workflow for generating unit tests, which test individual classes or small pieces of code, for Apache ShardingSphere classes.

In plain words
What is it for?
Use it to find or create the matching test class, analyze existing coverage, improve parameterized tests, and run the relevant Maven tests.
Why use it?
It helps uncover missing branches and behavior while keeping tests focused on what the target class owns.

Skill for Codex ✓ vendor

Written for Codex: agents/openai.yaml present. Also seen: mentions AGENTS.md.

This is apache/shardingsphere's own configuration. It tells Codex how to work on shardingsphere itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything shardingsphere configures →

About the project

Apache ShardingSphere is a database enhancement layer that makes heterogeneous databases easier to access and govern as a unified system, without replacing the underlying databases. It supports distributed database capabilities such as sharding, read-write splitting, SQL federation, encryption, masking, auditing, and traffic control for enterprise data architectures.

apache/shardingsphere · 20,817 stars · on GitHub

Reuse

Borrowing it

Nothing to install: this file belongs to apache/shardingsphere. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/apache/shardingsphere/master/.codex/skills/gen-ut/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/apache/shardingsphere

Made for: Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for gen-ut

README.md
[![agentmods](https://agentmods.dev/badge/skills/apache/shardingsphere/gen-ut/github.svg)](https://agentmods.dev/skills/apache/shardingsphere/gen-ut)
Your own site
<a href="https://agentmods.dev/skills/apache/shardingsphere/gen-ut"><img src="https://agentmods.dev/badge/skills/apache/shardingsphere/gen-ut/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for gen-ut

Your own site · 80×15
<a href="https://agentmods.dev/skills/apache/shardingsphere/gen-ut"><img src="https://agentmods.dev/badge/skills/apache/shardingsphere/gen-ut.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 60 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,605 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Snyk pass 7 Sept 2026
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00060 $0.02605
Opus 5.5 $0.00024 $0.01042
Sonnet 5.5 $0.00012 $0.00521
Haiku 4.5 $0.00006 $0.00261

Measured 7d ago against content hash 2bf33a09f4b8, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

gen-ut scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

The scan reads SKILL.md. This mod also ships 4 executable files (scripts/guard_task_scope.py, scripts/scan_quality_rules.py, tests/test_guard_task_scope.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.codex/skills/gen-ut/SKILL.md · 184 lines

How it starts

The opening of the file, as written. The whole thing — 184 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Generate Unit Tests

Inputs and Scope

Require target production classes, preferably as fully-qualified names. Accept an optional module and optional test-class execution filter. Discover related tests by the exact <TargetClassName>Test convention and update them in place; create that class only when none exists.

Resolve:

  • <ResolvedTargetClasses>: requested production classes.
  • <ResolvedTestFileSet>: only related test Java files and required test resources that may be edited.
  • <ResolvedTestModules>: explicit Maven modules owning those tests.
  • <ResolvedTestClass>: focused test-class filter for execution.

Use an explicitly supplied module first. Otherwise resolve the nearest owning pom.xml from test files, then target sources. If target classes or modules cannot be resolved, return R10-INPUT_BLOCKED.

Ownership Terms

  • SUT-owned behavior: decisions, branches, state changes, calls, results, or error handling owned by the target class.
  • Collaborator-owned behavior: behavior computed by an SPI, registry, factory, parser, loader, driver, dialect, metadata option, or another dependency.
  • Testing through layers: driving or asserting collaborator-owned rules instead of mocking the result consumed by the target.
  • KEEP:<id>:<reason>: evidence for retaining an otherwise redundant candidate because removal materially harms readability or diagnosis.
  • Task scope baseline: structured pre-edit snapshot of the allowed test files and every dirty path outside them.

Mandatory Rules

MUST, SHOULD, and MAY are normative. This section is the source of R1-R15; workflow and command examples do not override it.

R1: Repository authority

Before any test write, read AGENTS.md and code-implementation/SKILL.md through EOF, then read every reference selected by that base Skill for this task through EOF, including its implementation, testing, contract, impact, removal, non-regression, and verification rules. Follow the applicable CODE_OF_CONDUCT.md sections. The base Skill owns universal implementation, testing, non-regression, verification, and completion requirements; this Skill adds target resolution, coverage, branch-map, parameterization, and scanner requirements for systematic unit-test generation. Reading either Skill does not expand the user-authorized scope, file types, Git authority, or other permissions.

Read the full file on GitHub · 184 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago Changed · -1 lines 2bf33a09f4b8
  2. 9d ago Changed · -4 lines a32f83e08136
  3. 11d ago Changed 48739c1bff78
  4. 15d ago Changed · +4 lines 9db1eb930f01
  5. 1mo ago Changed · +6 tokens per session 4c886fd50788
  6. 1mo ago First seen · 185 lines · 54 tokens per session scan A f03675ba39d1

Subscribe to this mod's changes

gen-ut is a skill published in the GitHub repository apache/shardingsphere (20,817 stars, last pushed today), licensed Apache-2.0. It adds 60 tokens to every session and 2,605 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

cargo-pgrx

Choose and run cargo-pgrx commands, pgrx tests, pgtest coverage, and pgsys boundary checks.

yugabyte/yugabyte-db · 29 tokens

ui-visual-regression

Automates visual regression testing for DB Console UI changes. Compares screenshots and network requests between the current branch and its merge base using roachprod, playwright-cli, and ImageMagick. Use when the user wants to verify UI changes haven't introduced visual or behavioral regressions.

cockroachdb/cockroach · 61 tokens

database-testing

Database schema validation, data integrity testing, migration testing, transaction isolation, and query performance. Use when testing data persistence, ensuring referential integrity, or validating database migrations.

summarybotng/summarybot-ng · 37 tokens

adding-dbt-unit-test

Creates unit test YAML definitions that mock upstream model inputs and validate expected outputs. Use when adding unit tests for a dbt model or practicing test-driven development (TDD) in dbt.

dbt-labs/dbt-agent-skills · 44 tokens

database-testing

Database schema validation, data integrity testing, migration testing, transaction isolation, and query performance. Use when testing data persistence, ensuring referential integrity, or validating database migrations.

proffesor-for-testing/agentic-qe · 37 tokens

redux-to-swr

Migrate React components from Redux + Saga to SWR hooks. Use when converting data fetching from Redux store (reducers, sagas, selectors, connect HOC) to SWR-based hooks in CockroachDB DB Console or cluster-ui.

cockroachdb/cockroach · 53 tokens