dc-analysis-config
Create and configure AnalysisConfig objects for query, funnel, and flow analysis modes in Drizzle Cube dashboards.
What this skill does
# Analysis Config Skill
This skill helps you create AnalysisConfig objects - the canonical format for persisting analysis state in Drizzle Cube. Use AnalysisConfig for:
- Dashboard portlets (via `analysisConfig` field)
- Share URLs
- localStorage persistence
## AnalysisConfig Overview
```typescript
interface AnalysisConfig {
version: 1 // Always 1
analysisType: 'query' | 'funnel' | 'flow'
activeView: 'table' | 'chart'
charts: {
[K in AnalysisType]?: ChartConfig // Per-mode chart settings
}
query: CubeQuery | MultiQueryConfig | ServerFunnelQuery | ServerFlowQuery
}
interface ChartConfig {
chartType: ChartType
chartConfig: ChartAxisConfig
displayConfig: ChartDisplayConfig
}
```
## Query Mode (analysisType: 'query')
For standard queries and multi-query analysis.
### Single Query Example
```typescript
const singleQueryConfig: QueryAnalysisConfig = {
version: 1,
analysisType: 'query',
activeView: 'chart',
charts: {
query: {
chartType: 'bar',
chartConfig: {
xAxis: ['Employees.department'],
yAxis: ['Employees.count', 'Employees.avgSalary']
},
displayConfig: {
showLegend: true,
stackType: 'none'
}
}
},
query: {
measures: ['Employees.count', 'Employees.avgSalary'],
dimensions: ['Employees.department'],
filters: [
{
member: 'Employees.isActive',
operator: 'equals',
values: [true]
}
],
order: {
'Employees.count': 'desc'
},
limit: 10
}
}
```
### Multi-Query Example
Combine multiple queries with merge strategies:
```typescript
const multiQueryConfig: QueryAnalysisConfig = {
version: 1,
analysisType: 'query',
activeView: 'chart',
charts: {
query: {
chartType: 'line',
chartConfig: {
xAxis: ['Orders.createdAt'],
yAxis: ['Sales.totalRevenue', 'Returns.totalRefunds']
},
displayConfig: {
showLegend: true,
showGrid: true
}
}
},
query: {
queries: [
{
measures: ['Sales.totalRevenue'],
timeDimensions: [{
dimension: 'Orders.createdAt',
granularity: 'month'
}]
},
{
measures: ['Returns.totalRefunds'],
timeDimensions: [{
dimension: 'Returns.createdAt',
granularity: 'month'
}]
}
],
mergeStrategy: 'merge',
mergeKeys: ['Orders.createdAt'],
queryLabels: ['Revenue', 'Refunds']
}
}
```
**Merge Strategies:**
- `'concat'` - Append rows with `__queryIndex` marker (for separate series)
- `'merge'` - Align data by common dimension key (for combined visualization)
## Funnel Mode (analysisType: 'funnel')
For sequential step analysis with conversion tracking.
### Funnel Example
```typescript
const funnelConfig: FunnelAnalysisConfig = {
version: 1,
analysisType: 'funnel',
activeView: 'chart',
charts: {
funnel: {
chartType: 'funnel',
chartConfig: {},
displayConfig: {
funnelStyle: 'funnel', // 'funnel' or 'bars'
funnelOrientation: 'horizontal', // 'horizontal' or 'vertical'
showFunnelConversion: true,
showFunnelAvgTime: true
}
}
},
query: {
funnel: {
// Binding key links steps together (user/entity ID)
bindingKey: 'Events.userId',
// Time dimension for ordering and time-to-convert
timeDimension: 'Events.timestamp',
// Sequential steps
steps: [
{
name: 'Signup',
cube: 'Events',
filter: {
member: 'Events.eventType',
operator: 'equals',
values: ['signup']
}
},
{
name: 'First Purchase',
cube: 'Purchases',
filter: {
member: 'Purchases.amount',
operator: 'gt',
values: [0]
},
timeToConvert: 'P30D' // Must convert within 30 days
},
{
name: 'Repeat Purchase',
cube: 'Purchases',
filter: {
member: 'Purchases.isRepeat',
operator: 'equals',
values: [true]
},
timeToConvert: 'P90D'
}
],
// Optional: track time metrics between steps
includeTimeMetrics: true,
// Optional: overall time window for the entire funnel
globalTimeWindow: 'P180D'
}
}
}
```
### Cross-Cube Funnel
When the binding key has different names in different cubes:
```typescript
query: {
funnel: {
// Map the binding key across cubes
bindingKey: [
{ cube: 'Signups', dimension: 'Signups.userId' },
{ cube: 'Purchases', dimension: 'Purchases.customerId' }
],
timeDimension: [
{ cube: 'Signups', dimension: 'Signups.createdAt' },
{ cube: 'Purchases', dimension: 'Purchases.purchaseDate' }
],
steps: [
{ name: 'Signup', cube: 'Signups', filter: {...} },
{ name: 'Purchase', cube: 'Purchases', filter: {...} }
]
}
}
```
### Time Window Formats (ISO 8601 Duration)
| Format | Duration |
|--------|----------|
| `PT1H` | 1 hour |
| `PT24H` | 24 hours |
| `P1D` | 1 day |
| `P7D` | 7 days |
| `P30D` | 30 days |
| `P90D` | 90 days |
## Flow Mode (analysisType: 'flow')
For bidirectional path analysis with Sankey diagram visualization.
### Flow Example
```typescript
const flowConfig: FlowAnalysisConfig = {
version: 1,
analysisType: 'flow',
activeView: 'chart',
charts: {
flow: {
chartType: 'sankey',
chartConfig: {},
displayConfig: {}
}
},
query: {
flow: {
// Binding key identifies entities
bindingKey: 'Events.userId',
// Time dimension for ordering events
timeDimension: 'Events.timestamp',
// Event dimension for node labels
eventDimension: 'Events.eventType',
// Starting step (anchor point)
startingStep: {
name: 'Purchase',
filter: {
member: 'Events.eventType',
operator: 'equals',
values: ['purchase']
}
},
// Explore N steps before the starting step
stepsBefore: 3,
// Explore N steps after the starting step
stepsAfter: 3,
// Join strategy
joinStrategy: 'auto' // 'auto' | 'lateral' | 'window'
}
}
}
```
### Flow Output Modes
| Mode | Description | Use Case |
|------|-------------|----------|
| `sankey` | Aggregate by (layer, event_type) | Standard flow visualization, paths converge |
| `sunburst` | Path-qualified nodes | Hierarchical tree, each path unique |
## Complete CubeQuery Reference
```typescript
interface CubeQuery {
// Core query fields
measures?: string[] // e.g., ['Sales.count', 'Sales.revenue']
dimensions?: string[] // e.g., ['Products.category']
// Time dimensions with granularity
timeDimensions?: Array<{
dimension: string // e.g., 'Orders.createdAt'
granularity?: 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year'
dateRange?: string | [string, string]
fillMissingDates?: boolean
compareDateRange?: (string | [string, string])[]
}>
// Filters
filters?: Filter[]
// Ordering
order?: { [key: string]: 'asc' | 'desc' }
// Pagination
limit?: number
offset?: number
// Missing date handling
fillMissingDatesValue?: number | null
}
```
## Filter Operators
```typescript
type FilterOperator =
// Equality
| 'equals' | 'notEquals'
// String matching
| 'contains' | 'notContains' | 'startsWith' | 'endsWith'
// Numeric comparison
| 'gt' | 'gte' | 'lt' | 'lte' | 'between' | 'notBetween'
// Array membership
| 'in' | 'notIn'
// Null checks
| 'set' | 'notSet' | 'isEmpty' | 'isNotEmpty'
// Date operations
| 'inDateRange' | 'beforeDate' | 'afterDate'
// Regex
| 'regex' | 'notRegex'
```
### Filter Examples
```typescript
// Simple filter
{
member: 'Products.category',
operator: 'equals',
vRelated in Ads & Marketing
ads
IncludedMulti-platform paid advertising audit and optimization skill. Analyzes Google, Meta, YouTube, LinkedIn, TikTok, Microsoft, and Apple Ads. 250+ checks with scoring, parallel agents, industry templates, and AI creative generation.
banana
IncludedAI image generation Creative Director powered by Google Gemini Nano Banana models. Use this skill for ANY request involving image creation, editing, visual asset production, or creative direction. Triggers on: generate an image, create a photo, edit this picture, design a logo, make a banner, visual for my anything, and all /banana commands. Handles text-to-image, image editing, multi-turn creative sessions, batch workflows, and brand presets.
rpg-migration-analyzer
IncludedAnalyzes legacy RPG (Report Program Generator) programs from AS/400 and IBM i systems for migration to modern Java applications. Extracts business logic from RPG III/IV/ILE source code, identifies data structures (D-specs), file operations (F-specs), program dependencies (CALLB/CALLP), and converts RPG constructs to Java equivalents. Generates migration reports, complexity estimates, and Java implementation strategies with POJO classes, JPA entities, and service methods. Use when modernizing AS/400 or IBM i legacy systems, analyzing RPG source files (.rpg, .rpgle, .RPGLE), converting RPG to Java, mapping data specifications to Java classes, planning legacy system migration, or when user mentions RPG analysis, Report Program Generator, RPG III/IV/ILE, AS/400 modernization, IBM i migration, packed decimal conversion, or mainframe application rewrite.
brand-library-architect
IncludedBuild a complete brand library for a product — visual asset render pipeline, brand documentation set (BRAND, COPY, MANIFESTO, BIOS, FAQ, GLOSSARY, TONE, PRICING), open-source convention files (README, CONTRIBUTING, SECURITY, CODE_OF_CONDUCT), and a self-contained press kit. This skill should be used when the user asks to "build a brand library / brand kit / press kit / brand assets" for a product, "set up a brand library workflow," "create a positioning manifesto plus visual identity," or any combination of brand documentation + visual asset pipeline. Apply phase-by-phase or run end-to-end. Templates are product-agnostic and use {{TOKEN}} placeholders the skill prompts the user to fill.
writing-tech-post
IncludedAuthors engineering blog posts end-to-end: launch deep-dives, incident postmortems, architecture migrations, performance case studies, tutorials, AI/agent system writeups, security disclosures, and research-to-product translations. Picks the correct archetype, plans the abstraction ladder, enforces an evidence cadence (diagrams, benchmarks, profiles, traces, code, ablations), tunes voice against publisher house styles (Datadog, Vercel, GitHub, AWS, Meta, Cloudflare, Jane Street), and runs a pre-publish gate for narrative momentum and disclosure ethics. Use when drafting a new engineering post, restructuring a draft that feels flat, deciding which evidence form belongs where, validating that depth and product context are balanced, or preparing a postmortem, migration, or performance narrative for external publication. Do not use for API reference documentation, README authoring, marketing copy, release notes, generic SEO content, ghost-written executive thought leadership, or non-engineering long-form essays.
blog-google
IncludedGoogle API integration for blog performance: PageSpeed Insights, CrUX Core Web Vitals with 25-week history, Search Console performance, URL Inspection, Indexing API, GA4 organic traffic, NLP entity analysis for E-E-A-T, YouTube video search for embedding, and Google Ads Keyword Planner. Progressive feature availability based on credential tier (API key, OAuth/service account, GA4, Ads). Shares config with claude-seo at ~/.config/claude-seo/google-api.json. Use when user says "google data", "page speed", "core web vitals", "search console", "indexation", "GA4", "keyword research", "nlp entities", "blog performance", "youtube search", "google api setup".