Terrae check
Verify all outputs exist after creating a new component and fix any issues
install
source · Clone the upstream repo
git clone https://github.com/alamenai/terrae
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/alamenai/terrae "$T" && mkdir -p ~/.claude/skills && cp -r "$T/.claude/skills/check" ~/.claude/skills/alamenai-terrae-check && rm -rf "$T"
manifest:
.claude/skills/check/SKILL.mdsource content
Check Component Skill
Verify that all 8 required outputs exist and are wired correctly after creating a new component.
Instructions
Given a component name (e.g.,
cyclone, MapCyclone), normalize it to its kebab-case slug (e.g., cyclone) and run through every check below.
Check 1: Component Source File
- File exists:
src/registry/map/{slug}.tsx - Has
directive (if it uses hooks, event handlers, or browser APIs)"use client" - Exports a named component (e.g.,
)MapCyclone - Uses
nottype
for type definitionsinterface - Uses arrow functions with explicit returns
- Default values use
constants above the componentSCREAMING_SNAKE_CASE - Required props come before optional props in the type definition
- Cleanup in useEffect return functions (removes layers, sources, markers, event listeners)
Check 2: Barrel Export
has an export line for the componentsrc/registry/map/index.tsx- If the component exposes a control hook, it is also exported (e.g.,
)useCycloneControl
Check 3: Registry Entry
has an entry inregistry.json
with:items
in kebab-case (e.g.,name
)cyclone
includesregistryDependencies"https://www.terrae.dev/map.json"
matches the source file pathfiles[0].path
followsfiles[0].targetcomponents/ui/map/{slug}.tsx
Check 4: Example Files
- At least one example exists:
src/app/docs/_components/examples/{slug}-example.tsx - Examples import from
@/registry/map - Examples wrap the map in
<div className="h-full w-full"> - Examples use
as access tokenprocess.env.NEXT_PUBLIC_MAPBOX_ACCESS_TOKEN || "" - Examples that use hooks or event handlers have
"use client"
Check 5: Documentation Page
- File exists:
src/app/docs/{slug}/page.tsx - Exports
with ametadatatitle - Uses
withDocsLayout
,title
,description
, andprevnext - First section is "Installation" with two
s (base map + component)CodeBlock - Basic
appears directly after InstallationComponentPreview - Every example rendered on the page has a matching
callgetExampleSource - If the component has configurable props, a properties
section existsTable - All documented props match the actual component props (no missing, no extra)
Check 6: Sidebar Navigation
has asrc/app/docs/_components/docs-sidebar.tsx
for the componentNavItem- The
matcheshref/docs/{slug} - Has
badge: "new" - Placed in the correct section (
or"Core"
)"Features" - The Lucide icon is imported
Check 7: Components Page
has asrc/app/docs/components/page.tsx
entryComponentItem- The
matcheshref/docs/{slug} - Has
isNew: true
matches the sidebar sectioncategory
URL matchesinstallCommandhttps://www.terrae.dev/{registry-name}.json- The Lucide icon is imported
Check 8: Changelog
has an entry in the most recentsrc/app/docs/changelog/page.tsxChangelogEntry- Entry has
,title
(withdescription
tag for component name), and<code>href
matcheshref/docs/{slug}
Output Format
Present results as a checklist table:
| # | Output | Status | Notes | | --- | ------------------ | ------ | ----------------------- | | 1 | Component source | pass | | | 2 | Barrel export | pass | | | 3 | Registry entry | fail | Missing target path | | 4 | Examples | pass | 3 examples found | | 5 | Documentation page | warn | Missing props: `scale` | | 6 | Sidebar navigation | pass | | | 7 | Components page | pass | | | 8 | Changelog | pass | |
- pass: Everything correct
- warn: Works but has minor issues (e.g., missing optional prop in docs table)
- fail: Missing or broken, needs fixing
After the table, list specific issues with file paths and line numbers.
Fix Phase
If any checks have fail or warn status, fix them automatically:
- Work through issues in check order (1–8)
- Apply the minimal change needed for each issue
- After all fixes, re-run the checks to confirm everything passes
- Present the updated checklist table showing all checks as pass
If a fix requires a decision (e.g., which sidebar section to place the component in), ask the user before proceeding.