← 返回 Skills 市场
wpank

Financial Design Systems

作者 wpank · GitHub ↗ · v1.0.0
cross-platform ✓ 安全检测通过
1148
总下载
0
收藏
3
当前安装
1
版本数
在 OpenClaw 中安装
/install financial-design-systems
功能描述
Patterns for building dark-themed financial charts and data visualizations. Covers chart theming, color scales for gains/losses, and real-time data display. Use when building trading dashboards or financial analytics. Triggers on chart theme, data visualization, financial chart, dark theme, gains losses, trading UI.
使用说明 (SKILL.md)

Financial Data Visualization

Build dark-themed financial charts and visualizations that are readable, beautiful, and consistent with modern trading UIs.


When to Use

  • Building trading dashboards with charts
  • Displaying portfolio performance
  • Showing price history and trends
  • Any financial data visualization

Pattern 1: Chart Color Palette

// lib/chart-theme.ts
export const chartColors = {
  // Gains/Losses
  positive: 'hsl(154 80% 60%)',    // Green
  negative: 'hsl(346 80% 62%)',    // Red
  neutral: 'hsl(216 90% 68%)',     // Blue
  
  // Backgrounds
  background: 'hsl(222 47% 11%)',
  surface: 'hsl(222 47% 15%)',
  grid: 'hsl(222 47% 20%)',
  
  // Text
  textPrimary: 'hsl(210 40% 98%)',
  textSecondary: 'hsl(215 20% 65%)',
  textMuted: 'hsl(215 20% 45%)',
  
  // Data series
  series: [
    'hsl(200 90% 65%)',  // Cyan
    'hsl(280 90% 65%)',  // Purple
    'hsl(45 90% 65%)',   // Gold
    'hsl(160 90% 65%)',  // Teal
    'hsl(320 90% 65%)',  // Pink
  ],
};

Pattern 2: Recharts Theme Config

// components/charts/chart-config.ts
import { chartColors } from '@/lib/chart-theme';

export const chartConfig = {
  // Axis styling
  axisStyle: {
    stroke: chartColors.textMuted,
    fontSize: 11,
    fontFamily: 'var(--font-mono)',
  },
  
  // Grid styling
  gridStyle: {
    stroke: chartColors.grid,
    strokeDasharray: '3 3',
  },
  
  // Tooltip styling
  tooltipStyle: {
    backgroundColor: chartColors.surface,
    border: `1px solid ${chartColors.grid}`,
    borderRadius: '8px',
    boxShadow: '0 4px 12px rgba(0, 0, 0, 0.3)',
  },
};

// Custom tooltip component
export function ChartTooltip({ active, payload, label }: any) {
  if (!active || !payload) return null;

  return (
    \x3Cdiv
      className="rounded-lg border bg-popover px-3 py-2 shadow-lg"
      style={chartConfig.tooltipStyle}
    >
      \x3Cp className="text-xs text-muted-foreground mb-1">{label}\x3C/p>
      {payload.map((entry: any, index: number) => (
        \x3Cp
          key={index}
          className="text-sm font-mono tabular-nums"
          style={{ color: entry.color }}
        >
          {entry.name}: {formatCurrency(entry.value)}
        \x3C/p>
      ))}
    \x3C/div>
  );
}

Pattern 3: Price Chart Component

import {
  AreaChart,
  Area,
  XAxis,
  YAxis,
  Tooltip,
  ResponsiveContainer,
} from 'recharts';

interface PriceChartProps {
  data: { time: string; price: number }[];
  isPositive?: boolean;
}

export function PriceChart({ data, isPositive = true }: PriceChartProps) {
  const color = isPositive ? chartColors.positive : chartColors.negative;
  
  return (
    \x3CResponsiveContainer width="100%" height={200}>
      \x3CAreaChart data={data}>
        \x3Cdefs>
          \x3ClinearGradient id="priceGradient" x1="0" y1="0" x2="0" y2="1">
            \x3Cstop offset="0%" stopColor={color} stopOpacity={0.3} />
            \x3Cstop offset="100%" stopColor={color} stopOpacity={0} />
          \x3C/linearGradient>
        \x3C/defs>
        
        \x3CXAxis
          dataKey="time"
          axisLine={false}
          tickLine={false}
          tick={{ ...chartConfig.axisStyle }}
        />
        
        \x3CYAxis
          domain={['auto', 'auto']}
          axisLine={false}
          tickLine={false}
          tick={{ ...chartConfig.axisStyle }}
          tickFormatter={(value) => formatCompact(value)}
        />
        
        \x3CTooltip content={\x3CChartTooltip />} />
        
        \x3CArea
          type="monotone"
          dataKey="price"
          stroke={color}
          strokeWidth={2}
          fill="url(#priceGradient)"
        />
      \x3C/AreaChart>
    \x3C/ResponsiveContainer>
  );
}

