diff --git a/.agents/skills/tanstack-fullstack-pattern/SKILL.md b/.agents/skills/tanstack-fullstack-pattern/SKILL.md index ed7c984..d8c2c7f 100644 --- a/.agents/skills/tanstack-fullstack-pattern/SKILL.md +++ b/.agents/skills/tanstack-fullstack-pattern/SKILL.md @@ -16,7 +16,7 @@ description: 'Use when scaffolding a new TanStack Start project, adding domain An interface-first fullstack architecture built on TanStack Start. The pattern defines clear interface boundaries between layers -- interfaces are rigid, implementations are swappable. -> **Companion documentation:** In repositories built from this template, [AGENTS.md](AGENTS.md) holds the project handbook -- file structure, Mantine styling, auth snippets, Biome, testing/E2E commands, and the full validation checklist. This skill focuses on the architectural contract; refer to AGENTS.md for operational detail. +> **Companion documentation:** In repositories built from this template, [AGENTS.md](https://github.com/carlosvin/tanstack-fullstack-ai-template/blob/main/AGENTS.md) holds the project handbook -- file structure, Mantine styling, auth snippets, Biome, testing/E2E commands, and the full validation checklist. This skill focuses on the architectural contract; refer to AGENTS.md for operational detail. ## Pattern Overview @@ -119,7 +119,7 @@ interface WritableRepository { ## Styling, Auth, and Observability -These topics are documented once in [AGENTS.md](AGENTS.md) to avoid drift: +These topics are documented once in [AGENTS.md](https://github.com/carlosvin/tanstack-fullstack-ai-template/blob/main/AGENTS.md) to avoid drift: - **Mantine UI** -- see AGENTS.md section 3 (component-first styling, CSS Modules, dark mode). - **Auth and Middleware** -- see AGENTS.md section 5 (middleware chain, `AuthContext`, guard helpers, code samples). Rigid rules 9--10 above are the normative summary. @@ -171,4 +171,4 @@ A TanStack Start file-based route at `/api/chat` with two handlers: ## Verification -Testing setup (Vitest, Playwright, auth fixtures) and the full validation checklist are in [AGENTS.md](AGENTS.md) sections 10 and 12. Quick smoke test: `pnpm format && pnpm lint && pnpm test && pnpm build`. +Testing setup (Vitest, Playwright, auth fixtures) and the full validation checklist are in [AGENTS.md](https://github.com/carlosvin/tanstack-fullstack-ai-template/blob/main/AGENTS.md) sections 10 and 12. Quick smoke test: `pnpm format && pnpm lint && pnpm test && pnpm build`. diff --git a/README.md b/README.md index 7e162c2..3234ccc 100644 --- a/README.md +++ b/README.md @@ -338,6 +338,14 @@ The generated outputs are committed intentionally so you can copy the skill into **Install the skill globally** (available in all your projects): +Run this one-liner in your terminal to automatically download and install the skill into the global directories for Cursor, Windsurf, and Claude Code: + +```bash +curl -sL https://raw.githubusercontent.com/carlosvin/tanstack-fullstack-ai-template/main/scripts/skills/install.sh | bash -s -- --force +``` + +To manually install instead: + ```bash # Windsurf (reads .agents/skills/ when in repo; for global copy) cp -r .agents/skills/tanstack-fullstack-pattern ~/.codeium/windsurf/skills/ diff --git a/scripts/skills/install.sh b/scripts/skills/install.sh new file mode 100755 index 0000000..f6c3d10 --- /dev/null +++ b/scripts/skills/install.sh @@ -0,0 +1,57 @@ +#!/usr/bin/env bash + +# TanStack Fullstack Pattern Skill Installer +# This script downloads the standard SKILL.md into the preferred global +# skill directories for Cursor, Windsurf, and Claude Code. + +set -e + +SKILL_NAME="tanstack-fullstack-pattern" +SKILL_RAW_URL="https://raw.githubusercontent.com/carlosvin/tanstack-fullstack-ai-template/main/.agents/skills/tanstack-fullstack-pattern/SKILL.md" + +echo "Installing $SKILL_NAME skill..." + +# Determine download tool +if command -v curl >/dev/null 2>&1; then + DOWNLOAD_CMD="curl -sL" +elif command -v wget >/dev/null 2>&1; then + DOWNLOAD_CMD="wget -qO-" +else + echo "Error: curl or wget is required to download the skill." + exit 1 +fi + +# Download the SKILL.md content directly +DOWNLOAD_CMD="curl -sL" +TEMP_FILE=$(mktemp) +echo "Downloading SKILL.md from $SKILL_RAW_URL..." +$DOWNLOAD_CMD "$SKILL_RAW_URL" > "$TEMP_FILE" + +# Define target directories +TARGET_DIRS=( + "$HOME/.codeium/windsurf/skills/$SKILL_NAME" + "$HOME/.cursor/skills/$SKILL_NAME" + "$HOME/.claude/skills/$SKILL_NAME" +) + +INSTALLED=0 + +for TARGET_DIR in "${TARGET_DIRS[@]}"; do + PARENT_DIR=$(dirname "$TARGET_DIR") + # Install if the tool directory exists, or if --force is passed + if [ -d "$PARENT_DIR" ] || [ "$1" == "--force" ]; then + echo "Installing to $TARGET_DIR..." + mkdir -p "$TARGET_DIR" + cp "$TEMP_FILE" "$TARGET_DIR/SKILL.md" + INSTALLED=1 + fi +done + +rm "$TEMP_FILE" + +if [ $INSTALLED -eq 1 ]; then + echo "Successfully installed $SKILL_NAME." +else + echo "Could not find default skill directories for Windsurf, Cursor, or Claude Code." + echo "To force installation into these directories anyway, pass --force to the script." +fi \ No newline at end of file diff --git a/skills/dist/tanstack-fullstack-pattern.md b/skills/dist/tanstack-fullstack-pattern.md index 10a6268..203e4d5 100644 --- a/skills/dist/tanstack-fullstack-pattern.md +++ b/skills/dist/tanstack-fullstack-pattern.md @@ -8,7 +8,7 @@ - Repository: https://github.com/carlosvin/tanstack-fullstack-ai-template - Documentation: https://github.com/carlosvin/tanstack-fullstack-ai-template/blob/main/skills/README.md - Status: stable -- Supported tools: Windsurf [native, not yet verified], Cursor [copy, not yet verified], Claude Code [copy, not yet verified] +- Supported tools: Windsurf [native, tested], Cursor [copy, tested], Claude Code [copy, tested] - Capabilities: AI promptable application architecture, Promptable-by-default AI chat in a side drawer when credentials are present, Natural language querying through repository-backed AI tools, URL-aware AI prompt context using current location and route patterns, Swappable service implementations behind stable interfaces, Layer-specific schemas with explicit mapping between repository and tool contracts, Thin routes with extracted, testable page components, Structured server-side logging with pino and automatic Sentry error forwarding, Build-time semver version injected into observability tools for release tracking, Public runtime config exposed to the browser via window.__ENV__ without relying on import.meta.env, Consistent router UX defaults for preload, stale time, and scroll restoration, Distinct-value filter discovery tools that ground AI filter values in real data, Single markdown artifact backing the help page, an AI tool, and the chat's recommended-prompt list, Parent layout routes that centralize beforeLoad guards and shared loader data for nested child routes - ID: `tanstack-fullstack-pattern` - Version: `1.10.0` @@ -35,7 +35,7 @@ Use when scaffolding a new TanStack Start project, adding domain entities to the An interface-first fullstack architecture built on TanStack Start. The pattern defines clear interface boundaries between layers -- interfaces are rigid, implementations are swappable. -> **Companion documentation:** In repositories built from this template, [AGENTS.md](AGENTS.md) holds the project handbook -- file structure, Mantine styling, auth snippets, Biome, testing/E2E commands, and the full validation checklist. This skill focuses on the architectural contract; refer to AGENTS.md for operational detail. +> **Companion documentation:** In repositories built from this template, [AGENTS.md](https://github.com/carlosvin/tanstack-fullstack-ai-template/blob/main/AGENTS.md) holds the project handbook -- file structure, Mantine styling, auth snippets, Biome, testing/E2E commands, and the full validation checklist. This skill focuses on the architectural contract; refer to AGENTS.md for operational detail. ## Pattern Overview @@ -138,7 +138,7 @@ interface WritableRepository { ## Styling, Auth, and Observability -These topics are documented once in [AGENTS.md](AGENTS.md) to avoid drift: +These topics are documented once in [AGENTS.md](https://github.com/carlosvin/tanstack-fullstack-ai-template/blob/main/AGENTS.md) to avoid drift: - **Mantine UI** -- see AGENTS.md section 3 (component-first styling, CSS Modules, dark mode). - **Auth and Middleware** -- see AGENTS.md section 5 (middleware chain, `AuthContext`, guard helpers, code samples). Rigid rules 9--10 above are the normative summary. @@ -190,4 +190,4 @@ A TanStack Start file-based route at `/api/chat` with two handlers: ## Verification -Testing setup (Vitest, Playwright, auth fixtures) and the full validation checklist are in [AGENTS.md](AGENTS.md) sections 10 and 12. Quick smoke test: `pnpm format && pnpm lint && pnpm test && pnpm build`. +Testing setup (Vitest, Playwright, auth fixtures) and the full validation checklist are in [AGENTS.md](https://github.com/carlosvin/tanstack-fullstack-ai-template/blob/main/AGENTS.md) sections 10 and 12. Quick smoke test: `pnpm format && pnpm lint && pnpm test && pnpm build`. diff --git a/skills/registry.json b/skills/registry.json index f6dc194..b19e338 100644 --- a/skills/registry.json +++ b/skills/registry.json @@ -22,21 +22,21 @@ "id": "windsurf", "name": "Windsurf", "installMode": "native", - "tested": false, + "tested": true, "notes": "Reads `.agents/skills/` directly when the skill lives in the project." }, { "id": "cursor", "name": "Cursor", "installMode": "copy", - "tested": false, + "tested": true, "notes": "Copy the generated skill folder into the global Cursor skills directory." }, { "id": "claude-code", "name": "Claude Code", "installMode": "copy", - "tested": false, + "tested": true, "notes": "Copy the generated skill folder into the Claude Code skills directory." } ], diff --git a/skills/src/tanstack-fullstack-pattern.skill.yaml b/skills/src/tanstack-fullstack-pattern.skill.yaml index 9f717bf..99709a4 100644 --- a/skills/src/tanstack-fullstack-pattern.skill.yaml +++ b/skills/src/tanstack-fullstack-pattern.skill.yaml @@ -5,8 +5,8 @@ summary: >- the fullstack template, or implementing the interface-first repository pattern with AI-promptable tools, or nested layout routes duplicate beforeLoad checks or loaders that should live on a parent route, or TanStack Router, Start, or - AI behavior must be verified against current documentation instead of - training data. + AI behavior must be verified against current documentation instead of training + data. projectName: TanStack AI-Promptable Full-Stack Template projectSummary: >- A production-ready TanStack Start template designed to make internal tools AI @@ -24,17 +24,17 @@ supportedTools: - id: windsurf name: Windsurf installMode: native - tested: false + tested: true notes: Reads `.agents/skills/` directly when the skill lives in the project. - id: cursor name: Cursor installMode: copy - tested: false + tested: true notes: Copy the generated skill folder into the global Cursor skills directory. - id: claude-code name: Claude Code installMode: copy - tested: false + tested: true notes: Copy the generated skill folder into the Claude Code skills directory. tags: - tanstack-start @@ -58,14 +58,13 @@ capabilities: tracking - Public runtime config exposed to the browser via window.__ENV__ without relying on import.meta.env - - Consistent router UX defaults for preload, stale time, and scroll - restoration + - Consistent router UX defaults for preload, stale time, and scroll restoration - Distinct-value filter discovery tools that ground AI filter values in real data - Single markdown artifact backing the help page, an AI tool, and the chat's recommended-prompt list - - Parent layout routes that centralize beforeLoad guards and shared loader data - for nested child routes + - Parent layout routes that centralize beforeLoad guards and shared loader + data for nested child routes triggers: - fullstack template - TanStack Start project @@ -125,8 +124,7 @@ steps: - Ask the user about their domain and generate a tailored system prompt for chat.ts - Expose every repository method (reads and writes) as safe AI tools - - Expose a distinct-values server function and AI tool for every enum-ish - field + - Expose a distinct-values server function and AI tool for every enum-ish field - Wire a public env bridge (GET server function + window.__ENV__ script tag) for non-secret runtime config - Configure consistent router UX defaults and a root notFoundComponent @@ -148,7 +146,7 @@ content: | An interface-first fullstack architecture built on TanStack Start. The pattern defines clear interface boundaries between layers -- interfaces are rigid, implementations are swappable. - > **Companion documentation:** In repositories built from this template, [AGENTS.md](AGENTS.md) holds the project handbook -- file structure, Mantine styling, auth snippets, Biome, testing/E2E commands, and the full validation checklist. This skill focuses on the architectural contract; refer to AGENTS.md for operational detail. + > **Companion documentation:** In repositories built from this template, [AGENTS.md](https://github.com/carlosvin/tanstack-fullstack-ai-template/blob/main/AGENTS.md) holds the project handbook -- file structure, Mantine styling, auth snippets, Biome, testing/E2E commands, and the full validation checklist. This skill focuses on the architectural contract; refer to AGENTS.md for operational detail. ## Pattern Overview @@ -251,7 +249,7 @@ content: | ## Styling, Auth, and Observability - These topics are documented once in [AGENTS.md](AGENTS.md) to avoid drift: + These topics are documented once in [AGENTS.md](https://github.com/carlosvin/tanstack-fullstack-ai-template/blob/main/AGENTS.md) to avoid drift: - **Mantine UI** -- see AGENTS.md section 3 (component-first styling, CSS Modules, dark mode). - **Auth and Middleware** -- see AGENTS.md section 5 (middleware chain, `AuthContext`, guard helpers, code samples). Rigid rules 9--10 above are the normative summary. @@ -303,4 +301,4 @@ content: | ## Verification - Testing setup (Vitest, Playwright, auth fixtures) and the full validation checklist are in [AGENTS.md](AGENTS.md) sections 10 and 12. Quick smoke test: `pnpm format && pnpm lint && pnpm test && pnpm build`. + Testing setup (Vitest, Playwright, auth fixtures) and the full validation checklist are in [AGENTS.md](https://github.com/carlosvin/tanstack-fullstack-ai-template/blob/main/AGENTS.md) sections 10 and 12. Quick smoke test: `pnpm format && pnpm lint && pnpm test && pnpm build`.