devlab-dao-sql-compat

devlab-dao-sql-compat is a skill for Claude Code, Codex from seed-forge/harness-ai-kit. It costs 160 tokens per session (2,455 once invoked), scanned A, original, Apache-2.0.

A workflow for finding and fixing SQL dialect differences in the data-access layer of an application. SQL is the language used to query databases, and Oracle, PostgreSQL, and MySQL each have variations; the workflow supports MyBatis, JPA, MyBatis-Plus, and SQLAlchemy.

In plain words
What is it for?
Use it to scan source code, identify database-specific SQL, apply supported conversions between the three databases, rescan the result, and list changes needing human review.
Why use it?
It helps prevent database migrations or multi-database support from failing because the same query syntax does not work everywhere.

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/seed-forge/harness-ai-kit/devlab-dao-sql-compat
Any agent
npx skills add seed-forge/harness-ai-kit --skill devlab-dao-sql-compat
Clone the repo
git clone --depth 1 https://github.com/seed-forge/harness-ai-kit

Made for: Claude Code, 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 devlab-dao-sql-compat

README.md
[![agentmods](https://agentmods.dev/badge/skills/seed-forge/harness-ai-kit/devlab-dao-sql-compat.svg)](https://agentmods.dev/skills/seed-forge/harness-ai-kit/devlab-dao-sql-compat)
Your own site
<a href="https://agentmods.dev/skills/seed-forge/harness-ai-kit/devlab-dao-sql-compat"><img src="https://agentmods.dev/badge/skills/seed-forge/harness-ai-kit/devlab-dao-sql-compat.svg" alt="Measured on agentmods" height="20"></a>
Per session 160 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,455 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00160 $0.02455
Opus 5 $0.00080 $0.01228
Sonnet 5 $0.00032 $0.00491
Haiku 4.5 $0.00016 $0.00246

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

Security

Grade A, and why

devlab-dao-sql-compat 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 3d ago.

The scan reads SKILL.md. This mod also ships 6 executable files (scripts/adapters/jpa.sh, scripts/adapters/mybatis-plus.sh, scripts/adapters/mybatis.sh, …), 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.

skills/devlab-dao-sql-compat/SKILL.md · 153 lines

How it starts

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

devlab-dao-sql-compat

用途

面向使用任何持久层框架(MyBatis / JPA / MyBatis-Plus / SQLAlchemy)的项目,解决"同一套 DAO 代码需要运行在不同数据库(Oracle / PostgreSQL / MySQL)"或"数据库迁移"场景下的 SQL 方言兼容性问题:

  • 检查:通过 adapter 模式扫描框架专属源码文件,按模块输出三方言命中矩阵与风险分级
  • 修复:AI 按转换方向加载对应映射表(references/dialects/),逐模块修复
  • 验证:静态复扫必做,库级语法预检可选,明确降级声明
  • 记录:输出前后对比与待人工复核清单

支持三方言全对称 6 个转换方向:O→PG、PG→O、O→MySQL、MySQL→O、PG→MySQL、MySQL→PG。

框架探测

本技能支持 4 种 DAO 框架的 adapter,默认自动探测:

检测特征 判定框架 扫描目标
**/mapper/**/*.xml 含 SQL 标签 MyBatis Mapper XML
**/*.java@Query / @NamedQuery JPA/Hibernate Java 源码
**/*.javaQueryWrapper / LambdaQueryWrapper / BaseMapper MyBatis-Plus Java + XML
**/*.pytext() / .execute() / session.execute SQLAlchemy Python 源码
多个命中 提示用户选择 monorepo 可能多框架

也可手动指定:bash scripts/scan-sql-compat.sh --adapter mybatis

各框架的扫描模式、提取逻辑和方言陷阱详见 references/adapters/ 下对应文档。

配置上下文

本 Skill 的运行时配置遵循 harness-ai-kit 配置治理规范的三级优先级:

L3 对话中用户明确声明的参数 > L2 用户配置(~/.harness-ai-kit/config.yaml → 环境变量 → ~/.harness-ai-kit/.env.tak)> L1 本目录 config.defaults.yaml

配置项见 config.defaults.yaml:adapter / scan_dir / module_glob / report_path / custom_procs_file / fail_on_critical / verify_jdbc_url。 其中 verify_jdbc_url 为 sensitive:无默认值,只能经 L2/L3 注入,禁止写入任何文档或提交。

工作流(七阶段)

Phase 0 环境确认

  1. 确认 DAO 框架类型(auto-detect 或手动 --adapter
  2. 确认扫描根目录(scan_dir);框架专属源码位置默认自动探测,非标准布局时向用户确认 module_glob
  3. 向用户确认目标方言拓扑(二选一):
    • 单一目标库:整个项目最终只跑一种数据库 → 所有非目标方言都是待修复项
    • 多库路由:不同模块路由到不同数据库 → 逐模块建立"模块 → 目标方言"映射表
  4. 询问是否有自定义存储过程/函数(写入 custom_procs_file 清单)

Phase 1 扫描

bash <本Skill目录>/scripts/scan-sql-compat.sh \
  --adapter <auto|mybatis|jpa|mybatis-plus|sqlalchemy> \
  --dir <scan_dir> [--module-glob <glob>] [--procs <file>] --report <report_path>

产出报告含:三方言命中明细、模块级风险矩阵、自定义存储过程依赖。 风险等级:CRITICAL(同模块方言混用)/ HIGH(单方言文件数 >5)/ MEDIUM(单方言文件数 ≤5)。

Phase 2 范围决策

向用户呈现风险矩阵,确认本次修复范围(CRITICAL 优先,或用户指定模块)。禁止全量静默修复

Read the full file on GitHub · 153 lines

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. 3d ago First seen · 153 lines · 160 tokens per session scan A 653b26a5f8a8

Subscribe to this mod's changes

devlab-dao-sql-compat is a skill published in the GitHub repository seed-forge/harness-ai-kit (21 stars, last pushed 7d ago), licensed Apache-2.0. It adds 160 tokens to every session and 2,455 once invoked, about $0.0008 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-30.

Related

Other skills, from other repositories

database-design

Designs database schemas, indexing strategies, query optimization, and migration patterns for SQL and NoSQL databases. Use when designing tables, optimizing queries, fixing N+1 problems, planning migrations, or when asked about database performance, normalization, ORMs, or data modeling.

CloudAI-X/claude-workflow-v2 · 57 tokens

relational-database-mcp-cloudbase

Sibling CloudBase skills ship beside this skill. Use local relative paths such as ../auth-tool-cloudbase/SKILL.md.

TencentCloudBase/CloudBase-AI-Toolkit · 94 tokens

cloudbase-all-in-one

Unified CloudBase execution guide for all-in-one skill installs. Use this first for CloudBase app tasks, especially existing apps with TODOs, fixed pages, or active handlers. Routes PostgreSQL / CloudBase PG / app.rdb() / queryPgDatabase / managePgDatabase work away from legacy NoSQL and old auth patterns.

TencentCloudBase/CloudBase-AI-Toolkit · 71 tokens

cloudbase-document-database-in-wechat-miniprogram

Use CloudBase document database WeChat MiniProgram SDK to query, create, update, and delete data. Supports complex queries, pagination, aggregation, and geolocation queries.

TencentCloudBase/CloudBase-AI-Toolkit · 46 tokens

architect/data-api-design

Skill "architect/data-api-design" from echoVic/boss-skill, covering 数据模型与api设计方法论, 适用场景, 数据模型设计, 1. 实体识别 and 2. 关系识别.

echoVic/boss-skill · 26 tokens

cloudbase-cli

CloudBase CLI (tcb, 云开发CLI, Tencent CloudBase命令行) resource management skill. Use when deploying cloud functions, CloudRun, storage, NoSQL/MySQL, static hosting, permissions, CORS/domains via tcb; for CI/CD and batch ops; when the user prefers CLI; or as the first-session fallback when CloudBase MCP tools are not…

TencentCloudBase/CloudBase-AI-Toolkit · 155 tokens