070-ui-components

070-ui-components is a cursor rule for Cursor from juandoroteoflesiauni-lang/Market-options-stocks-Scanner. It costs 0 tokens per session (2,573 once invoked), scanned A, original, Apache-2.0.

A set of Spanish rules for designing user-interface components in a trading terminal, including price displays, charts, orders, and portfolios. A trading terminal is software for viewing market data and managing trades.

In plain words
What is it for?
Use it when building or reviewing trading dashboards and their prices, charts, order panels, and portfolio views.
Why use it?
It gives development work consistent visual and behavior rules for financial data, including colors, fonts, and states such as buying or selling.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it when building or reviewing trading dashboards and their prices, charts, order panels, and portfolio views.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/juandoroteoflesiauni-lang/market-options-stocks-scanner/070-ui-components
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/juandoroteoflesiauni-lang/Market-options-stocks-Scanner

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for 070-ui-components

README.md
[![agentmods](https://agentmods.dev/badge/rules/juandoroteoflesiauni-lang/market-options-stocks-scanner/070-ui-components/github.svg)](https://agentmods.dev/rules/juandoroteoflesiauni-lang/market-options-stocks-scanner/070-ui-components)
Your own site
<a href="https://agentmods.dev/rules/juandoroteoflesiauni-lang/market-options-stocks-scanner/070-ui-components"><img src="https://agentmods.dev/badge/rules/juandoroteoflesiauni-lang/market-options-stocks-scanner/070-ui-components/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for 070-ui-components

Your own site · 80×15
<a href="https://agentmods.dev/rules/juandoroteoflesiauni-lang/market-options-stocks-scanner/070-ui-components"><img src="https://agentmods.dev/badge/rules/juandoroteoflesiauni-lang/market-options-stocks-scanner/070-ui-components.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 2,573 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.02573
Opus 5 $0.00000 $0.01287
Sonnet 5 $0.00000 $0.00515
Haiku 4.5 $0.00000 $0.00257

Measured 12d ago against content hash de4f268bb798, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

070-ui-components scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/070-ui-components.mdc · 342 lines

How it starts

The opening of the file, as written. The whole thing — 342 lines — stays where its author put it; the contents beside it link to each section on GitHub.

🖥️ UI COMPONENTS — TRADING TERMINAL

DISEÑO DE LA TERMINAL DE TRADING

Tema visual obligatorio:

/* design-tokens.css — Variables globales */
:root {
  /* Colores base — Tema oscuro como Bloomberg/TradingView */
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-panel: #1c2128;
  --bg-card: #21262d;

  /* Colores de trading */
  --color-buy: #00c851;        /* Verde — Compra */
  --color-sell: #ff4444;       /* Rojo — Venta */
  --color-neutral: #f0c040;    /* Amarillo — Neutro/Pendiente */

  /* Texto */
  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --text-muted: #484f58;

  /* Bordes */
  --border-default: #30363d;
  --border-accent: #388bfd;

  /* Tipografía */
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace; /* Para precios */
  --font-ui: 'Inter', system-ui, sans-serif;
}

📊 COMPONENTES DE PRECIOS — Reglas Críticas

// ✅ CORRECTO — Precio con color dinámico y fuente monoespaciada

interface PriceDisplayProps {
  price: number;
  previousPrice?: number;
  decimals?: number;
  showChange?: boolean;
}

const PriceDisplay: React.FC<PriceDisplayProps> = ({
  price,
  previousPrice,
  decimals = 2,
  showChange = false
}) => {
  const isUp = previousPrice !== undefined && price > previousPrice;
  const isDown = previousPrice !== undefined && price < previousPrice;
  const changeColor = isUp ? 'text-[#00c851]' : isDown ? 'text-[#ff4444]' : 'text-[#e6edf3]';

  return (
    <span
      className={`font-mono font-semibold tabular-nums ${changeColor}`}
      aria-label={`Precio: ${price.toFixed(decimals)}`}
    >
      {price.toFixed(decimals)}
    </span>
  );
};

// REGLAS DE PRECIOS EN UI:
// 1. SIEMPRE usar font-mono para precios (alineación de dígitos)
// 2. SIEMPRE tabular-nums para evitar saltos visuales
// 3. Verde para subida, rojo para bajada
// 4. Decimales fijos según el instrumento (BTC=2, FOREX=5)

📋 FORMULARIO DE ÓRDENES

// components/orders/OrderForm.tsx

interface OrderFormState {
  side: 'BUY' | 'SELL';
  orderType: 'MARKET' | 'LIMIT' | 'STOP_LIMIT';
  quantity: string;
  price: string;
  stopPrice: string;
}

const OrderForm: React.FC<{ symbol: string; onOrderPlaced: (id: string) => void }> = ({
  symbol,
  onOrderPlaced
}) => {
  const [state, setState] = useState<OrderFormState>({
    side: 'BUY',
    orderType: 'MARKET',
    quantity: '',
    price: '',
    stopPrice: ''
  });
  const [isLoading, setIsLoading] = useState(false);
  const [error, setError] = useState<string | null>(null);

  // Validación del formulario
  const validateForm = (): string | null => {
    const qty = parseFloat(state.quantity);
    if (isNaN(qty) || qty <= 0) return 'Cantidad debe ser un número positivo';
    if (state.orderType === 'LIMIT' && !state.price) return 'Precio requerido para orden LIMIT';
    return null;
  };

  const handleSubmit = async () => {
    setError(null);
    const validationError = validateForm();
    if (validationError) { setError(validationError); return; }

    setIsLoading(true);
    try {
      const order = await orderService.placeOrder({
        symbol,
        side: state.side,
        orderType: state.orderType,
        quantity: state.quantity,
        price: state.price || undefined
      });
      onOrderPlaced(order.orderId);
    } catch (err) {
      setError(err instanceof Error ? err.message : 'Error al enviar orden');
    } finally {
      setIsLoading(false);
    }
  };

  return (
    <div className="bg-[#1c2128] border border-[#30363d] rounded-lg p-4">
      {/* Selector BUY/SELL */}
      <div className="grid grid-cols-2 gap-1 mb-4">
        <button
          onClick={() => setState(s => ({ ...s, side: 'BUY' }))}
          className={`py-2 rounded font-semibold transition-colors ${
            state.side === 'BUY'
              ? 'bg-[#00c851] text-black'
              : 'bg-[#21262d] text-[#8b949e] hover:bg-[#00c851]/20'
          }`}
        >
          COMPRAR
        </button>
        <button
          onClick={() => setState(s => ({ ...s, side: 'SELL' }))}
          className={`py-2 rounded font-semibold transition-colors ${
            state.side === 'SELL'
              ? 'bg-[#ff4444] text-white'
              : 'bg-[#21262d] text-[#8b949e] hover:bg-[#ff4444]/20'
          }`}
        >
          VENDER
        </button>
      </div>

      {/* Campo Cantidad */}
      <div className="mb-3">
        <label className="block text-[#8b949e] text-xs mb-1">Cantidad</label>
        <input
          type="number"
          value={state.quantity}
          onChange={e => setState(s => ({ ...s, quantity: e.target.value }))}
          placeholder="0.00"
          min="0"
          step="any"
          className="w-full bg-[#21262d] border border-[#30363d] text-[#e6edf3]
                     font-mono rounded px-3 py-2 focus:border-[#388bfd] outline-none"
        />
      </div>

      {/* Error */}
      {error && (
        <div role="alert" className="text-[#ff4444] text-sm mb-3 p-2 bg-[#ff4444]/10 rounded">
          ⚠️ {error}
        </div>
      )}

      {/* Submit */}
      <button
        onClick={handleSubmit}
        disabled={isLoading}
        className={`w-full py-3 rounded font-semibold transition-all
          ${state.side === 'BUY'
            ? 'bg-[#00c851] hover:bg-[#00a843] text-black'
            : 'bg-[#ff4444] hover:bg-[#cc3333] text-white'
          }
          disabled:opacity-50 disabled:cursor-not-allowed`}
      >
        {isLoading ? 'Enviando...' : `${state.side === 'BUY' ? 'Comprar' : 'Vender'} ${symbol}`}
      </button>
    </div>
  );
};

Read the full file on GitHub · 342 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 342 lines · 0 tokens per session scan A de4f268bb798

Subscribe to this mod's changes

070-ui-components is a cursor rule published in the GitHub repository juandoroteoflesiauni-lang/Market-options-stocks-Scanner (11 stars, last pushed 2mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 2,573 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.