跳到正文
Skillpedia
通用编程5.9k · #14548

add-to-project

它能做什么

这项技能使用 Better-T-Stack 自带的添加命令,为该工具创建的项目加入工具和功能。适合希望扩展现有 Better-T-Stack 项目、又不想手动接线的开发者。

适用场景

  • ✓当项目中有 bts.jsonc 文件,并且你想为它添加工具或功能时。
  • ✓当你想为 Better-T-Stack 项目加入代码检查、Git 钩子或文档网站的时候。
  • ✓当你想为现有项目添加共享工作区包的时候。

技能链接

https://github.com/AmanVarshney01/create-better-t-stack/blob/main/plugin/skills/add-to-project/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/AmanVarshney01/create-better-t-stack/blob/main/plugin/skills/add-to-project/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请为我的 Better-T-Stack 项目添加 PWA 支持和 Biome。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会读取项目的技术栈文件,先用试运行规划改动,然后应用所选的附加功能,并保持技术栈文件为最新。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Add to an existing Better-T-Stack project

Add tooling to a Better-T-Stack project with its add flow instead of wiring it by hand. For a new project, use the scaffold-project skill.

bts.jsonc at the project root records the stack chosen at creation and a reproducibleCommand that recreates it. The add flow reads it to detect the stack and updates it afterwards.

Pick the interface

  • bts_add_addons tool: the local MCP server.
  • A shell: the CLI's add-json.
  • Neither: give the user the command bunx create-better-t-stack@latest add --addons <names>, using the project's package runner.

The hosted MCP server can't change an existing project.

Steps

  1. Read bts.jsonc. It tells you the current stack. If it's missing, add can't run. Tell the user instead of recreating the file. Never edit it by hand.

  2. Check nested options. Some addons take options in addonOptions: the Fumadocs template, search and AI chat, the WXT and OpenTUI templates, the MCP addon's servers and agents, and the Skills addon's sources. Get their shape from bts_get_schema or npx create-better-t-stack@latest schema --name addonOptions.

  3. Plan. Call bts_plan_addons, or run:

    npx create-better-t-stack@latest add-json --json '{
      "projectDir": "./my-app",
      "addons": ["pwa", "biome"],
      "dryRun": true
    }'
    

    Pass addons, a workspace package name, or both. Show the user what will change, including any conflict the plan reports.

  4. Apply after the user agrees: bts_add_addons, or add-json without dryRun.

  5. Prove it runs. Run <packageManager> install. With the user's OK, run the project's typecheck or build script. Report the exact error if a step fails.

  6. Report what changed and the follow-up commands.

What can be added

Addons: pwa, tauri, electrobun, starlight, fumadocs, biome, oxlint, ultracite, husky, lefthook, turborepo, nx, vite-plus, mcp, skills, opentui, wxt, evlog.

  • turborepo, nx and vite-plus are task runners. A project can have one.
  • axiom can't be added later. It sets up deployment infrastructure, so it must be chosen at creation. If the user asks for it, say so instead of planning it.
  • A workspace package (package: "shared", or add --package shared) scaffolds packages/shared with a manifest, the shared tsconfig and src/index.ts.

Rules

  • Plan before every apply.
  • Don't add addons the user didn't ask for.
  • Never hand-edit bts.jsonc.
常见问题

如果项目没有 bts.jsonc 文件怎么办?

添加流程无法运行,智能体会告诉你,而不会重新创建该文件。

它会先做试运行吗?

会。它会先规划改动,再进行应用。

这项技能适用于新项目吗?

不适用。新项目应使用单独的脚手架技能。

详情

作者的原始描述

Add addons, tooling or a workspace package to an existing Better-T-Stack project, such as PWA, Tauri, Starlight or Fumadocs docs, Biome, Oxlint, Ultracite, Husky, Lefthook, Turborepo, Nx, the MCP or Skills addon, or a shared `packages/<name>`. Use when the project has a `bts.jsonc` file and the user wants to extend it or add tooling.

repo: AmanVarshney01/create-better-t-stack

热度

GitHub 星标
5.9k
排名
#14548
许可证
MIT
更新时间
2026/10/24

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能