db-schema-map: Schema Map from MyBatis & JPA

    1

    Map every table your Spring code touches, straight from MyBatis XML or JPA entities, with no database connection.

    Free

    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+22 more

    db-schema-map: Schema Map from MyBatis & JPA

    Example session with this skill installed

    Map the database schema of this Spring project. Which tables does the code touch, and what breaks if I change shop_order_m?

    • Read your context and instructions
    • Compiled the db-schema-map

    Ran schema_map.py on the project root. ORM detected: MyBatis. No database connection was used.

    DB Schema Map — sample-shop

    3 mappers / 10 statements / 6 tables

    Signals

    • namespace FQCN: 3/3
    • ${} string substitution: 1 — injection risk + SQL cannot be resolved statically
    • Relationship table candidates: shop_order_item_r

    ${} call sites

    • MemberDAO.searchMembers → ${sortColumn} — src/main/resources/mapper/MemberMapper.xml

    Tables

    shop_member_m (INSERT/JOIN/SELECT)

    • Columns (write path): email, member_id, member_nm
    • Joins: shop_order_m(member_id)
    • Call sites (4): MemberDAO.insertMember, MemberDAO.searchMembers, MemberDAO.selectMember, OrderDAO.selectOrderDetail

    shop_order_m (INSERT/SELECT/UPDATE)

    • Columns (write path): member_id, mod_dt, order_no, reg_id, stat_code_id, total_amt
    • Joins: shop_code_m(stat_code_id=code_id), shop_member_m(member_id), shop_order_item_r(order_id)
    • Call sites (4): OrderDAO.insertOrder, OrderDAO.selectOrderDetail, OrderDAO.selectOrderItems, OrderDAO.updateOrderStatus

    shop_goods_m (SELECT/UPDATE)

    • Columns (write path): stock_qty
    • Joins: shop_category_m(cate_id)
    • Call sites (2): GoodsDAO.selectGoods, GoodsDAO.updateStock

    shop_order_item_r (INSERT/JOIN)

    • Columns (write path): goods_id, order_id, qty
    • Joins: shop_order_m(order_id)
    • Call sites (2): GoodsDAO.insertOrderItem, OrderDAO.selectOrderItems

    shop_category_m (JOIN)

    • Joins: shop_goods_m(cate_id)
    • Call sites (1): GoodsDAO.selectGoods

    shop_code_m (JOIN)

    • Joins: shop_order_m(stat_code_id=code_id)
    • Call sites (1): OrderDAO.selectOrderDetail

    Impact of changing shop_order_m

    4 statements in OrderDAO touch it (insert, detail, items, status update). It joins shop_member_m, shop_code_m and shop_order_item_r, so check those join keys (member_id, stat_code_id, order_id) before altering columns.

    Next steps

    • Fix MemberDAO.searchMembers: ${sortColumn} is an injection risk. Whitelist the sort column.
    • Paste the domain summary into CLAUDE.md so the next session doesn't need to regenerate it.
    Paste the domain summary into CLAUDE.md

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Reverse-engineering a legacy database schema from a large Spring codebase is slow, especially without a live database connection. This skill builds a table-centric schema map by statically analyzing MyBatis XML mappers and JPA/Hibernate entities. It extracts table relationships, column definitions, and CRUD access patterns directly from the source code.

    What it does

    • ORM auto-detection identifies MyBatis or JPA/Hibernate configurations to apply the correct parsing logic.
    • Dependency mapping resolves table relationships and N:N join tables from @JoinTable or MyBatis ON clauses.
    • Impact analysis tracks call sites for specific tables to determine the blast radius of a schema change.
    • Risk signaling flags blind spots like SQL injection risks in ${} substitutions or hidden QueryDSL queries.
    • CRUD profiling categorizes table usage by SELECT, INSERT, UPDATE, and DELETE operations.

    How it works

    1. Run the script against a project root to generate a full domain map.
    2. Target a specific table name to see every DAO method or Repository call touching that data.
    3. Export results to JSON for machine-readable integration with other internal tooling.
    4. Review the Signals section to gauge code quality and naming strategy confidence.

    Frameworks & tools

    Python 3.8+ standard library. Works with Spring Boot, MyBatis, JPA, and Hibernate. Supports Flyway and Liquibase detection.

    Why this beats prompting it yourself

    Manual prompts struggle to maintain state across hundreds of XML and Java files, often missing aliased joins or dynamic SQL tags. This tool uses structured regex scanning to ensure every DAO.statementId and Repository method is accounted for without losing context.

    Use cases

    • Onboarding to an unfamiliar project by identifying the top 5 core domain tables.
    • Pre-migration audits to find all code paths affected by renaming a column or table.
    • Security reviews to locate every instance of unsafe string substitution in MyBatis.
    • Performance tuning by identifying EAGER fetch types and N+1 risks in JPA entities.

    Known limitations

    Uses regex scanning rather than full SQL/Java parsing. Accuracy is not compiler-grade. MyBatis column extraction is limited to write paths. Does not detect QueryDSL or Criteria API query logic.

    How to use

    Skills on Agensi run inside your AI agent. Copy the prompt, paste it into your agent, and it connects to Agensi and installs this skill for you. If a payment is needed, your agent shows it to you first.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill passes our trust checks below.

    Security scanned

    Passed our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Free forever

    No account required to browse

    Trust & safety

    Security scanned

    Verified clean 2 days ago

    • Free to download with an account

    Requires

    Python

    Listed2 days ago

    What's inside

    Frequently Asked Questions