Pattern 4: Candlestick Colors

export const candlestickColors = {
  up: {
    fill: 'hsl(154 80% 60%)',
    stroke: 'hsl(154 80% 50%)',
  },
  down: {
    fill: 'hsl(346 80% 62%)',
    stroke: 'hsl(346 80% 52%)',
  },
  wick: 'hsl(215 20% 45%)',
};

// Usage with lightweight-charts or similar
const candlestickSeries = chart.addCandlestickSeries({
  upColor: candlestickColors.up.fill,
  downColor: candlestickColors.down.fill,
  borderUpColor: candlestickColors.up.stroke,
  borderDownColor: candlestickColors.down.stroke,
  wickUpColor: candlestickColors.wick,
  wickDownColor: candlestickColors.wick,
});

Pattern 5: Percentage Bar

interface PercentageBarProps {
  value: number;  // -100 to 100
  showLabel?: boolean;
}

export function PercentageBar({ value, showLabel = true }: PercentageBarProps) {
  const isPositive = value >= 0;
  const absValue = Math.min(Math.abs(value), 100);

  return (
    \x3Cdiv className="flex items-center gap-2">
      {/* Negative side */}
      \x3Cdiv className="flex-1 flex justify-end">
        {!isPositive && (
          \x3Cdiv
            className="h-2 rounded-l bg-destructive"
            style={{ width: `${absValue}%` }}
          />
        )}
      \x3C/div>
      
      {/* Center divider */}
      \x3Cdiv className="w-px h-4 bg-border" />
      
      {/* Positive side */}
      \x3Cdiv className="flex-1">
        {isPositive && (
          \x3Cdiv
            className="h-2 rounded-r bg-success"
            style={{ width: `${absValue}%` }}
          />
        )}
      \x3C/div>
      
      {showLabel && (
        \x3Cspan
          className={cn(
            'text-xs font-mono tabular-nums w-12 text-right',
            isPositive ? 'text-success' : 'text-destructive'
          )}
        >
          {formatPercentage(value)}
        \x3C/span>
      )}
    \x3C/div>
  );
}

Pattern 6: Mini Sparkline

interface SparklineProps {
  data: number[];
  width?: number;
  height?: number;
}

export function Sparkline({ data, width = 80, height = 24 }: SparklineProps) {
  const first = data[0];
  const last = data[data.length - 1];
  const isPositive = last >= first;
  const color = isPositive ? chartColors.positive : chartColors.negative;

  const min = Math.min(...data);
  const max = Math.max(...data);
  const range = max - min || 1;

  const points = data
    .map((value, i) => {
      const x = (i / (data.length - 1)) * width;
      const y = height - ((value - min) / range) * height;
      return `${x},${y}`;
    })
    .join(' ');

  return (
    \x3Csvg width={width} height={height} className="overflow-visible">
      \x3Cpolyline
        points={points}
        fill="none"
        stroke={color}
        strokeWidth={1.5}
        strokeLinecap="round"
        strokeLinejoin="round"
      />
    \x3C/svg>
  );
}

Pattern 7: Chart Legend

interface LegendItem {
  label: string;
  color: string;
  value?: string;
}

export function ChartLegend({ items }: { items: LegendItem[] }) {
  return (
    \x3Cdiv className="flex flex-wrap gap-4">
      {items.map((item) => (
        \x3Cdiv key={item.label} className="flex items-center gap-2">
          \x3Cdiv
            className="size-3 rounded-full"
            style={{ backgroundColor: item.color }}
          />
          \x3Cspan className="text-xs text-muted-foreground">{item.label}\x3C/span>
          {item.value && (
            \x3Cspan className="text-xs font-mono">{item.value}\x3C/span>
          )}
        \x3C/div>
      ))}
    \x3C/div>
  );
}

