agentleFS
skeletonlabsskeletonlabs/skeleton/.agents/skills/create-example/SKILL.md

create-example

Skill6.1k starsChanged 4 days agoMITView on GitHub

Scaffold an example file (Astro or framework-specific) for a Skeleton documentation page, including the MDX import wiring and Preview/Framework blocks.

3 other projects use a version of this.

Trending

More talk lately.about the whole repository

Dec 2025: 1 mentionJan 2026: 2 mentionsFeb 2026: 1 mentionMar 2026: 0 mentionsApr 2026: 1 mentionMay 2026: 1 mentionJun 2026: 4 mentionsJul 2026: 6 mentionsAug 2026: 4 mentionsSep 2026: 1 mentionOct 2026: 4 mentionsNov 2026: 11 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the skeletonlabs/skeleton repository that our weekly crawl found. There is no adoption data for this file yet.

Most recently taken up by

Who's talking about skeletonlabs/skeleton

The biggest 5 of 53 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 53

Talked about on GitHub, Hacker News and Bluesky (53 times).

On GitHub · 50

45 more on GitHub
  • Other versions3 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 3

    1. TypeCellOS/BlockNote★ 10ksame name
    2. liveblocks/liveblocks★ 4.8ksame name
    3. microsoft/webui★ 102same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository4 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Only renders its children when the active framework switcher matches id.

    line 72
  2. Distinctive:

    Ask only what can't be inferred:

    line 96
  3. Very specific:

    When invoked from /create-doc with a list of examples and an inferred type per example, skip prompting and scaffold directly.

    line 103

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Create Example

Scaffold a new example for a Skeleton doc page under sites/skeleton.dev/src/components/examples/, and add the import + render wiring to the parent .mdx.

Folder layout mirrors the docs tree: examples/<category>/<slug>/.

Example types

TypePathWhen to use
Astro (neutral)<slug>/<name>.astroHTML/CSS-only demo; no state, events, or framework imports needed
React<slug>/react/<name>.tsxDemo needs React state/events or imports from @skeletonlabs/skeleton-react
Svelte<slug>/svelte/<name>.svelteDemo needs Svelte runes/snippets or imports from @skeletonlabs/skeleton-svelte

A single doc page can mix types per example. Defaults:

  • Tailwind-component pages → .astro, fall back to framework-specific only when the demo requires state/events (see buttons/ — default.astro + react/group.tsx + svelte/group.svelte).
  • Framework-component pages → both react/ and svelte/, always paired (see accordion/).

File conventions

  • First example on a page is always named default (lowercase). Subsequent examples use descriptive kebab-case (e.g. sizes, controlled, indicator).
  • Astro file starts with an Astro frontmatter block (---\n...imports...\n---) even when empty.
  • React file default-exports a function component; import icons from lucide-react.
  • Svelte file uses <script lang="ts">; import icons from @lucide/svelte/icons/<name>.

Reference files:

  • Astro: buttons/sizes.astro
  • React: accordion/react/default.tsx
  • Svelte: accordion/svelte/default.svelte

MDX wiring

In the parent .mdx, import both the component and its raw source:

import Default from "@/components/examples/<category>/<slug>/default.astro";
import DefaultRaw from "@/components/examples/<category>/<slug>/default.astro?raw";

For framework-specific examples, append framework suffix to the import name:

import DefaultReact from "@/components/examples/<category>/<slug>/react/default";
import DefaultReactRaw from "@/components/examples/<category>/<slug>/react/default?raw";
import DefaultSvelte from "@/components/examples/<category>/<slug>/svelte/default.svelte";
import DefaultSvelteRaw from "@/components/examples/<category>/<slug>/svelte/default.svelte?raw";

<Preview> block

Wraps the rendered example in a card with a code-toggle and (when framework is set) a Stackblitz button.

<Preview files={{ "app.astro": DefaultRaw }} client:visible>
	<Default />
</Preview>
  • files — { '<filename>': RawSource }. Multiple keys render tabs; first key shows by default. Filename extension drives syntax highlighting.
  • framework="react" | "svelte" — required for framework examples; enables Stackblitz.
  • client:visible — always set on <Preview> and (for React/Svelte) on the rendered child.

<Framework> block

Only renders its children when the active framework switcher matches id. Use it to show parallel React/Svelte versions of the same example.

<Framework id="react">
	<Preview framework="react" files={{ "app.tsx": DefaultReactRaw }} client:visible>
		<DefaultReact client:visible />
	</Preview>
</Framework>
<Framework id="svelte">
	<Preview framework="svelte" files={{ "app.svelte": DefaultSvelteRaw }} client:visible>
		<DefaultSvelte client:visible />
	</Preview>
</Framework>

Astro examples do not need a <Framework> wrapper — they render universally.

Placement in the page

  • The default example is rendered at the top of the page with no heading.
  • Each subsequent example gets its own ## SectionName heading (PascalCase or Title Case), with the <Preview> (or <Framework> pair) directly underneath.

Standalone invocation

Ask only what can't be inferred:

  1. Target doc page — the .mdx file the example will be added to.
  2. Example name — kebab-case, used as filename and (PascalCase) MDX import name.
  3. Type — astro, react, svelte, or framework-pair (react + svelte). Recommend a default based on the parent page's category and accept overrides.
  4. What it should demonstrate — one line; informs the placeholder body.

When invoked from /create-doc with a list of examples and an inferred type per example, skip prompting and scaffold directly.

Output

For each example, produce:

  • Example file(s) with minimal placeholder body matching the reference convention.
  • Inserted import lines at the top of the parent .mdx.
  • Inserted <Preview> (and <Framework> if applicable) block in the appropriate location — top of page for default, under a new ## SectionName heading otherwise.

Summarize: files created, import lines added, section headings inserted.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.