modscape-spec-generate

Generate table spec.md files from YAML, SQL, and Python implementation artifacts.

Updated Feb 25, 2026
One-click install
npx skills add https://github.com/yujikawa/modscape --skill modscape-spec-generate-yujikawa
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: modscape-spec-generate
Source: https://github.com/yujikawa/modscape/tree/main/src/templates/gemini/modscape-spec-generate
Command: npx skills add https://github.com/yujikawa/modscape --skill modscape-spec-generate-yujikawa

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Bootstrapping documentation for an existing data project is tedious: every table needs a permanent spec file, but writing them by hand from scattered SQL models, YAML definitions, and Python schemas takes hours. This Skill scans your existing implementation artifacts and generates a starter spec.md for every table it finds. ## Core Features & Use Cases - Multi-format table discovery: Extracts table definitions from model.yaml files (via the modscape CLI), SQL files (CREATE TABLE and dbt models), and Python files (SQLAlchemy, PySpark, pandas). - Standardized spec output: Writes .modscape/specs/<table-id>/spec.md with Overview, Business Context, Business Rules, and Changelog sections, skipping files that already exist. - Optional model.yaml sync: Can add newly discovered tables to model.yaml and validate the result with modscape validate. - Use Case: You inherit a dbt project with 40 SQL models and no documentation. Run the Skill against models/**/*.sql to bootstrap a spec file per table, then enrich them later through the regular SDD flow. ## Quick Start Ask the AI to run modscape-spec-generate against your model files, for example: generate table specs from model.yaml and all SQL files under models/staging.

Frequently Asked Questions about modscape-spec-generate

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate table spec files from existing SQL models?▼

Pass your SQL files or glob patterns to the Skill, for example models/**/*.sql. It parses CREATE TABLE statements and dbt model files, then writes a spec.md per table under .modscape/specs/<table-id>/.

How to bootstrap data documentation from a model.yaml file?▼

Provide the model.yaml path as input. The Skill uses modscape table list and modscape table get commands to read table definitions, then generates spec files with owner, update frequency, SLA, and business context extracted from the YAML.

Does it overwrite existing spec.md files?▼

No. If a spec.md already exists for a table, the Skill skips it and reports it in the summary. Only missing spec files are created, so previously written documentation is never lost.

What Python file formats are supported for table extraction?▼

The Skill parses SQLAlchemy model classes using __tablename__ and Column definitions, PySpark StructType and StructField schemas, and pandas read_sql queries. Docstrings are used as business context candidates.

What happens when the same table appears in multiple files?▼

The first file that defined the table wins, and the conflict is noted in the final summary. This keeps specs deterministic when the same physical table is referenced across YAML, SQL, and Python sources.