Autotable
npx -y skills add chengliang4810/jimuqu-skills --skill autotableAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
辅助开发、配置、调试和解释 AutoTable 自动维护数据库表结构框架。只要用户提到 AutoTable、org.dromara.autotable、@AutoTable、@AutoColumn、@PrimaryKey、@Index、@TableIndex、@AutoColumns、多数据库 dialect、自动建表/改表/建库、mode validate/create/update/none、auto-drop-column/table/index、record-sql、init-data、Flyway 脚本、Solon 插件或 Spring Boot starter 集成、事件回调/拦截器、类型映射、字段排序或没有创建表等问题,都必须使用此技能并优先查证 AutoTable 官方开源仓库。
The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
4.4 KB, ~1.3k tokens by cl100k_base, as published. Nobody here has run it
AutoTable Skill
你在辅助 AutoTable 项目开发。AutoTable 会自动维护数据库结构,存在 DDL 和数据丢失风险;回答必须以目标项目依赖版本、官方源码和官方文档为准,不能套用 JPA、Hibernate、MyBatis-Plus 或某个业务项目的习惯。
官方仓库:https://gitee.com/dromara/auto-table
首要原则
- 先判定任务类型:注解建表、运行模式、配置、Spring Boot/Solon 集成、多数据源、SQL 记录、数据初始化、生产部署、拦截器/回调、问题排查、数据库适配。
- 优先查证源码:不确定的注解属性、配置项、启动时机、回调接口、策略模块、危险开关必须 grep/read 源码或 docs。
- 谨慎处理 DDL 风险:
create、auto-drop-table、auto-drop-column、auto-drop-custom-index会带来数据或结构丢失风险;生产默认建议validate或关闭。 - 区分通用框架与项目规范:本技能只说明 AutoTable 通用能力。业务项目的目录结构、实体基类、ORM 注解组合、迁移流程以项目技能/文档为准。
- 输出要可落地:给 Java 注解、配置片段、依赖选择、验证方式;涉及源码机制时引用
path:line。
资料入口
按任务读取对应 reference,必要时再读源码:
- 仓库结构、模块与源码入口:
references/source-map.md - 注解建表、列、索引与方言:
references/annotations.md - 配置、运行模式与生产安全:
references/config-runmode-safety.md - 集成、启动流程、多数据源:
references/integration-lifecycle.md - SQL 记录、数据初始化、回调与拦截器、排查:
references/advanced-debugging.md
如果任务很具体,直接 grep 源码优先于泛读 reference。
工作流
开发实体/表结构
- 查当前项目是否已有 AutoTable 约定;如果有项目专属技能,先遵守项目规范。
- 读取
references/annotations.md,确认@AutoTable、@AutoColumn、主键、索引和数据库方言写法。 - 多数据库字段差异用
@AutoColumns+dialect,不要只按当前数据库硬编码到所有环境。 - 说明生成/变更的表、列、索引和潜在 DDL 风险。
配置与部署
- 读取
references/config-runmode-safety.md。 - 开发环境可用
update;测试初始化可用create;生产优先validate或enable=false。 - 需要变更审计时开启
record-sql,可配合 Flyway/Liquibase 整理脚本。 - 明确危险开关默认不要开,尤其生产环境。
集成与排查
- Spring Boot 先查
@EnableAutoTable、starter、AutoTableAutoConfig。 - Solon 先查
auto-table-solon-plugin、@EnableAutoTable、AutoTablePlugin。 - “没有创建表”优先查:是否启用、mode、扫描包/类、实体是否标注、数据源是否存在、方言策略是否匹配。
- 给最小修复,不做无关重构。
常用查证命令
# 核心注解
rg "@interface AutoTable|@interface AutoColumn|@interface PrimaryKey|@interface Index|@interface TableIndex" auto-table-annotation/src/main/java
# 配置与启动流程
rg "class PropertyConfig|class AutoTableBootstrap|class AutoTableAutoConfig|class AutoTablePlugin"
# 回调与拦截器
rg "interface .*Callback|interface .*Interceptor" auto-table-core/src/main/java
# 测试示例
find auto-table-test -path '*/src/test/java/*' -type f
输出规范
- 用中文说明;Java 标识符和配置键保持原样。
- 涉及源码机制时必须引用
path:line。 - 不确定时说“源码中未确认”,不要补 JPA/Hibernate/MyBatis-Plus 语义。
- 区分 AutoTable 通用能力、Spring Boot 集成、Solon 集成和业务项目封装。
- 涉及危险 DDL 配置时必须标明风险和更安全的替代方案。