Schema Analysis
Schema analysis is the first step after connecting your Supabase project. Skene reads your database structure, identifies key patterns, and builds a foundation for feature compilation and trigger deployment.
What it does
Skene introspects your Postgres information_schema to understand:
- Tables and columns — names, types, constraints, primary keys
- Foreign key relationships — how tables reference each other
- Schema boundaries — which schemas are available (
public,auth, custom schemas)
From this raw structure, Skene builds a TTV (Time-Trigger-Value) map and suggests lifecycle stages for your product.
Running analysis
From the dashboard
Workspace home (/workspace/<slug>) is the main overview: run analysis, explore the TTV (Time-Trigger-Value) journey graph, filter by subject, and use the overview dock. The flow is typically:
- Precheck — Verify Supabase connection and schema access
- Enrich — Optionally pull context from a linked GitHub repository to improve table labeling
- Seed — Generate lifecycle stage suggestions from the schema
- Compile — Build the TTV map and prepare for feature creation
The Agent Engine page (/workspace/<slug>/skene-engine) offers the same graph plus deeper engine tools: compiled loops, engine YAML, GitHub sync, and push artifacts — use it when you are iterating on the engine and manifests alongside schema analysis.
From the CLI
# Analyze your codebase (produces growth-manifest.json)
uvx skene analyze .
# Push results to Skene Cloud
uvx skene push
The CLI analyzes your codebase (not the database directly) and pushes the manifest to Cloud. Cloud can then cross-reference CLI analysis with its own schema introspection.
TTV map
The TTV (Time-Trigger-Value) map scores each table across three dimensions:
| Dimension | What it detects | Examples |
|---|---|---|
| Time | Timestamp fields that indicate when events happen | created_at, updated_at, last_login_at |
| Trigger | State or status fields that indicate transitions | status, state, plan, role |
| Value | Identity and reference fields that link to entities | user_id, account_id, product_id |
Tables with high TTV scores are strong candidates for growth triggers — they represent meaningful user actions and state changes.
Lifecycle stages
Based on the TTV analysis, Skene suggests lifecycle stages for your product. These represent the journey a user takes:
Trial → Onboarded → Active → At Risk → Churned
How stages are assigned
Skene maps table states to lifecycle stages using field names and patterns:
- A
status = 'trial'field maps to the Trial stage - An
onboarding_completed_attimestamp maps to Onboarded - Recent activity timestamps map to Active
- Absence of recent activity maps to At Risk
Overriding stages
On the journey graph (workspace home or Agent Engine), you can:
- Reassign tables to different lifecycle stages by clicking nodes in the graph
- Add or remove lifecycle stages from the stage panel
- Reorder stages to match your product's actual user journey
Primary subject detection
Skene identifies the primary subject — the entity whose lifecycle you're tracking. This is typically a user, account, or organization.
Detection uses:
- Foreign key relationships (which table do others reference?)
- Column naming patterns (
user_id,account_id,org_id) - Table structure (the
auth.userstable in Supabase projects)
The primary subject determines how features resolve their target entity when a trigger fires.
How analysis feeds into features
Schema analysis produces the context that feature compilation needs:
- Table mappings — Which table and operation a feature should trigger on
- Column selection — Which columns to include in trigger payloads (sensitive columns like passwords and tokens are automatically excluded)
- Entity resolution — How to find the user or entity ID from a triggered row
- Enrichment — Which related tables to join for additional context
When you create a feature, Skene uses this analysis to automatically suggest the best table, columns, and entity mapping. You can override any suggestion.
Next steps
- Features & Deploy — Create features using the schema analysis results
- Supabase Integration — Schema setup and trigger deployment details
