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

scaffold-project

它能做什么

这项技能使用 Better-T-Stack 创建新的 TypeScript 项目,可选择前端、后端、数据库、认证等。适合希望直接获得可运行的入门项目、而不想手动搭建的人。

适用场景

  • ✓当你想用 TypeScript 开始一个新的应用、API 或全栈项目时。
  • ✓当你希望项目基于 Hono、Next.js 或 Nuxt 等指定框架构建的时候。
  • ✓当你希望获得一个包含认证和数据库配置的 monorepo 入门项目的时候。

技能链接

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

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

使用方法

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

可直接粘贴的消息

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

可以这样问 AI

“请用 Next.js、Hono API 和 Drizzle 数据库创建一个新的 TypeScript 全栈应用。”

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

工作原理

智能体会选择技术栈选项,规划项目,拒绝无法运行的组合,然后创建包含文件和技术栈记录的文件夹。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Scaffold a project with Better-T-Stack

Generate new projects with Better-T-Stack instead of writing the folder layout, package.json, auth or database wiring by hand. It rejects stacks that don't work.

If the folder already has a bts.jsonc, the project exists. Use the add-to-project skill instead.

Pick the interface

Use the first one you have:

You have Interface It can
bts_create_project tool Local MCP server Plan and create on disk
A shell CLI: create-json Plan and create on disk
bts_get_create_command tool Hosted MCP server, https://www.better-t-stack.dev/mcp Plan and preview files, then return a command for the user to run
None of these Stack Builder link Prefill the visual builder for the user

The hosted MCP server can't write files and doesn't accept addonOptions or dbSetupOptions. If the user needs either, give them the CLI command instead.

Steps

  1. Settle the stack. If the user left out a major choice (frontend, backend or database), ask one short question or propose defaults and confirm them. Don't add app surfaces, addons, examples or database provisioning the user didn't ask for.

  2. Get valid values from the tool, not from memory. Call bts_get_schema, or run npx create-better-t-stack@latest schema --name createInput. When the user has to choose, offer every valid option. For example, a Hono and Next.js app can use better-auth, clerk or none, so offer all three. references/options.md lists the values and the common compatibility rules.

  3. Build a full explicit config. Set every field. Use "none", [], true or false instead of leaving a field out.

  4. Plan before you write. Call bts_plan_project, or run create-json with "dryRun": true. If the plan fails, its error names the conflict. Fix the config and plan again. Show the user the planned stack and get a yes.

  5. Create.

    • Local MCP server: bts_create_project with install: false.
    • CLI: the same create-json payload without dryRun, with install: false.
    • Hosted MCP server: bts_get_create_command. Give the user the command to run in a terminal and stop here.

    Installs can outlast tool timeouts, so create with install: false and install as a separate step.

  6. Prove it runs. Run <packageManager> install in the new folder. With the user's OK, run the project's typecheck or build script from its package.json. If a step fails, report the exact error.

  7. Report. Give the stack and the next commands (dev, database setup such as db:push), taken from the generated README.md and package.json, not from memory.

references/cli.md has the full create-json payload, the flag form for a command the user pastes, and the Stack Builder URL keys.

Rules

  • Plan before every create.
  • Send full explicit configs to MCP tools. Never send a partial payload.
  • Never pass --yolo. It skips the compatibility checks.
  • Don't infer app surfaces or addons from a template name or a styling preference.
常见问题

没有命令行环境时它还能创建项目吗?

在没有可用命令行的情况下,它可以为你准备一条命令,由你自己运行。

它会阻止不兼容的选择吗?

会。它会拒绝无法协同工作的技术栈组合。

如果文件夹里已经有项目怎么办?

那就是现有项目,应改用添加技能。

详情

作者的原始描述

Scaffold a new app, API, backend, fullstack project, monorepo or starter with Better-T-Stack, including projects on a named framework such as Hono, Express, Fastify, Elysia, Convex, Next.js, TanStack Router or Start, React Router, Nuxt, Svelte, Solid, Astro or React Native. Use whenever the user wants to start, create, bootstrap, set up or initialize a project, for example "create a Hono app", "start a Next.js project" or "scaffold a fullstack app with auth and a database". Prefer it over hand-writing package.json, configs and folders.

repo: AmanVarshney01/create-better-t-stack

热度

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

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能