How ibelick/ui-skills works
Purpose and Delivery Modes
UI Skills is a curated, file-based set of guidance for design-engineering agents. It ships both:
• an npm CLI that selects and retrieves skills for an agent task;
• an Astro site that browses the same skill and agent registry at ui-skills.com.
Primary entry points are bin/ui-skills.ts / bin/ui-skills.js for CLI execution and src/pages/index.astro for the web catalog.
Skill Content as the Core Product
Each skill is Markdown content under skills/, with a stable directory slug and SKILL.md payload. Examples:
• skills/baseline-ui/SKILL.md
• skills/improve-ui/SKILL.md
• skills/fixing-accessibility/SKILL.md
The root routing guidance lives in skills/ui-skills-root/SKILL.md. Some skills include agent-specific metadata and reference material, notably skills/improve-ui/agents/openai.yaml and skills/improve-ui/references/plan-template.md.
Registry and Discovery Layer
TypeScript data modules translate filesystem-oriented skill content into site/CLI discovery structures:
• src/data/skills.ts
• src/data/registry.ts
• src/data/topics.ts
• src/data/agents.ts
These modules form the central catalog boundary: UI pages and dynamic routes should consume registry data rather than encode individual skills directly. Topics/categories drive filtered CLI listing and catalog navigation; agents map compatible agent integrations.
CLI Control Flow
The executable wrapper bin/ui-skills delegates to the JavaScript/TypeScript CLI implementation in bin/ui-skills.js and bin/ui-skills.ts. Its user-facing flows include default discovery, task routing (start), category listing, filtered listing, and direct skill retrieval.
The CLI’s material output boundary is the local skills/ tree: retrieved guidance is emitted from the packaged Markdown assets rather than fetched from a remote service.
Astro Catalog and Content Routes
Astro renders static/catalog pages and parameterized resource views:
• src/pages/skills/index.astro
• src/pages/skills/[...slug].astro
• src/pages/agents/[id].astro
• src/pages/agent/[id].astro
The catch-all skill route resolves nested skill slugs to skill content. Separate agent and agents paths likely preserve alternate or legacy agent URL forms. Shared document shell and catalog UI live in src/layouts/Layout.astro, src/ui/skill-card.astro, and src/ui/skill-content-card.astro.
Machine-Readable Publishing Surface
The site exposes crawler and agent-oriented representations alongside HTML:
• src/pages/llms.txt.ts
• src/pages/skills/[...slug]/llms.txt.ts
• src/pages/skills/registry.txt.ts
• src/pages/sitemap.xml.ts
These endpoints make the registry and individual skill guidance consumable by LLM clients and search/indexing systems, while src/middleware.ts provides the request-level boundary for Astro routes.
Runtime, Deployment, and External Integration
The project uses Node.js/npm with TypeScript and Astro (package.json, astro.config.mjs). Deployment is configured for Cloudflare Workers through wrangler.jsonc. GitHub is the notable external service: src/lib/github-stars.ts backs src/pages/api/github-stars.ts, with presentation through src/ui/github-star-button.astro. Release automation is defined in .github/workflows/release.yml.
Main entry points: registry.ts Skill registry · skills Skill Markdown tree · index.astro Catalog home · ui-skills.ts CLI implementation
Components 19
Skill content
File-based guidance shipped to both delivery modes.
- Skill Markdown tree · Slug directories contain SKILL.md guidance and optional metadata.
skills - Root routing skill
skills/ui-skills-root/SKILL.md - Agent metadata and references
skills/improve-ui/agents/openai.yaml
Registry and catalog
TypeScript discovery boundary shared by CLI and site.
- Skill registry · Central discovery structures for skill content.
src/data/registry.ts - Skill data
src/data/skills.ts - Topics and categories
src/data/topics.ts - Agent integrations
src/data/agents.ts
npm CLI
- CLI executable wrapper
bin/ui-skills - CLI implementation · Handles discovery, routing, listing, filtering, and retrieval.
bin/ui-skills.ts
Astro site
- Catalog home
src/pages/index.astro - Skill catalog routes · Lists skills and resolves nested skill slugs.
src/pages/skills/[...slug].astro - Agent profile routes · Supports current and alternate agent URL forms.
src/pages/agents/[id].astro - Shared catalog UI
src/layouts/Layout.astro - Machine-readable endpoints · Publishes LLM, registry, per-skill, and sitemap representations.
src/pages/llms.txt.ts - Request middleware
src/middleware.ts - GitHub stars integration · Fetches GitHub stars for the site presentation.
src/lib/github-stars.ts
Runtime and release
- Node, npm, and Astro
package.json - Cloudflare Workers
wrangler.jsonc - Release automation
.github/workflows/release.yml
Connections 23
- Skill Markdown tree → Skill data: indexed by
- Root routing skill → Skill Markdown tree: part of
- Agent metadata and references → Skill Markdown tree: augments
- Skill data → Skill registry: feeds
- Topics and categories → Skill registry: categorizes
- Agent integrations → Skill registry: maps compatibility
- CLI executable wrapper → CLI implementation: delegates to
- CLI implementation → Skill registry: discovers and filters
- CLI implementation → Skill Markdown tree: emits packaged guidance
- Catalog home → Skill registry: reads
- Skill catalog routes → Skill registry: resolves slugs through
- Skill catalog routes → Skill Markdown tree: renders content from
- Agent profile routes → Agent integrations: reads
- Catalog home → Shared catalog UI: uses
- Skill catalog routes → Shared catalog UI: uses
- Machine-readable endpoints → Skill registry: publishes catalog
- Machine-readable endpoints → Skill Markdown tree: publishes guidance
- Request middleware → Catalog home: guards request boundary
- GitHub stars integration → Catalog home: supplies star data
- Node, npm, and Astro → CLI implementation: runs
- Node, npm, and Astro → Catalog home: builds and runs
- Cloudflare Workers → Node, npm, and Astro: deploys Astro output
- Release automation → Node, npm, and Astro: releases npm package