MyBatis-Flex Agent Rapid Development
Paste the following prompt into your AI chat to install this skill:
Please follow https://skillhub.cn/install/skillhub.md to install @user_b91ca78d/mybatis-flex-skills.
About this skill
Problem
When a team uses MyBatis-Flex for persistence, the friction is usually not raw SQL, but scattered APIs: @Table, @Column, BaseMapper, Db, Row, QueryWrapper, Service, multi-tenancy, logical deletion, and APT code generation are easy to mix up. Mistakes include setRaw() string concatenation or dragging a Java project into Kotlin modules.
How It Works
The skill organizes documentation by scenario:
- Entity mapping: @Table, @Column, @Id, listeners.
- CRUD and chaining: insert, update, delete, QueryChain.
- Advanced queries: select, where, join, subqueries, CTE.
- Relations and service layer: @RelationOneToOne, save, remove, list, page.
- Governance features: logical deletion, optimistic locking, multi-tenancy, data masking, multi-datasource, field encryption.
It also highlights best practices: prefer Lambda syntax, APT table definition classes, pass totalRow for pagination, and use when() for dynamic conditions.
Boundaries
It is a development guide and reference, not a runtime library, and it does not replace version compatibility testing. Real configurations should still follow project dependencies, references/ docs, and framework version; avoid exposing raw SQL strings for dynamic conditions.
Use Cases
- In a Spring Boot project, look up @Table, @Column, and @Id setup while adding an order entity.
- While writing complex report SQL, check QueryWrapper select, where, join, subquery, and CTE usage.
- When wrapping the order module in a Service layer, find save, remove, list, page, logical delete, and optimistic lock setup.
- When adding APT code generation to a Java project, check Generator, processor config, and table definition class output.
Best For
- A Java backend engineer owning a Spring Boot order module, needing quick Entity annotation and BaseMapper CRUD references.
- A backend engineer maintaining report queries, confirming QueryWrapper join, subquery, and dynamic condition patterns.
- A Java developer adding multi-tenancy or logical deletion, checking @Column tenantId, version, and isLogicDelete settings.
- A Java architect using APT code generation, verifying Generator and processor configuration.
Related Skills
A one-shot coding agent built on Claude Code CLI that runs non-interactively, supports a specified workdir, and can be monitored in the foreground or background.
Preview and confirm file sorting by extension, with recursive cleanup, ignore rules, and transactional rollback.
An engineering assistant for static HTML/CSS/JS pages, design-token extraction, IE8-compatible review, and structured delivery.
An engineering workflow for requirement analysis, scenario modeling, risk planning, quality gates, testing, and knowledge capture, with lightweight, standard, and full modes.