Index of every page on this site: llms.txt
All skills
Run it yourself

Generate React + Bootstrap 5 frontend components and pages following the project design system. Invoke for any new page, component, layout, or visual modification.

Use this Skill: https://skilld.dev/gh/colaberryintern/colaberryenterprise_ai_leadershipaccelerator/frontend-design

Nothing lands on disk. Nothing to clean up.

Fork this Skill

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

SKILL.md

≈45 tokens for metadata: the name and description. ≈1.2k when used: this file.

Description uses 2.3% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈181 characters, or 2.3%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Frontend Design — Component & Page Generator

Workflow

Follow these steps for every frontend task:

  1. Read the target file (if modifying existing code)
  2. Read frontend/src/styles/global.css for design tokens and custom classes
  3. Reference the baseline-ui skill mentally for component patterns
  4. Use Bootstrap 5 utility classes — no custom CSS unless a class already exists in global.css
  5. Match existing patterns from similar pages in the codebase
  6. Write TypeScript with proper interfaces for all props and data structures

Project Stack

  • React 18 with functional components and hooks
  • TypeScript — all components must have typed props interfaces
  • Bootstrap 5 via CDN — utility-first styling, no CSS modules
  • Recharts — for charts and data visualization
  • React Router v6 — useParams, useNavigate, useLocation
  • Auth: useAuth() hook from frontend/src/contexts/AuthContext.tsx provides { token, user }
  • API calls: fetch('/api/admin/...', { headers: { Authorization: 'Bearer ' + token } })

Reference Template Files

Study these files to understand established patterns:

Table + Filter + Pagination + Batch Actions

File: frontend/src/pages/admin/AdminLeadsPage.tsx

  • Search input + filter dropdowns + action buttons in a flex bar
  • table-responsive > table table-hover mb-0 with thead table-light
  • Checkbox selection with Set<number> state
  • Batch action bar appears when items selected
  • Pagination controls at bottom

Tab Shell + KPI Cards

File: frontend/src/pages/admin/AdminCampaignDetailPage.tsx

  • Header with name, badges, action buttons
  • nav nav-tabs mb-4 for tab navigation
  • KPI stat cards in row g-3 with col-md-3 or col-md-4
  • Each tab renders a separate component

Card Columns (Pipeline/Kanban)

File: frontend/src/pages/admin/AdminPipelinePage.tsx

  • row g-3 with col-md-* for column layout
  • Cards inside each column with status-colored headers
  • Draggable/clickable cards with lead summary info

Reusable Badge Component

File: frontend/src/components/TemperatureBadge.tsx

  • Small functional component with typed props
  • Maps data values to Bootstrap badge classes
  • Handles null/undefined gracefully

Component Structure

import React, { useState, useEffect } from 'react';
import { useAuth } from '../../contexts/AuthContext';

interface Props {
  campaignId: string;
  headers: Record<string, string>;
}

interface DataItem {
  id: number;
  name: string;
  // ... typed fields
}

export default function MyComponent({ campaignId, headers }: Props) {
  const [data, setData] = useState<DataItem[]>([]);
  const [loading, setLoading] = useState(true);

  useEffect(() => {
    fetchData();
  }, [campaignId]);

  const fetchData = async () => {
    try {
      const res = await fetch(`/api/admin/campaigns/${campaignId}/data`, { headers });
      const json = await res.json();
      setData(json.data || []);
    } catch (err) {
      console.error('Failed to fetch data:', err);
    } finally {
      setLoading(false);
    }
  };

  if (loading) {
    return (
      <div className="text-center py-5">
        <div className="spinner-border text-primary" />
      </div>
    );
  }

  return (
    <>
      {/* Content */}
    </>
  );
}

Layout Rules

Grid

  • Use row g-3 for grid rows with gutters
  • Use col-md-* for responsive columns (stacks on mobile)
  • Common splits: col-md-3 (4-up), col-md-4 (3-up), col-md-6 (2-up)

Spacing

  • Cards: mb-4 between sections
  • Filter bars: mb-3 below
  • Button groups: d-flex gap-2
  • Inline badges: d-flex gap-2 align-items-center

Responsive

  • Tables: always wrap in div.table-responsive
  • Inputs: form-control-sm or form-select-sm for compact admin forms
  • Constrain filter widths: style={{ maxWidth: 150 }}
  • Stack on mobile: rely on Bootstrap col-md-* grid, no custom breakpoints

Do's and Don'ts

Do

  • Use border-0 shadow-sm on all cards
  • Use bg-white fw-semibold on card headers
  • Use table-light on thead
  • Use btn-sm for all admin action buttons
  • Use small or text-muted for secondary information
  • Use form-control-sm and form-select-sm for admin forms
  • Provide loading spinners for async data
  • Handle empty states with centered muted text

Don't

  • Write custom CSS — use Bootstrap utilities or existing global.css classes
  • Hardcode colors — use CSS variables or Bootstrap classes
  • Use inline styles except for maxWidth, maxHeight, cursor, fontSize tweaks
  • Create new layout wrappers — use existing AdminLayout shell
  • Skip TypeScript interfaces for props or data structures
  • Use any type unless wrapping an untyped API response

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 instructions for generating React and Bootstrap 5 frontend components. It is functional for development but introduces a surface for indirect prompt injection because it requires the agent to read and process existing project files which could contain malicious instructions.

  • Socket8mo

    No alerts

  • Snyk8mo

    Risk: LOW · No issues

  • Runlayer8mo

    1 file scanned · No issues

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

Last checked against GitHub yesterday.

Activeupdated 9 months ago
user-invocable
true

README badge

README badge for colaberryintern/colaberryenterprise_ai_leadershipaccelerator/frontend-design