Related Skills


NEVER Do

  • Use light theme colors — Ensure sufficient contrast on dark backgrounds
  • Use red/green without considering colorblind users — Add shapes or patterns
  • Skip grid lines — They help read values
  • Use thick strokes — 1-2px is optimal for data lines
  • Animate charts on every data point — Reserve animation for initial load

Quick Reference

// Color assignment
const color = value >= 0 ? chartColors.positive : chartColors.negative;

// Gradient definition
\x3ClinearGradient id="gradient" x1="0" y1="0" x2="0" y2="1">
  \x3Cstop offset="0%" stopColor={color} stopOpacity={0.3} />
  \x3Cstop offset="100%" stopColor={color} stopOpacity={0} />
\x3C/linearGradient>

// Axis styling
\x3CXAxis tick={{ fill: chartColors.textMuted, fontSize: 11 }} />

// Tooltip styling
\x3CTooltip contentStyle={{ background: chartColors.surface }} />
安全使用建议
This skill appears coherent and focused on UI patterns for financial charts. Before installing or executing any of the README's shell commands: (1) verify the source repository and review the full code for any network calls or unexpected behavior, (2) avoid blindly running arbitrary npx commands pointing at unfamiliar URLs—prefer cloning the official repo or installing from a trusted package source, (3) inspect any copied files for scripts that might access local paths, and (4) confirm license and provenance if you plan to include the code in production. Autonomous invocation is normal, but you should still review the skill's content before granting it run-time use in automated workflows.
功能分析
Type: OpenClaw Skill Name: financial-design-systems Version: 1.0.0 The skill bundle provides code and instructions for building dark-themed financial charts and data visualizations. All code snippets are benign React/TypeScript for UI rendering and styling. The `SKILL.md` contains no prompt injection attempts with malicious intent, and the `README.md` outlines standard installation procedures, including fetching from a public GitHub repository via `npx add` and local file copying. There is no evidence of data exfiltration, malicious execution, persistence, or obfuscation.
能力评估
Purpose & Capability
Name/description match the contents: the SKILL.md contains UI code snippets, color palettes, and chart components appropriate for a financial design-systems skill. There are no unrelated environment variables, binaries, or capabilities requested.
Instruction Scope
The runtime instructions are just design patterns and example components (Recharts, lightweight-charts, SVG sparklines). They do not direct the agent to read local secrets, system files, or send data to external endpoints. No vague 'gather any context' language was found.
Install Mechanism
The registry entry has no install spec (lowest risk). The README includes example installation commands (an 'npx add' with a GitHub tree URL and instructions copying from ~/.ai-skills or ~/.cursor), which are not part of the skill registry install spec and should be treated as documentation only. Advisable to verify and prefer cloning or installing from an official repo rather than blindly running npx commands that reference arbitrary URLs.
Credentials
No environment variables, credentials, or config paths are required. The skill does not request secret tokens or unrelated credentials.
Persistence & Privilege
always is false and the skill does not request persistent/privileged installation. It is user-invocable and may be invoked autonomously (platform default), which is expected for a skill of this type.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install financial-design-systems
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /financial-design-systems 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of the financial-data-visualization skill. - Provides patterns for building dark-themed financial charts and dashboards. - Includes chart theming, color scales for gains/losses, and real-time data visualization best practices. - Offers example code for price charts, candlestick colors, percentage bars, sparklines, and chart legends. - Designed for use in trading UIs and financial analytics products.
元数据
Slug financial-design-systems
版本 1.0.0
许可证
累计安装 3
当前安装数 3
历史版本数 1
常见问题

Financial Design Systems 是什么?

Patterns for building dark-themed financial charts and data visualizations. Covers chart theming, color scales for gains/losses, and real-time data display. Use when building trading dashboards or financial analytics. Triggers on chart theme, data visualization, financial chart, dark theme, gains losses, trading UI. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 1148 次。

如何安装 Financial Design Systems?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install financial-design-systems」即可一键安装,无需额外配置。

Financial Design Systems 是免费的吗?

是的,Financial Design Systems 完全免费(开源免费),可自由下载、安装和使用。

Financial Design Systems 支持哪些平台?

Financial Design Systems 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Financial Design Systems?

由 wpank(@wpank)开发并维护,当前版本 v1.0.0。

💬 留言讨论