Index of every page on this site: llms.txt
All skills
  • 1 file
  • 2.5 KB
  • Updated 9 months ago
  • GitHub
Use this Skill: https://skilld.dev/gh/theprimeagen/skills/frontend

Nothing lands on disk. Nothing to clean up.

Fork this Skill

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

SKILL.md

≈3 tokens for metadata: the name and description. ≈634 when used: this file.

SKILL.md has missing or invalid fields
  • The name in the SKILL.md header is missing or is not text.
  • The description in the SKILL.md header is missing or is not text.
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.

SolidJS Component Structure

Rules

  1. Every UI component lives in its own file under src/components/ — one default-exported component per file, named to match the file (e.g. LeftNav.tsx exports LeftNav).
  2. App.tsx is strictly a composition root: it imports top-level components, wires up resources/signals, and returns a shallow JSX tree. No markup beyond layout wrappers and <Show>/<Switch> control flow belongs here.
  3. Co-locate a component's CSS in a file alongside it (ComponentName.css) and import it from the component file. Shared/global styles stay in src/App.css.
  4. When a component grows to contain distinct visual sections, extract each section into its own component file under src/components/ and import it — prefer many small files over one large file.

Example 1: App as a thin composition root

// src/App.tsx
import { createResource, Show } from "solid-js";
import { AuthGate } from "./components/AuthGate";
import { LeftNav } from "./components/LeftNav";
import { MainContent } from "./components/MainContent";
import "./App.css";

const App = () => {
  const [me, { refetch }] = createResource(fetchMe);
  const handleLogout = async () => { await authClient.signOut(); refetch(); };

  return (
    <Show when={!me.loading} fallback={<div class="loading" />}>
      <AuthGate me={me} onLogout={handleLogout}>
        <div class="layout">
          <LeftNav user={me()!.user!} onLogout={handleLogout} />
          <MainContent />
        </div>
      </AuthGate>
    </Show>
  );
};

export default App;

Example 2: A single-responsibility component file

// src/components/LeftNav.tsx
import { createSignal, Show } from "solid-js";
import { ProfilePopup } from "./ProfilePopup";
import "./LeftNav.css";

interface LeftNavProps {
  user: { name: string; image: string | null };
  onLogout: () => void;
}

export function LeftNav(props: LeftNavProps) {
  const [showPopup, setShowPopup] = createSignal(false);

  return (
    <nav class="nav">
      <div class="nav-spacer" />
      <div class="profile-area">
        <button class="profile-button" onClick={() => setShowPopup(!showPopup())}>
          <Show when={props.user.image}>
            <img src={props.user.image!} alt={props.user.name} class="profile-avatar" />
          </Show>
          <span class="profile-name">{props.user.name}</span>
        </button>
        <Show when={showPopup()}>
          <ProfilePopup onLogout={props.onLogout} />
        </Show>
      </div>
    </nav>
  );
}

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 third-party reports yet.

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

Last checked against GitHub last month.

Dormantupdated 9 months ago

README badge

README badge for theprimeagen/skills/frontend