adding-templates
БесплатноБез исполняемых скриптовНе проверенUse when adding new stacks, libraries, or project addons to create-faster CLI tool - covers META entries, template creation, and testing for all addon types
от plvo★ 31 звезда на GitHubОб этом скилле
Adding Templates to create-faster
Overview
Add new content to the create-faster CLI: framework stacks, per-app libraries, or project-level addons. All additions are data-driven through META configuration + Handlebars templates.
Core principle: Understand-first, copy-second. Know the library/framework BEFORE writing templates.
When to Use
Use this skill when:
- Adding a new framework stack (Remix, Astro, SvelteKit, etc.)
- Adding a new library (tRPC, i18n, Storybook, etc.)
- Adding a new project addon (new database, ORM, tooling)
Do NOT use for:
- Fixing existing templates (use
fixing-templatesskill) - Extracting a library from an external project (use
extracting-templatesskill first, then come here) - Updating dependency versions
Architecture Context
Adding content is data-driven. Most CLI code operates generically on META configuration. Only source files that define types need changes. Everything else is META entries + template files.
What does NOT change when adding content (17+ files are generic):
cli.ts,flags.ts,index.ts— iterate META entriestemplate-resolver.ts— scans template directories by conventionpackage-json-generator.ts— merges fromMETA.*.packageJsonenv-generator.ts— collects envs from METAhandlebars.ts— generic helpersaddon-utils.ts— generic compatibility checks- All prompts, TUI, summary code
Three Addon Types
| Type | META location | Template directory | Scope |
|---|---|---|---|
| Stack | META.stacks |
templates/stack/{name}/ |
Per-app |
| Library | META.libraries |
templates/libraries/{name}/ |
Per-app |
| Project addon | META.project.{category}.options |
templates/project/{category}/{name}/ |
Project-level |
Adding a Stack
Source Changes
Only 2-3 source files need code changes:
a. Add to StackName union (types/meta.ts)
export type StackName = 'nextjs' | 'expo' | 'hono' | 'tanstack-start' | 'newstack';
All downstream types derive from StackName automatically.
b. Add stack entry to META (__meta__.ts)
newstack: {
type: 'app' | 'server',
label: 'Framework Name',
hint: 'Short description',
packageJson: {
dependencies: { 'framework-core': '^1.0.0' },
devDependencies: { typescript: '^5' },
scripts: {
dev: 'framework dev --port {{port}}',
build: 'framework build',
start: 'framework start --port {{port}}',
},
},
},
Scripts with {{port}}: package-json-generator.ts resolves placeholders:
- Turborepo:
{{port}}→3000 + appIndex - Single repo: the
--port {{port}}portion is stripped entirely
c. Add file extensions to KNOWN_EXTENSIONS (if needed, lib/frontmatter.ts)
Non-standard extensions (.svelte, .vue, .astro) prevent the stack suffix parser from misidentifying them.
Template Structure
templates/stack/{stackname}/
{config}.config.ts.hbs # Vite, Next, etc.
tsconfig.json.hbs # TypeScript config
src/
{entry-point}.tsx.hbs # Main entry
routes/ # Routing (if file-based)
components/ # Shared components
public/ # Static assets (if needed)
Library Compatibility
Check existing libraries with support: { stacks: 'all' }. React libraries shouldn't be available for non-React stacks — change to explicit list:
support: { stacks: ['nextjs', 'tanstack-start'] }, // React-only
Adding a Library
META Entry (META.libraries)
newlib: {
label: 'Library Name',
hint: 'Short description',
category: 'UI', // Groups in interactive prompt (UI, Content, Auth, API, Data Fetching, Forms, Deploy)
support: { stacks: ['nextjs', 'tanstack-start'] },
// Optional: require other addons
require: { orm: ['drizzle', 'prisma'] },
// Optional: turborepo shared package
mono: { scope: 'pkg', name: 'libname' },
packageJson: {
dependencies: { 'the-lib': '^1.0.0' },
// Optional: package exports (for shared packages)
exports: { '.': './src/index.ts' },
},
// Optional: environment variables
envs: [
{ value: 'LIB_SECRET=changeme', monoScope: [{ pkg: 'libname' }, 'app'] },
],
},
Key fields:
category— prompt group name (UI, Content, Auth, API, Data Fetching, Forms, Deploy)support.stacks— which stacks can use this library ('all'or explicit list)require— dependencies on other addons (e.g., better-auth requires orm)mono— if set, library gets its ownpackages/{name}/in turborepoenvs— env vars with scope resolution (which.env.examplefiles get them)
Template Structure
templates/libraries/{libname}/
src/lib/{feature}.ts.hbs # Library setup files
src/lib/{feature}-client.ts.hbs # Client-side setup
src/app/api/{route}/route.ts.nextjs.hbs # Stack-specific API routes
Handlebars Conditionals for Cross-Library Int
Установить adding-templates в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл adding-templates?
Use when adding new stacks, libraries, or project addons to create-faster CLI tool - covers META entries, template creation, and testing for all addon types
Как установить скилл adding-templates?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл adding-templates запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic