Agent skill

New

by alamenai in alamenai/terrae

End-to-end workflow for building a new Terrae component from scratch

MITAuto-check passedFrontend & Design

Install New

skills CLI
$ npx skills add alamenai/terrae --skill new -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install alamenai/terrae new --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/alamenai/terrae.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/new .claude/skills/new && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
new
GitHub stars
244
Token cost
~2.4k tokens
SKILL.md length
724 words
Files
1
Skills in repo
11
Repo updated
First seen
Licence
MIT

At a glance

End-to-end workflow for building a new Terrae component from scratch

  • Works in 9 steps: Gather Requirements → Create the Component File and Export → Add Registry Entry → …
  • Tasks that involve React components
  • SKILL.md covers All Outputs and Instructions
  • Reaches terrae.dev; needs NEXT_PUBLIC_MAPBOX_ACCESS_TOKEN

What it does

New is an agent skill from alamenai/terrae. End-to-end workflow for building a new Terrae component from scratch

Its SKILL.md is about 2.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Frontend & Design, covering React components. It works with Mapbox and React. The repository describes itself as: Composable and animated components that replace imperative layers with simple props. The perfect companion for shadcn/ui. The licence is MIT.

When your agent uses it

  • Tasks that involve React components

Example prompts

  • “/new”

Requirements

  • Node.js
  • A credential in NEXT_PUBLIC_MAPBOX_ACCESS_TOKEN

Workflow steps

9 steps, taken from the step headings in SKILL.md.

  1. Gather Requirements
  2. Create the Component File and Export
  3. Add Registry Entry
  4. Create Example File(s)
  5. Create Documentation Page
  6. Add to Sidebar
  7. Add to Components Page
  8. Update Changelog
  9. Review with User

What it can do on your machine

Read from SKILL.md and the folder at commit ea9a480. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript and json).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • terrae.dev

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • NEXT_PUBLIC_MAPBOX_ACCESS_TOKEN

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

New loads about 2.4k tokens when it runs. Until then it costs about 18 tokens; SKILL.md has 724 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~18
When it runs · the whole SKILL.md, loaded when a task matches
~2.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from alamenai/terrae at commit ea9a480, republished under its MIT licence (© alamenai). 724 words, ~2,387 tokens.

