astronomer/agents/warehouse-init
Claude Code and agent skill by astronomer/agents
- community
Checking that the SKILL.md file is still in the repository.
Initialize warehouse schema discovery. Generates .astro/warehouse.md with all table metadata for instant lookups. Run once per project, refresh when schema changes. Use when user says "/astronomer-data:warehouse-init" or asks to set up data discovery.
Install
npx vskill@latest install astronomer/agents/warehouse-initSKILL.md
Initialize Warehouse Schema
Generate a comprehensive, user-editable schema reference file for the data warehouse.
Scripts: ../analyzing-data/scripts/ — All CLI commands below are relative to the analyzing-data skill's directory. Before running any scripts/cli.py command, cd to ../analyzing-data/ relative to this file.
What This Does
- Discovers all databases, schemas, tables, and columns from the warehouse
- Enriches with codebase context (dbt models, gusty SQL, schema docs)
- Records row counts and identifies large tables
- Generates
.astro/warehouse.md- a version-controllable, team-shareable reference - Enables instant concept→table lookups without warehouse queries
Process
Step 1: Read Warehouse Configuration
Get the list of databases to discover (e.g., databases: [HQ, ANALYTICS, RAW]).
Step 2: Search Codebase for Context (Parallel)
Launch a subagent to find business context in code:
Step 3: Parallel Warehouse Discovery
Launch one subagent per database using the Task tool:
Run all subagents in parallel (single message with multiple Task calls).
Step 4: Discover Categorical Value Families
For key categorical columns (like OPERATOR, STATUS, TYPE, FEATURE), discover value families:
Group related values into families by common prefix/suffix (e.g., Export* for ExportCSV, ExportJSON, ExportParquet).
Step 5: Merge Results
Combine warehouse metadata + codebase context:
- Quick Reference table - concept → table mappings (pre-populated from code if found)
- Categorical Columns - value families for key filter columns
- Database sections - one per database
- Schema subsections - tables grouped by schema
- Table details - columns, row counts, descriptions from code, warnings
Step 6: Generate warehouse.md
Write the file to:
.astro/warehouse.md(default - project-specific, version-controllable)~/.astro/agents/warehouse.md(if--globalflag)
Output Format
{Inferred relationships based on column names like *_ID}
Command Options
| Option | Effect | |
|---|---|---|
/astronomer-data:warehouse-init | Generate .astro/warehouse.md | |
/astronomer-data:warehouse-init --refresh | Regenerate, preserving user edits | |
/astronomer-data:warehouse-init --database HQ | Only discover specific database | |
/astronomer-data:warehouse-init --global | Write to ~/.astro/agents/ instead |
Step 7: Pre-populate Cache
After generating warehouse.md, populate the concept cache:
Step 8: Offer CLAUDE.md Integration (Ask User)
Ask the user:
Would you like to add the Quick Reference table to your CLAUDE.md file?This ensures the schema mappings are always in context for data queries, improving accuracy from ~25% to ~100% for complex queries.Options:1. Yes, add to CLAUDE.md (Recommended) - Append Quick Reference section2. No, skip - Use warehouse.md and cache only
If user chooses Yes:
- Check if
.claude/CLAUDE.mdorCLAUDE.mdexists - If exists, append the Quick Reference section (avoid duplicates)
- If not exists, create
.claude/CLAUDE.mdwith just the Quick Reference
Quick Reference section to add:
If yes: Append the Quick Reference section to .claude/CLAUDE.md or CLAUDE.md.
After Generation
Tell the user:
Refresh Behavior
When --refresh is specified:
- Read existing warehouse.md
- Preserve all HTML comments (
<!-- ... -->) - Preserve Quick Reference table entries (user-added)
- Preserve user-added descriptions
- Update row counts and add new tables
- Mark removed tables with
<!-- REMOVED -->comment
Cache Staleness & Schema Drift
The runtime cache has a 7-day TTL by default. After 7 days, cached entries expire and will be re-discovered on next use.
When to Refresh
Run /astronomer-data:warehouse-init --refresh when:
- Schema changes: Tables added, renamed, or removed
- Column changes: New columns added or types changed
- After deployments: If your data pipeline deploys schema migrations
- Weekly: As a good practice, even if no known changes
Signs of Stale Cache
Watch for these indicators:
- Queries fail with "table not found" errors
- Results seem wrong or outdated
- New tables aren't being discovered
Manual Cache Reset
If you suspect cache issues:
Codebase Patterns Recognized
| Pattern | Source | What We Extract | |
|---|---|---|---|
**/models/**/*.yml | dbt | table/column descriptions, tests | |
**/dags/**/*.sql | gusty | YAML frontmatter (description, primary_key) | |
AGENTS.md, CLAUDE.md | docs | data layer hierarchy, conventions | |
**/docs/**/*.md | docs | business context |
Example Session
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/warehouse-init/SKILL.md
Popularity
- Repository stars
- 362
- Repository forks
- 46
- 7-day trend score
- 29
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 21 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/astronomer/agents/warehouse-init)