PA

It processes raw table definitions to extract modules, models, fields, and foreign keys while applying CRUD naming conventions.

Install

mkdir -p .claude/skills/parse-table && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/1253" && unzip -o skill.zip -d .claude/skills/parse-table && rm skill.zip

Installs to .claude/skills/parse-table

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Parse table definition to extract module name, model name, table name, and field definitions. First step of CRUD generation.
124 charsno explicit “when” trigger
Beginner

Key capabilities

  • Extract database schema from text
  • Map field definitions to CRUD boilerplate
  • Infer module and model naming conventions
  • Handle foreign key relationships

How it works

It uses a regex-based parser to normalize unstructured schema input into a canonical model/module object, mapping types to standard programming primitives.

Inputs & outputs

You give it
Table definition text schema
You get back
Parsed JSON/object mapping for CRUD generation

When to use parse-table

  • Generating CRUD boilerplate from text schema
  • Standardizing database model naming
  • Mapping table fields to code types

About this skill

Step 1: Parse Table Definition

从用户输入的表定义中提取关键信息。

Input Format

Table: products
Fields:
- id (primary key)
- name (string, 100, required)
- category_id (foreign key -> categories)
- description (text, nullable)
- price (decimal 10,2, required)
- stock (integer, default 0)
- status (tinyint, default 1)

输入容错与默认推断

  • 允许使用以下别名:Table/表名/表Module/模块Model/模型Fields/字段
  • 允许省略 Fields: 标题,仅用 - 列表表示字段。
  • 若只提供 table,则按命名规则推断 {Module}{Model}
  • 若用户显式提供 Module/Model,优先使用用户输入(覆盖推断)。
  • 缺少 table 时必须先向用户确认,不进行推断生成。

字段解析补充

  • required 表示 nullable = falsenullable 表示可空;两者都未出现时默认不可空。
  • 支持别名:int/integerbool/booleanpk/primary keyfk/foreign key
  • foreign key -> xxx 解析为 foreignKey 类型,默认 index()

冲突处理优先级

  1. 用户显式指定(Module/Model/table/字段规则)
  2. 规则推断(命名规则与默认字段规则)
  3. 兜底:要求用户澄清后再继续

Output Variables

VariableRuleExample
{table}snake_case pluralproducts
{Model}PascalCase singularProduct
{Module}PascalCaseProduct
{module}snake_caseproduct
{resources}kebab-case pluralproducts
{resource}kebab-case singularproduct

Field Type Parsing

InputTypeLengthRequiredDefaultFK Target
string, 100string100nonull-
string, 100, requiredstring100yesnull-
integer, default 0integer-no0-
foreign key -> categoriesforeignKey-no0categories
decimal 10,2decimal10,2nonull-
tinyint, default 1tinyint-no1-
text, nullabletext-nonull-

Naming Conventions

  • Module: 通常与 Model 同名,除非用户明确指定
  • Table: 复数形式 (products, order_items)
  • Model: 单数形式 (Product, OrderItem)
  • Route: kebab-case (products, order-items)

When not to use it

  • Full database migration management
  • Production database execution

Limitations

  • Sensitive to non-standard schema input format
  • Limited to predefined SQL data types

How it compares

It standardizes input text into a machine-readable format specifically for CRUD scaffolding before code generation begins.

Compared to similar skills

parse-table side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
parse-table (this skill)36moNo flagsBeginner
drizzle2382moNo flagsIntermediate
database-development12moReviewIntermediate
add-module11moReviewAdvanced

Try saying

Example prompts that trigger this skill in your AI assistant.

Search skills

Search the agent skills registry