从 AdMapix API 拉取广告创意、应用、榜单和收入预估等数据,原样返回结构化 JSON。
数据分析
Realtime Dashboard
试用Complete guide to building real-time dashboards with streaming data, WebSocket/SSE, and live updates. Orchestrates dual-stream architecture, React hooks, and data visualization. Use when building trading dashboards, monitoring UIs, or live analytics. Triggers on realtime dashboard, live data, streaming dashboard, trading UI, monitoring.
它能做什么
Complete guide to building real-time dashboards with streaming data.
技能文档
Real-Time Dashboard (Meta-Skill)
Complete guide to building real-time dashboards with streaming data.
Installation
OpenClaw / Moltbot / Clawbot
npx clawhub@latest install realtime-dashboard
When to Use
- Building trading or financial dashboards
- Monitoring and analytics UIs
- Any dashboard needing live data updates
- Systems with server-to-client push requirements
Architecture Overview
┌─────────────────────────────────────────────────────────────┐
│ Data Sources │
│ APIs, Databases, Message Queues │
└─────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ Backend Services │
├─────────────────────────────────────────────────────────────┤
│ Kafka (durable) │ Redis Pub/Sub (real-time) │
│ See: dual-stream-architecture │
└─────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ WebSocket/SSE Gateway │
│ See: websocket-hub-patterns │
└─────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ React Application │
├─────────────────────────────────────────────────────────────┤
│ Real-time Hooks │ Data Visualization │
│ See: realtime-react-hooks│ See: financial-data-visualization
├─────────────────────────────────────────────────────────────┤
│ Animated Displays │ Connection Handling │
│ See: animated-financial │ See: resilient-connections │
└─────────────────────────────────────────────────────────────┘
Implementation Steps
Step 1: Event Publishing
Set up dual-stream publishing for durability + real-time.
Read: ai/skills/realtime/dual-stream-architecture
func (p *DualPublisher) Publish(ctx context.Context, event Event) error {
// 1. Kafka: Must succeed (durable)
err := p.kafka.WriteMessages(ctx, kafka.Message{...})
if err != nil {
return err
}
// 2. Redis: Best-effort (real-time)
p.publishToRedis(ctx, event)
return nil
}
Step 2: WebSocket Gateway
Create horizontally-scalable WebSocket connections.
Read: ai/skills/realtime/websocket-hub-patterns
type Hub struct {
connections map[*Connection]bool
subscriptions map[string]map[*Connection]bool
redisClient *redis.Client
}
// Lazy Redis subscriptions
func (h *Hub) subscribeToChannel(conn *Connection, channel string) {
// Only subscribe to Redis on first local subscriber
}
Step 3: React Hooks
Connect React to real-time data.
Read: ai/skills/realtime/realtime-react-hooks
const { data, isConnected } = useSSE({
url: '/api/events',
onMessage: (data) => updateState(data),
});
// Or with SWR integration
const { data } = useRealtimeData('metrics', fetchMetrics);
Step 4: Resilient Connections
Handle connection failures gracefully.
Read: ai/skills/realtime/resilient-connections
const { isConnected, send } = useWebSocket({
url: 'wss://api/ws',
reconnect: true,
maxRetries: 5,
onMessage: handleMessage,
});
Step 5: Data Visualization
Build dark-themed financial charts.
Read: ai/skills/design-systems/financial-data-visualization
= 0}
/>
Step 6: Animated Displays
Add smooth number animations.
Read: ai/skills/design-systems/animated-financial-display
Component Skills Reference
| Skill | Purpose |
|---|---|
dual-stream-architecture | Kafka + Redis publishing |
websocket-hub-patterns | Scalable WebSocket server |
realtime-react-hooks | SSE/WebSocket React hooks |
resilient-connections | Retry, circuit breaker |
financial-data-visualization | Chart theming |
animated-financial-display | Number animations |
Key Patterns
Streaming Over Blocking
Never wait for all data. Show immediately, improve progressively:
Phase 1: Initial data + hints → Immediate display
Phase 2: Background refinement → Prices update in place
Phase 3: Historical data → Charts populate
Additive-Only Updates
Never zero out data when refinement fails. Only update when you have better data.
Connection Status
Always show users their connection state:
NEVER Do
- Never block on data fetching — Show immediately, refine progressively
- Never skip connection status indicators — Users need to know they're live
- Never use polling when SSE/WebSocket available — Real-time means push, not pull
- Never forget graceful degradation — System should work (degraded) when connection lost
- Never zero out data on refinement failure — Only update when you have better data
- Never reconnect without exponential backoff — Prevents thundering herd
- Never skip Redis Pub/Sub failure handling — Redis is best-effort; log and continue
- Never send full payloads over Redis — Send IDs only, clients fetch from API
- Never share WebSocket pubsub across channels — Each channel needs own subscription
- Never forget ping/pong on WebSocket — Load balancers close "idle" connections
Checklist
- Set up dual-stream publishing (Kafka + Redis)
- Create WebSocket/SSE gateway
- Implement React hooks for real-time data
- Add reconnection with exponential backoff
- Build dark-themed chart components
- Add animated number displays
- Show connection status to users
- Handle errors gracefully
相关技能
把自然语言描述转为结构化 JSON,并由 mcp-diagram-generator MCP 服务生成 Draw.io、Mermaid 或 Excalidraw 图表文件。
基于 git 历史构建人-文件所有权图,定位 bus factor 风险与敏感文件覆盖盲区。
为 Codex 插件搭建目录骨架,生成清单占位符与可选配套文件夹。
Deploy web projects to Netlify using the Netlify CLI (`npx netlify`). Use when the user asks to deploy, host, publish, or link a site/repo on Netlify, including preview and production deploys.
sentry
官方Use when the user asks to inspect Sentry issues or events, summarize recent production errors, or pull basic Sentry health data via the Sentry CLI; perform read-only queries using the `sentry` command
wpank 的更多技能
浏览全部技能Systematic code review patterns covering security, performance, maintainability, correctness, and testing — with severity levels, structured feedback guidance, review process, and anti-patterns to avoid. Use when reviewing PRs, establishing review standards, or improving review quality.
Pragmatic coding standards for writing clean, maintainable code — naming, functions, structure, anti-patterns, and pre-edit safety checks. Use when writing new code, refactoring existing code, reviewing code quality, or establishing coding standards.
Build reliable, fast E2E test suites with Playwright and Cypress. Critical user journey coverage, flaky test elimination, CI/CD integration.
Build scalable, themable Tailwind CSS component libraries using CVA for variants, compound components, design tokens, dark mode, and responsive grids.
Create software diagrams using Mermaid syntax. Use when users need to create, visualize, or document software through diagrams including class diagrams, sequence diagrams, flowcharts, ERDs, C4 architecture diagrams, state diagrams, git graphs, and other diagram types. Triggers include requests to diagram, visualize, model, map out, or show the flow of a system.
Provides backend architecture patterns (Clean Architecture, Hexagonal, DDD) for building maintainable, testable, and scalable systems with clear layering and...