mybatis-patterns

Guidance for using MyBatis, a Java framework that maps application code to SQL statements and database results. It covers SQL placement, reusable result mappings, related records, paging, dynamic SQL, and protection against SQL injection.

In plain words
What is it for?
Use it when writing Mapper XML or annotations, mapping joined or related data, building dynamic filters or updates, configuring paging, and choosing safe parameter syntax.
Why use it?
It helps avoid repeated mapping definitions, slow one-query-per-record patterns, unsafe SQL substitution, and incorrect handling of complex queries.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/full-stack-skills/java-skills/mybatis-patterns
Any agent
npx skills add full-stack-skills/java-skills --skill mybatis-patterns
Clone the repo
git clone --depth 1 https://github.com/full-stack-skills/java-skills

Made for: Claude Code, Codex.

Per session 108 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,264 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin unknown 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 $0.00108 $0.02264
Opus 5 $0.00054 $0.01132
Sonnet 5 $0.00022 $0.00453
Haiku 4.5 $0.00011 $0.00226

Measured 2d ago against content hash e1211af74a22, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

mybatis-patterns 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 2d ago.

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.

skills/mybatis-patterns/SKILL.md · 194 lines

The source is not reproduced here

No licence file

A repository with no LICENSE is all rights reserved by default, so the body is not copied here. The metadata, the measurements and the link are.

Read it on GitHub

Files

What ships with it

2 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. 2d ago First seen · 194 lines · 108 tokens per session scan A e1211af74a22

Subscribe to this mod's changes

mybatis-patterns is a skill published in the GitHub repository full-stack-skills/java-skills (5 stars, last pushed 14d ago), with no licence file. It adds 108 tokens to every session and 2,264 once invoked, about $0.0005 per session on Opus 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-08-31.

Related

Other skills, from other repositories

azure-cosmos-java

Azure Cosmos DB SDK for Java. NoSQL database operations with global distribution, multi-model support, and reactive patterns. Triggers: "CosmosClient java", "CosmosAsyncClient", "cosmos database java", "cosmosdb java", "document database java".

microsoft/skills · 59 tokens

jpa-patterns

JPA/Hibernate patterns and common pitfalls (N+1, lazy loading, transactions, queries). Use when user has JPA performance issues, LazyInitializationException, or asks about entity relationships and fetching strategies.

decebals/claude-code-java · 47 tokens

anyline

AnyLine数据库操作开发规范,涵盖动态数据源注册切换注销、DDL动态建表改表、DML增删改与事务管理、DQL动态查询与聚合统计、元数据管理、查询结果集的聚合、过滤、格式转换等数学计算,AnyLine方法内部会自动适配100+数据库方言,调用方法时忽略不同数据库差异。.

anylineorg/anyline · 88 tokens

neo4j-driver-java-skill

Neo4j Java Driver v6 — driver lifecycle, Maven/Gradle setup, executableQuery, executeRead/Write managed transactions, explicit transactions, async/reactive patterns, error handling, data type mapping, connection pool tuning, causal consistency/bookmarks. Use when writing Java or Kotlin code that connects to Neo4j via…

neo4j-contrib/neo4j-skills · 154 tokens

spring-data-jpa

Use when designing or implementing Spring Data JPA on Spring Boot 4 — repository boundaries, projections, query patterns, custom repositories, CQRS read models, entity relationships, or persistence performance fixes. Not for generic SQL help, database admin work, or project-wide migration (see the springboot-migration…

a-pavithraa/springboot-skills-marketplace · 67 tokens

lumina_mybatis_plus

Use this skill when writing database access code, creating Mapper interfaces, or writing SQL queries. This skill enforces MyBatis-Plus usage priority, SQL writing restrictions, and data persistence best practices.

zwl467135974/lumina · 46 tokens