AGENT SKILL

create-xtarter-app

Scaffold new JS/TS projects from curated starter templates pre-configured with Biome, TypeScript strict mode, Git hooks, GitHub Actions workflows, VS Code settings, and AI agent skills. Use when user wants to create a new project, scaffold an app from a template, or mentions "create-xtarter-app", "npx create-xtarter-app", "scaffold", "starter template", or a template name like "next-tailwind", "vite-chakra", "vite-tailwind", or "next-chakra".

License 许可
MIT
最近更新
2026-11-07
Stars
★ 3
Forks
1

01 前言 Front Matter

name
create-xtarter-app
description
Scaffold new JS/TS projects from curated starter templates pre-configured with Biome, TypeScript strict mode, Git hooks, GitHub Actions workflows, VS Code settings, and AI agent skills. Use when user wants to create a new project, scaffold an app from a template, or mentions "create-xtarter-app", "npx create-xtarter-app", "scaffold", "starter template", or a template name like "next-tailwind", "vite-chakra", "vite-tailwind", or "next-chakra".

02 资源文件 1

03 SKILL.md 正文

create-xtarter-app

Scaffolds production-grade JS/TS projects from curated starter templates. Every template ships with Biome, TypeScript strict mode, Git hooks, GitHub Actions workflows, VS Code settings, and AI agent skills pre-configured.

When this skill loads

This skill is activated when the user asks to create a new project, scaffold an app, or mentions a template name. Upon loading:

  1. Determine the stack - ask the user about their framework (Next.js vs Vite) and UI library preference before picking a template
  2. Use the decision table - match the user's stack description to the correct template ID
  3. Never guess template names - only the 5 listed IDs are valid
  4. Check the target directory - verify it doesn't already exist and isn't non-empty

Quick reference

npx create-xtarter-app@latest                          # Interactive mode
npx create-xtarter-app@latest my-app --yes              # Defaults: pnpm, git, no clean, next-chakra
npx create-xtarter-app@latest my-app --yes --quiet      # Non-interactive, minimal output
npx create-xtarter-app@latest my-app --yes --json       # Non-interactive, JSON result
npx create-xtarter-app@latest my-app -t vite-tailwind   # Specific template
npx create-xtarter-app@latest preview [template-name]   # Preview a template, or prompt without a name

preview shows a template's description, repository, branch, and feature list; omit the name to be prompted for one.

Decision parsing: which template to pick

Parse the user's stack description to pick a template:

If the user says... They want... Pick
"Next.js app" + "Chakra UI" SSR framework + component lib next-chakra
"Next.js app" + "Tailwind" SSR framework + utility CSS next-tailwind
"Vite SPA" + "Chakra UI" Client SPA + component lib vite-chakra
"Vite SPA" + "Tailwind" Client SPA + utility CSS vite-tailwind
"Next.js" (no UI lib) SSR framework Ask "Chakra UI or Tailwind?"
"Vite" (no UI lib) Client SPA Ask "Chakra UI or Tailwind?"
No framework preference - Ask "SSR/static (Next.js) or client SPA (Vite)?"
No UI lib preference - Prompt for a template ID with preview (no args)

CLI reference

npx create-xtarter-app@latest [project-name] [options]
Flag Short Description
--template <name> -t Template ID (skips prompt). See reference below
--pm <manager> -p Package manager: pnpm, npm, bun, yarn
--git / --no-git Git init is on by default; --no-git skips it
--clean Remove supported CI/CD configuration files
--force -f Overwrite a non-empty target directory
--ref <ref> Download a branch, tag, or commit
--yes -y Use defaults: pnpm, git init, no clean; without --template, uses next-chakra
--quiet Suppress banners, spinners, and decorative output
--json Output scaffold result as JSON (also suppresses banners/spinners)
--color / --no-color Colorized output is on by default; --no-color disables it
--help -h Show help
--version -v Show version

--yes skips selection prompts, but it does not provide a project name. Pass [project-name] for a fully non-interactive run.

Interactive mode prompts for: project name, template, package manager, clean CI/CD, git init.

Available templates

MANDATORY - Load references/templates.md before using --template. Only its 5 IDs are valid; inventing template names fails.

Agent workflows

Scaffold a new project

# 1. Determine template from user's stack description (see decision table above)
# 2. Run scaffold
npx create-xtarter-app@latest my-app --template vite-tailwind --pm pnpm --yes

After scaffolding, output next steps:

cd my-app
pnpm dev

To add conformance later: npx xtarterize init

Preview to help user decide

npx create-xtarter-app@latest preview
# Prompts for a template ID, then shows its details

npx create-xtarter-app@latest preview vite-tailwind
# Shows details for one template

Default non-interactive scaffolding

npx create-xtarter-app@latest my-app --yes
# Uses pnpm, git init, and no CI cleanup.

Error handling

Signal Likely cause Fix
--template <name> → "not found" Wrong name Run preview with no args, use exact ID
"Directory exists and not empty" Target has files Choose different name or empty dir
Download fails Network Templates are GitHub-hosted; check connectivity
Git init fails Git not installed Use --no-git
--pm <name> rejected Invalid Only pnpm, npm, bun, yarn
Install hangs Lockfile/registry issue Run install manually in scaffolded dir

Anti-patterns

  • NEVER scaffold into an existing non-empty directory - CLI rejects it
  • NEVER use --clean unless user asks - it removes CI, which is unexpected
  • NEVER invent template names - only the 5 valid IDs (see references/templates.md). Run preview if unsure
  • NEVER ignore --pm if user has a preference - pnpm is default but not universal

04 同仓库更多 Skills

agustinusnathaniel
agustinusnathaniel/xtarter

xtarterize

Apply production-grade conformance configurations (linting, type checking, CI, editor settings, AI skills, release tooling) to JS/TS projects. Scans package.json and config files to auto-detect framework, bundler, and styling, then resolves applicable tasks. Use when user mentions "xtarterize", "conformance", "setup linting", "add CI", "configure project", "init xtarterize", or any task name like "lint/biome", "ts/strict", or "ci/workflow".

Skill与智能体开发
★ 3
agustinusnathaniel
agustinusnathaniel/xtarter

write-a-skill

Create new agent skills with proper structure, progressive disclosure, and bundled resources. Use when user wants to create, write, or build a new skill.

Skill与智能体开发
★ 3
agustinusnathaniel
agustinusnathaniel/xtarter

template-skill

Replace with description of the skill and when Claude should use it.

Skill与智能体开发
★ 3
agustinusnathaniel
agustinusnathaniel/xtarter

skill-creator

Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.

Skill与智能体开发
★ 3
agustinusnathaniel
agustinusnathaniel/xtarter

opensrc

Fetch dependency source code to give AI agents deeper implementation context. Use when the agent needs to understand how a library works internally, read source code for a package, fetch implementation details for a dependency, or explore how an npm/PyPI/crates.io package is built. Triggers include "fetch source for", "read the source of", "how does X work internally", "get the implementation of", "opensrc path", or any task requiring access to dependency source code beyond types and docs.

★ 3
agustinusnathaniel
agustinusnathaniel/xtarter

improve-codebase-architecture

Find deepening opportunities in a codebase, informed by the domain language in CONTEXT.md and the decisions in docs/adr/. Use when the user wants to improve architecture, find refactoring opportunities, consolidate tightly-coupled modules, or make a codebase more testable and AI-navigable.

★ 3