Download SKILL.mdSave it as .claude/skills/new/SKILL.md (or your agent's skills folder).
name
new
description
End-to-end workflow for building a new Terrae component from scratch
argument-hint
component-name

Create New Component Skill

End-to-end workflow for building a new Terrae component from scratch.

Covers all 8 outputs:

  • Component source
  • Registry
  • Exports
  • Documentation
  • Examples
  • Sidebar
  • Components page
  • Changelog

Component structure, patterns, responsiveness, and performance rules are in .claude/rules/react/component.md.

All Outputs

#OutputFile(s)
1Component source filesrc/registry/map/{name}.tsx
2Barrel exportsrc/registry/map/index.tsx (update)
3Registry entryregistry.json (update)
4Example file(s)src/app/docs/_components/examples/{name}-example.tsx
5Documentation pagesrc/app/docs/{slug}/page.tsx
6Sidebar navigationsrc/app/docs/_components/docs-sidebar.tsx (update)
7Components listingsrc/app/docs/components/page.tsx (update)
8Changelog entrysrc/app/docs/changelog/page.tsx (update)

Instructions

When the developer requests a new component:

Step 1: Gather Requirements

Ask for:

  • Component name (e.g., MapHeatmap, MapPolygon)
  • Core functionality
  • Whether it needs compound components (like MarkerContent, MarkerPopup)
  • Category: "core" or "features" (most components are features)
  • Lucide icon for the sidebar and components page
  • Whether it exposes a control hook (e.g., useHeatmapControl)

If there are multiple valid implementation approaches (e.g., Mapbox layers vs DOM overlay, canvas vs CSS animations, GeoJSON source vs custom rendering), present the options with trade-offs and let the developer choose before writing code.

Step 2: Create the Component File and Export

Follow the map component rules in .claude/rules/react/component.md for the component structure, template, patterns, and barrel export.

  • Location: src/registry/map/{component-name}.tsx
  • Use kebab-case for file names (e.g., heat-map.tsx)
  • Export from src/registry/map/index.tsx
Step 3: Add Registry Entry

Update registry.json by adding an entry to the items array.

Follow this structure:

json
{
  "name": "heat-map",
  "type": "registry:ui",
  "title": "Map Heatmap",
  "description": "Short description of the component.",
  "dependencies": ["mapbox-gl"],
  "devDependencies": ["@types/mapbox-gl"],
  "registryDependencies": ["https://www.terrae.dev/map.json"],
  "files": [
    {
      "path": "src/registry/map/heat-map.tsx",
      "type": "registry:ui",
      "target": "components/ui/map/heat-map.tsx"
    }
  ]
}
Key rules:
  • name uses kebab-case with ``prefix (e.g.,heat-map)
  • registryDependencies always includes ["https://www.terrae.dev/map.json"] (the core Map component that all other components depend on)
  • Add extra dependencies only if the component needs packages beyond mapbox-gl
  • Components that don't need mapbox-gl directly can have empty dependencies (e.g., watermark)
Step 4: Create Example File(s)

Location: src/app/docs/_components/examples/{name}-example.tsx

Use kebab-case for the file name.

The basic example should demonstrate the simplest usage of the component.

typescript
import { Map, MapHeatmap } from "@/registry/map"

export const HeatmapExample = () => {
  const accessToken = process.env.NEXT_PUBLIC_MAPBOX_ACCESS_TOKEN || ""

  return (
    <div className="h-full w-full">
      <Map accessToken={accessToken} center={[-74.006, 40.7128]} zoom={10}>
        <MapHeatmap id="heatmap-basic" {/* ...minimal props */} />
      </Map>
    </div>
  )
}
Key rules:
  • Only add "use client" if the example uses hooks, event handlers, or browser APIs — purely compositional examples that just render map components don't need it
  • Import from @/registry/map
  • Wrap the map in a <div className="h-full w-full">
  • Pass process.env.NEXT_PUBLIC_MAPBOX_ACCESS_TOKEN || "" as the access token — the Map component validates it and shows an error if missing, so examples don't need their own check
  • Export the component with a descriptive name (PascalCase)
  • Create additional example files for each variation (e.g., heatmap-color-example.tsx, heatmap-custom-example.tsx)
Step 5: Create Documentation Page

Location: src/app/docs/{slug}/page.tsx

Use the lines-animated/page.tsx as the gold standard reference.

The slug should match the sidebar href (e.g., /docs/heatmap → src/app/docs/heatmap/page.tsx).

typescript
import { DocsLayout, DocsSection, DocsCode, DocsLink } from "../_components/docs"
import { ComponentPreview } from "../_components/component-preview"
import { CodeBlock } from "../_components/code-block"
import { HeatmapExample } from "../_components/examples/heatmap-example"
import { getExampleSource } from "@/lib/get-example-source"
import { Metadata } from "next"
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table"

export const metadata: Metadata = {
  title: "Heatmap",
}

const HeatmapPage = () => {
  const basicSource = getExampleSource("heatmap-example.tsx")

  return (
    <DocsLayout
      title="Heatmap"
      description="Short description of what the component does."
      prev={{ title: "Previous Component", href: "/docs/previous" }}
      next={{ title: "Next Component", href: "/docs/next" }}
    >
      <DocsSection title="Installation">
        <p>First, make sure you have the base map component installed:</p>
        <CodeBlock code={`npx shadcn@latest add https://www.terrae.dev/map.json`} language="bash" />
        <p className="mt-4">Then install the heatmap component:</p>
        <CodeBlock
          code={`npx shadcn@latest add https://www.terrae.dev/heat-map.json`}
          language="bash"
        />
      </DocsSection>

      <ComponentPreview code={basicSource}>
        <HeatmapExample />
      </ComponentPreview>

      {/* Additional sections with examples, props tables, etc. */}
    </DocsLayout>
  )
}

export default HeatmapPage
Show full SKILL.md (328 more words)Show less
Key rules:
  • Always export metadata with a title
  • Use DocsLayout with title, description, prev, and next navigation links
  • First section is always "Installation" with two CodeBlocks (base map + component)
  • The basic ComponentPreview goes directly after Installation (no section title or description, just the demo)
  • Use ComponentPreview to wrap each example with its source code
  • Use getExampleSource("filename.tsx") to load example source code
  • Use DocsCode for inline code references in descriptions
  • Use DocsSection with a title for each section
  • Add a props Table when the component has many configurable props
  • Set prev/next to match adjacent items in the sidebar navigation
Step 6: Add to Sidebar

Update src/app/docs/_components/docs-sidebar.tsx:

  1. Import the Lucide icon at the top (if not already imported)
  2. Add a NavItem entry in the correct section of the navigation array
  3. Add badge: "new"
typescript
{ title: "Heatmap", href: "/docs/heatmap", icon: Flame, badge: "new" },

Sections:

  • "Explore" — Story, Changelog
  • "Get Started" — Introduction, Installation, Comparison, Components, Hooks, Reference
  • "Core" — Map, Controls, Compass, Marker, Popup
  • "Features" — Everything else
Step 7: Add to Components Page

Update src/app/docs/components/page.tsx:

  1. Import the Lucide icon at the top (if not already imported)
  2. Add a ComponentItem entry to the components array
  3. Add isNew: true
typescript
{
  title: "Heatmap",
  href: "/docs/heatmap",
  description: "Short description matching the registry description",
  icon: Flame,
  category: "features",
  installCommand: "npx shadcn@latest add https://www.terrae.dev/heat-map.json",
  isNew: true,
},
Key rules:
  • category is "core" or "features" (must match the sidebar section)
  • installCommand URL follows the pattern https://www.terrae.dev/{registry-name}.json
  • Add mapboxOnly: true if the component only works with Mapbox GL (not MapLibre)
  • Place the entry near similar components in the array
Step 8: Update Changelog

Update src/app/docs/changelog/page.tsx:

Add a new entry to the components array of the most recent (topmost) ChangelogEntry in the changelogs array:

typescript
{
  title: "Heatmap",
  description: (
    <>
      New <code className="rounded bg-muted px-1 py-0.5 text-xs">MapHeatmap</code> component for
      visualizing data density on the map. Supports customizable color ramps, radius control,
      and intensity adjustment.
    </>
  ),
  href: "/docs/heatmap",
},
Key rules:
  • Add under components for new components, features for new features, fixes for bug fixes, properties for new props
  • The description uses JSX with inline <code> tags for component names
  • Always include href linking to the docs page
Step 9: Review with User

Before finalizing, show all changes:

  • The component source code
  • The barrel export addition
  • The registry entry
  • The example file(s)
  • The documentation page
  • The sidebar entry
  • The components page entry
  • The changelog entry

© alamenai, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/new of alamenai/terrae.

Open the folder on GitHubat commit ea9a480

Compare with similar skills

New next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

New compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
New this skillalamenai/terrae244—~2.4kAutomated safety check: PassMIT
Web Artifacts Builderanthropics/skills180k40 repos~769Automated safety check: PassApache-2.0
React Router Developmentremix-run/react-router57k1 repos~1.5kAutomated safety check: PassMIT
React UI State PatternsChrisWiles/claude-code-showcase6.1k8 repos~1.6kAutomated safety check: PassNone
Chakra UI v3 Builderchakra-ui/chakra-ui41k—~3.1kAutomated safety check: PassMIT
React Component PerformanceDimillian/Skills4k5 repos~1.2kAutomated safety check: PassMIT

Similar skills

  • Web Artifacts Builder

    anthropics/skills

    Official

    Builds multi-component claude.ai HTML artifacts as a small React, TypeScript and Tailwind project, then bundles it into one shareable HTML file.

    180k GitHub starsUsed in 40 repos~769 tokens
    Frontend & DesignAuto-check passed
  • React Router Development

    remix-run/react-router

    Guides work on React Router apps by first identifying whether the app uses Framework, Data or Declarative mode, then loading the matching reference and the installed package docs.

    57k GitHub starsUsed in 1 repo~1.5k tokens
    Frontend & DesignAuto-check passed
  • React UI State Patterns

    ChrisWiles/claude-code-showcase

    Sets patterns for React interfaces: when to show loading spinners or skeletons, how to surface errors, how to disable buttons during async work and how to handle empty lists.

    6.1k GitHub starsUsed in 8 repos~1.6k tokens
    Frontend & DesignAuto-check passed
  • Chakra UI v3 Builder

    chakra-ui/chakra-ui

    Builds responsive, accessible Chakra UI v3 components and layouts, sets up Chakra in new or existing projects, and designs themes with tokens, semantic tokens and recipes.

    41k GitHub stars~3.1k tokensUpdated 4 days ago
    Frontend & DesignAuto-check passed
  • Analyze and optimize React component performance issues (slow renders, re-render thrash, laggy lists, expensive computations).

    4k GitHub starsUsed in 5 repos~1.2k tokens
    Frontend & DesignAuto-check passed
  • React View Transitions Guide

    vercel-labs/next-beats

    Official

    Guides implementing animated page and state transitions in React with the native View Transition API, covering shared elements, list reorders and directional navigation.

    168 GitHub starsUsed in 10 repos~3.1k tokens
    Frontend & DesignAuto-check passed

More from alamenai/terrae

All 11 skills in this repo
  • Check

    alamenai/terrae

    Verify all outputs exist after creating a new component and fix any issues

    244 GitHub stars~1.1k tokensUpdated 6 mo ago
    Auto-check passed
  • Docs

    alamenai/terrae

    Generate or update documentation for Terrae components. An agent skill from alamenai/terrae.

    244 GitHub stars~576 tokensUpdated 6 mo ago
    Auto-check passed
  • Fix

    alamenai/terrae

    Systematically fix issues found by /review or reported by the user

    244 GitHub stars~775 tokensUpdated 6 mo ago
    Auto-check passed
  • Perf

    alamenai/terrae

    Audit component performance and identify optimization opportunities with actionable fixes

    244 GitHub stars~678 tokensUpdated 6 mo ago
    Auto-check passed
  • PR

    alamenai/terrae

    Commit, push, and open a pull request on GitHub. An agent skill from alamenai/terrae.

    244 GitHub stars~767 tokensUpdated 6 mo ago
    Auto-check: notes
  • Commit

    alamenai/terrae

    Create standardized git commits following Terrae's conventions

    244 GitHub stars~568 tokensUpdated 6 mo ago
    Auto-check: notes

Works with

Questions about New

What does New do?

End-to-end workflow for building a new Terrae component from scratch. New is an agent skill from alamenai/terrae.

When should I use New?

New fits situations like: tasks that involve React components.

How do I install New in Claude Code?

Run `npx skills add alamenai/terrae --skill new -a claude-code`. Or copy the skill folder (.claude/skills/new in alamenai/terrae) into .claude/skills/new in your project. Claude Code loads it when a task matches its description.

How do I install New in Codex?

Run `npx skills add alamenai/terrae --skill new -a codex`. Or copy the skill folder (.claude/skills/new in alamenai/terrae) into .agents/skills/new in your project. Codex loads it when a task matches its description.

Can I use New in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add alamenai/terrae --skill new -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/new, .gemini/skills/new, .github/skills/new and .opencode/skills/new in your project.

What does New need to run?

Going by SKILL.md and its folder, New needs credentials named NEXT_PUBLIC_MAPBOX_ACCESS_TOKEN. Our summary lists: Node.js; A credential in NEXT_PUBLIC_MAPBOX_ACCESS_TOKEN.

Does New access the network?

SKILL.md names 1 domain. In commands or code: terrae.dev; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is New safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does New use?

New is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does New use?

About 2.4k tokens (SKILL.md is roughly 9.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to New?

Skills that share tags, products or a category with New: Web Artifacts Builder (anthropics/skills, 180k stars), React Router Development (remix-run/react-router, 57k stars), React UI State Patterns (ChrisWiles/claude-code-showcase, 6.1k stars) and Chakra UI v3 Builder (chakra-ui/chakra-ui, 41k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains New?

alamenai (a GitHub user) maintains it in alamenai/terrae, which has 244 GitHub stars. The repository holds 11 skills in this directory. The repository was last updated on April 6, 2026.

Source: alamenai/terrae on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.