Agent Skills › TanStack/cli › maintain-custom-addons-dev-watch

maintain-custom-addons-dev-watch

GitHub

指导在本地开发环境中创建、编译和调试 TanStack 自定义插件。涵盖初始化设置、热更新同步循环配置及元数据校验,帮助开发者高效构建和迭代插件模板。

packages/cli/skills/maintain-custom-addons-dev-watch/SKILL.md TanStack/cli

Trigger Scenarios

需要创建或修改 TanStack CLI 自定义插件 配置插件开发时的自动编译与文件同步 排查插件开发环境中的路径或元数据错误

Install

npx skills add TanStack/cli --skill maintain-custom-addons-dev-watch -g -y
More Options

Non-standard path

npx skills add https://github.com/TanStack/cli/tree/main/packages/cli/skills/maintain-custom-addons-dev-watch -g -y

Use without installing

npx skills use TanStack/cli@maintain-custom-addons-dev-watch

指定 Agent (Claude Code)

npx skills add TanStack/cli --skill maintain-custom-addons-dev-watch -a claude-code -g -y

安装 repo 全部 skill

npx skills add TanStack/cli --all -g -y

预览 repo 内 skill

npx skills add TanStack/cli --list

SKILL.md

Frontmatter
{
    "name": "maintain-custom-addons-dev-watch",
    "metadata": {
        "type": "lifecycle",
        "library": "tanstack-cli",
        "library_version": "0.62.1"
    },
    "requires": [
        "add-addons-existing-app"
    ],
    "description": "Build and iterate custom add-ons\/templates with tanstack add-on init, add-on compile, add-on dev, and tanstack create --dev-watch, including sync loop preconditions, watch-path validation, and project metadata constraints.\n"
}

Maintain Custom Add-ons In Dev Watch

Use this skill for local add-on authoring workflows where you continuously compile and sync package output into a target app.

Setup

npx @tanstack/cli add-on init
npx @tanstack/cli add-on compile

Core Patterns

Run add-on dev loop while editing source

npx @tanstack/cli add-on dev

Sync watched framework directory into a sandbox target app

# --dev-watch is a flag on `create`, not on `dev`
npx @tanstack/cli create my-sandbox --dev-watch ../path/to/framework-dir

Re-run compile before apply when changing metadata

npx @tanstack/cli add-on compile
npx @tanstack/cli add my-custom-addon

Common Mistakes

HIGH Use --dev-watch with --no-install

Wrong:

npx @tanstack/cli create my-sandbox --dev-watch ../my-addon-package --no-install

Correct:

npx @tanstack/cli create my-sandbox --dev-watch ../my-addon-package

Dev-watch rejects --no-install, so automated loops fail before any sync work starts.

Source: packages/cli/src/dev-watch.ts:112

HIGH Start dev-watch without valid framework directory

Wrong:

npx @tanstack/cli create my-sandbox --dev-watch ../missing-or-invalid-dir

Correct:

npx @tanstack/cli create my-sandbox --dev-watch ../valid-framework-dir

Watch setup validates that the path exists, is a directory, and contains at least one of add-ons/, assets/, or framework.json. Invalid targets fail before file syncing begins.

Source: packages/cli/src/command-line.ts:599

CRITICAL Author add-on from code-router project

Wrong:

npx @tanstack/cli add-on init

Correct:

# Run add-on init from a file-router project
npx @tanstack/cli add-on init

Custom add-on authoring expects file-router mode and exits when run from incompatible project modes.

Source: packages/create/src/custom-add-ons/add-on.ts

HIGH Run add-on workflows without scaffold metadata

Wrong:

npx @tanstack/cli add-on dev

Correct:

# Run in a project scaffolded by TanStack CLI (contains .cta.json), then:
npx @tanstack/cli add-on dev

Custom add-on flows rely on persisted scaffold options, so missing metadata blocks initialization and update paths.

Source: packages/create/src/custom-add-ons/shared.ts:158

HIGH Tension: Backwards support vs deterministic automation

This domain's patterns conflict with add-addons-existing-app. Tooling assumes reusable automation, but hidden metadata preconditions from legacy support make add-on loops non-portable across repositories.

See also: add-addons-existing-app/SKILL.md § Common Mistakes

Version History

  • efd39a6 Current 2026-07-25 11:26

Same Skill Collection

packages/cli/skills/add-addons-existing-app/SKILL.md
packages/cli/skills/choose-ecosystem-integrations/SKILL.md
packages/cli/skills/create-app-scaffold/SKILL.md
packages/cli/skills/query-docs-library-metadata/SKILL.md

Metadata

Files
0
Version
4f7744c
Hash
4bf93187
Indexed
2026-07-25 11:26

Home - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-28 13:36
浙ICP备14020137号-1