Index of every page on this site: llms.txt
All skills
comet-ml avatar

/opik-frontend

@9b3d88e
by Cometcomet-ml/opik23k stars
1,964
Run it yourself

React frontend patterns for Opik. Use when working in apps/opik-frontend, on components, state, or data fetching.

Use this Skill: https://skilld.dev/gh/comet-ml/opik/opik-frontend

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

ui-components.md

≈927 tokens on demand. Your agent reads this file only when SKILL.md points to it.

UI Components & Design System

Button Variants

// Primary actions
<Button variant="default">Save</Button>
<Button variant="special">Special Action</Button>

// Secondary actions
<Button variant="secondary">Cancel</Button>
<Button variant="outline">Edit</Button>

// Destructive actions
<Button variant="destructive">Delete</Button>

// Minimal/Ghost actions
<Button variant="ghost">Link Action</Button>
<Button variant="ghostInverted">Action on Dark BG</Button>
<Button variant="minimal">Subtle Action</Button>

// Link actions
<Button variant="link">Link</Button>
<Button variant="tableLink">Table Link</Button>

// Icon buttons
<Button variant="default" size="icon"><Icon /></Button>
<Button variant="ghost" size="icon-sm"><Icon /></Button>

// Sizes: "3xs" | "2xs" | "xs" | "sm" | "default" | "lg"
// Icon sizes: "icon-3xs" | "icon-2xs" | "icon-xs" | "icon-sm" | "icon" | "icon-lg"

DataTable Column Types

import { COLUMN_TYPE, ROW_HEIGHT } from "@/types/shared";

// Available types
COLUMN_TYPE.string      // Text data
COLUMN_TYPE.number      // Numeric data
COLUMN_TYPE.time        // Date/time data
COLUMN_TYPE.duration    // Duration data
COLUMN_TYPE.cost        // Cost data
COLUMN_TYPE.list        // Array data
COLUMN_TYPE.dictionary  // Object data
COLUMN_TYPE.numberDictionary  // Feedback scores
COLUMN_TYPE.category    // Category/tag data

Typography Classes

/* Titles */
.comet-title-xl    /* 3xl font-medium */
.comet-title-l     /* 2xl font-medium */
.comet-title-m     /* xl font-medium */
.comet-title-s     /* lg font-medium */
.comet-title-xs    /* sm font-medium */

/* Body text */
.comet-body               /* base font-normal */
.comet-body-accented      /* base font-medium */
.comet-body-s             /* sm font-normal */
.comet-body-s-accented    /* sm font-medium */
.comet-body-xs            /* xs font-normal */

/* Code */
.comet-code               /* monospace font */

Layout Classes

.comet-header-height      /* 64px header */
.comet-sidebar-width      /* sidebar width */
.comet-content-inset      /* content padding */
.comet-custom-scrollbar   /* custom scrollbar */
.comet-no-scrollbar       /* hide scrollbar */

Custom CSS Class Prefix

Always use comet- prefix for custom classes:

className="comet-table-row-active"
className="comet-sidebar-collapsed"

Dark Theme Support

// ✅ GOOD - Use theme-aware classes
<div className="bg-card text-card-foreground border border-border">
  <h2 className="text-primary">Title</h2>
  <p className="text-muted-foreground">Description</p>
</div>

// ❌ BAD - Hard-coded colors
<div className="bg-white text-black border-gray-200">

Add new colors to main.css with dark alternatives:

:root {
  --my-custom-color: 210 100% 50%;
}
.dark {
  --my-custom-color: 220 100% 60%;
}

Color System

/* Primary */
bg-primary text-primary-foreground hover:bg-primary-hover

/* Secondary */
bg-secondary text-secondary-foreground

/* Muted */
bg-muted text-muted-foreground text-muted-gray

/* Destructive */
bg-destructive text-destructive-foreground border-destructive

State Classes

// Loading
<Skeleton className="h-4 w-full" />

// Error
className={cn("border", { "border-destructive": hasError })}

// Active
"comet-table-row-active"

// Disabled
"disabled:opacity-50 disabled:pointer-events-none"

Spacing

  • Gaps: gap-2, gap-4, gap-6, gap-8
  • Padding: p-2, p-4, p-6
  • Border radius: rounded-md (default), rounded-lg

Component Placement

  • Reusable: shared/
  • Page-specific: Same folder as parent component
  • Low-level UI: ui/

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts8mo4 checks · Risk SAFE
  • Gen Agent Trust Hub8mo

    This skill provides a comprehensive set of architectural guidelines and coding standards for developing the Opik React frontend. It promotes industry-standard best practices, such as using Zod for form validation and TanStack Query for data fetching, and contains no security vulnerabilities or malicious patterns.

  • Socket8mo

    No alerts

  • Snyk8mo

    Risk: LOW · No issues

  • Runlayer8mo

    7 files scanned · No issues

Signed by skilld at 9b3d88e. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 4 months ago

README badge

README badge for comet-ml/opik/opik-frontend