Skip to content

ChronicStone/nuxt-ui-tools / .agents/skills/nuxt-ui-tools-typescript

nuxt-ui-tools-typescript

Verified

Use this skill for internal TypeScript work in the nuxt-ui-tools repository. Covers the repository's inference-first style, forbidden escape hatches, public API typing rules, schema-driven type design, and how to keep complex types powerful without making the codebase harder to maintain.

FileKindSize
SKILL.mdskill md1.3 KB
references/anti-patterns.mdmarkdown478 B
references/jsdoc.mdmarkdown4.0 KB
references/public-api.mdmarkdown3.0 KB
references/ref-patterns.mdmarkdown439 B
references/rules.mdmarkdown1.5 KB
references/schema-patterns.mdmarkdown1.3 KB

references/rules.md

View on GitHub
# TypeScript Rules

This repository is inference-first.

## Hard Rules

- `any` is forbidden unless explicitly approved by the developer
- `as` casting is forbidden unless explicitly approved by the developer, except `as const`
- `as unknown as ...` is forbidden
- `Record<string, any>` is forbidden on reusable or public surfaces
- these rules apply everywhere: runtime, playground, tests, support code

## Default Style

- fully type everything
- prefer deriving types from values and builders over writing parallel types manually
- keep one canonical source of truth for a concept whenever possible
- use `unknown` when data is genuinely unknown, then narrow it

## Inference Rule

Inference is the default.

Prefer:

- inferred locals
- inferred helper return types
- inferred composable return types
- types derived from schema values and builder outputs

Use explicit annotations only when they add real value:

- recursive functions
- public contracts that need a deliberate boundary
- constraints for `computed(...)`
- places where the inferred type is noisy or leaks internals

## What Good Looks Like

Good:

- a builder return type derived from the builder contract
- a public composable whose type is mostly inferred from the schema argument
- a normalized utility type reused across the domain

Bad:

- repeating the same shape as a value type and as a hand-written interface
- using casts to force a design that the type model should express directly
- solving weak inference by making consumers annotate more
brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).Stars: 322kUpdated Claude CodeCodexVerifiedInstall
brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).Stars: 198kUpdated Claude CodeCodexVerifiedInstall