business-intelligence
Expert business intelligence covering dashboard design, data visualization, reporting automation, and executive insights delivery. Use when designing dashboards, building KPI frameworks, automating scheduled reports, creating data stories for stakeholders, or optimizing BI tool performance.
What this skill does
# Business Intelligence
The agent operates as a senior BI specialist, designing dashboards, defining KPI frameworks, automating reporting pipelines, and translating data into executive-ready narratives.
## Workflow
1. **Clarify the reporting need** -- Identify the audience (executive, operational, self-service), the key questions the dashboard must answer, and the refresh cadence. Validate that required data sources exist and are accessible.
2. **Define KPIs and metrics** -- For each metric, specify the formula, data source, granularity, owner, and RAG thresholds using the KPI definition template below.
3. **Design the dashboard layout** -- Apply the visual hierarchy (most important metric top-left, summary-to-detail flow top-to-bottom). Select chart types using the chart selection matrix. Limit to 5-8 visualizations per page.
4. **Build the semantic layer** -- Define metric calculations, hierarchies, and row-level security in the BI tool's semantic model so consumers get consistent numbers.
5. **Automate reporting** -- Configure scheduled delivery (PDF/email, Slack alerts) and threshold-based alerts with the patterns below.
6. **Validate and iterate** -- Confirm KPI values match source-of-truth queries. Check dashboard load time (<5 s target). Gather stakeholder feedback and refine.
## KPI Definition Template
```yaml
# Copy and fill for each metric
kpi:
name: "Monthly Recurring Revenue"
owner: "Finance"
purpose: "Track subscription revenue health"
formula: "SUM(subscription_amount) WHERE status = 'active'"
data_source: "billing.subscriptions"
granularity: "monthly"
target: 1200000
warning_threshold: 1080000 # 90% of target
critical_threshold: 960000 # 80% of target
dimensions: ["region", "plan_tier", "cohort_month"]
caveats:
- "Excludes one-time setup fees"
- "Currency normalized to USD at month-end rate"
```
## Dashboard Design Principles
**Visual hierarchy:**
1. Most important metrics at top-left
2. Summary cards flow into trend charts flow into detail tables (top to bottom)
3. Related metrics grouped; white space separates logical sections
4. RAG status colors: Green `#28A745` | Yellow `#FFC107` | Red `#DC3545` | Gray `#6C757D`
**Chart selection matrix:**
| Data question | Chart type | Alternative |
|---------------|-----------|-------------|
| Trend over time | Line | Area |
| Part of whole | Donut / Treemap | Stacked bar |
| Comparison across categories | Bar / Column | Bullet |
| Distribution | Histogram | Box plot |
| Relationship | Scatter | Bubble |
| Geographic | Choropleth | Filled map |
## Executive Dashboard Example
```
+------------------------------------------------------------+
| EXECUTIVE SUMMARY |
| Revenue: $12.4M (+15% YoY) Pipeline: $45.2M (+22% QoQ) |
| Customers: 2,847 (+340 MTD) NPS: 72 (+5 pts) |
+------------------------------------------------------------+
| REVENUE TREND (12-mo line) | REVENUE BY SEGMENT (donut) |
+-------------------------------+-----------------------------+
| TOP 10 ACCOUNTS (table) | KPI STATUS (RAG cards) |
+-------------------------------+-----------------------------+
```
## Report Automation Patterns
**Scheduled report (cron-style):**
```yaml
report:
name: Weekly Sales Report
schedule: "0 8 * * MON"
recipients: [[email protected], [email protected]]
format: PDF
pages: [Executive Summary, Pipeline Analysis, Rep Performance]
```
**Threshold alert:**
```yaml
alert:
name: Revenue Below Target
metric: daily_revenue
condition: "actual < target * 0.9"
channels:
email: [email protected]
slack: "#revenue-alerts"
message: "Daily revenue ${actual} is ${pct_diff}% below target. Top factors: ${top_factors}"
```
**Automated generation workflow (Python):**
```python
def generate_report(config: dict) -> str:
"""Generate and distribute a scheduled report."""
# 1. Refresh data sources
refresh_data_sources(config["sources"])
# 2. Calculate metrics
metrics = calculate_metrics(config["metrics"])
# 3. Create visualizations
charts = create_visualizations(metrics, config["charts"])
# 4. Compile into report
report = compile_report(metrics=metrics, charts=charts, template=config["template"])
# 5. Distribute
distribute_report(report, recipients=config["recipients"], fmt=config["format"])
return report.path
```
## Self-Service BI Maturity Model
| Level | Capability | Users can... |
|-------|-----------|-------------|
| 1 - Consumers | View & filter | Open dashboards, apply filters, export data |
| 2 - Explorers | Ad-hoc queries | Write simple queries, create basic charts, share findings |
| 3 - Builders | Design dashboards | Combine data sources, create calculated fields, publish reports |
| 4 - Modelers | Define data models | Create semantic models, define metrics, optimize performance |
## Performance Optimization Checklist
- [ ] Limit visualizations per page (5-8 max)
- [ ] Use data extracts or materialized views instead of live connections for heavy dashboards
- [ ] Minimize calculated fields in the visualization layer; push logic to the semantic layer or warehouse
- [ ] Apply context filters to reduce query scope
- [ ] Aggregate at source when granularity allows
- [ ] Schedule data refreshes during off-peak hours
- [ ] Monitor and log query execution times; target < 5 s per dashboard load
**Query optimization example:**
```sql
-- Before: full table scan
SELECT * FROM large_table WHERE date >= '2024-01-01';
-- After: partitioned, filtered, and column-pruned
SELECT order_id, customer_id, amount
FROM large_table
WHERE partition_date >= '2024-01-01'
AND status = 'active'
LIMIT 10000;
```
## Data Storytelling Structure
The agent frames every insight using Situation-Complication-Resolution:
1. **Situation** -- "Last quarter we targeted 10% retention improvement."
2. **Complication** -- "Enterprise churn rose 5%, driven by 30-day onboarding delays."
3. **Resolution** -- "Reducing onboarding to 14 days correlates with 40% lower churn and could save $2M annually."
## Governance
```yaml
security_model:
row_level_security:
- rule: region_access
filter: "region = user.region"
object_permissions:
- role: viewer
permissions: [view, export]
- role: editor
permissions: [view, export, edit]
- role: admin
permissions: [view, export, edit, delete, publish]
```
## Reference Materials
- `references/dashboard_patterns.md` -- Dashboard design patterns
- `references/visualization_guide.md` -- Chart selection guide
- `references/kpi_library.md` -- Standard KPI definitions
- `references/storytelling.md` -- Data storytelling techniques
## Scripts
```bash
python scripts/kpi_tracker.py --definitions kpis.json --data sales.csv
python scripts/kpi_tracker.py --definitions kpis.json --data sales.csv --json
python scripts/dashboard_spec_generator.py --definitions kpis.json --title "Sales Dashboard"
python scripts/dashboard_spec_generator.py --definitions kpis.json --layout 3-column --json
python scripts/metric_validator.py --definitions metrics.json --strict
python scripts/metric_validator.py --definitions metrics.json --json
```
## Tool Reference
| Tool | Purpose | Key Flags |
|------|---------|-----------|
| `kpi_tracker.py` | Calculate KPIs from data against targets; report RAG status and variance | `--definitions <json>`, `--data <csv/json>`, `--json` |
| `dashboard_spec_generator.py` | Generate dashboard layout specs (chart types, positions, filters) from KPI definitions | `--definitions <json>`, `--title`, `--layout 2-column/3-column`, `--json` |
| `metric_validator.py` | Validate metric definitions for completeness, naming, threshold logic, and consistency | `--definitions <json>`, `--strict`, `--json` |
## Troubleshooting
| Problem | Likely Cause | Resolution |
|---------|-------------|------------|
| Dashboard loads slowly (> 5 s) | Too many visualizations or live-connecRelated in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context — no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development — guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.