Skip to content
Agentmart
Submit a tool

t-init

Initialize a new Rust + React full-stack project; use --extension-demo to add Playwright integration-test infrastructure to an existing WXT extension; use…

Skill by timzaak

IndexedApache-2.0★ 97
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/timzaak-t-init

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Initialize a new Rust + React full-stack project; use --extension-demo to add Playwright integration-test infrastructure to an existing WXT extension; use --shopify to create a Shopify React Router app project (or retrofit an existing one) with the same demo/scripts infrastructure. Does not implement feature stories or perform their acceptance.

Use cases: frontend, testing, devops

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/t-init

What's inside

Skill name
t-init
Description
Initialize a new Rust + React full-stack project; use --extension-demo to add Playwright integration-test infrastructure to an existing WXT extension; use --shopify to create a Shopify React Router app project (or retrofit an existing one) with the same demo/scripts infrastructure. Does not implement feature stories or perform their acceptance.
License
Apache-2.0
Instructions
175 lines in SKILL.md · view on GitHub

Agent Skills spec issues

  • allowed-tools: must be a space-separated string
  • files: referenced but missing: scripts/index.md

Files (13)

  • SKILL.md
  • agents-template.md · references/
  • backend-template.md · references/
  • demo-template.md · references/
  • extension-demo-init.md · references/
  • extension-demo-template.md · references/
  • frontend-template.md · references/
  • output-checklist.md · references/
  • script-adaptation.md · references/
  • scripts-template.md · references/
  • shopify-init.md · references/
  • subagent-prompts.md · references/
  • unified-logger-package-template.md · references/

SKILL.md (first lines)

# 项目初始化

初始化全栈项目骨架、为已有 WXT 扩展补齐 extension-demo 基础设施,或初始化 Shopify App 工程。先按参数选择模式;三个模式不串行执行。

## 模式路由

| 参数 | 目标与执行入口 |
| --- | --- |
| `<project-name>` | 创建 Rust + React + Web Demo 全栈工程,执行下文流程 |
| `--extension-demo [--extension-dir <path>]` | 在当前目标项目根目录增量初始化扩展 Demo,仅读取并执行 [extension-demo 初始化流程](${CLAUDE_PLUGIN_ROOT}/skills/t-init/references/extension-demo-init.md),完成后返回 |
| `--shopify <project-name>` | 创建 Shopify App 工程(Shopify 官方 React Router 模板)或为已有 Shopify 工程增量补齐 demo/scripts 设施,仅读取并执行 [Shopify 初始化流程](${CLAUDE_PLUGIN_ROOT}/skills/t-init/references/shopify-init.md),完成后返回,不执行下文全栈生成步骤 |

拒绝混用项目名和 `--extension-demo`、混用 `--shopify` 与 `--extension-demo`、单独使用 `--extension-dir`、`--shopify` 缺少项目名或未知参数,并给出以上用法。扩展模式不创建新的 WXT 工程、Shopify 模式不执行全栈生成步骤。

## 适用范围

仅在以下场景使用:
- 用户明确执行 `/t-init <project-name>`
- 用户明确执行 `/t-init --extension-demo` 或要求为已有扩展搭建集成测试基础设施
- 用户明确执行 `/t-init --shopify <project-name>` 或要求创建 / 改造 Shopify App 工程
- 用户要求创建新项目、初始化全栈项目骨架
- 用户提到 "搭建项目""新建项目""项目初始化"

不要用于:
- Chrome 扩展生产工程初始化:按 [extension 初始化指南](${CLAUDE_PLUGIN_ROOT}/guides/extension/initialization.md) 搭建 WXT 工程;工程就绪后可用扩展模式补齐 Demo
- 已有项目的业务增量开发(扩展 Demo / Shopify 设施增量初始化除外)
- 代码修改或重构
- 单纯的前端或后端初始化(如果明确只做一侧,提示用户本 skill 生成完整全栈)

## 参数

以下参数与流程仅适用于全栈模式。

- `$ARGUMENTS` = 项目名称(必须)
- 仅允许英文、数字、连字符、下划线;拒绝 `..`、`/`、`\`;长度 1-50 字符

如果参数不合法,终止并提示:
`请提供合法的项目名称。例如:/t-init my-project`

## 占位符

整个流程中使用以下占位符:

- `{{PROJECT_NAME}}` — 项目名称(kebab-case,如 `my-project`)
- `{{PROJECT_NAME_PASCAL}}` — PascalCase(如 `MyProject`)
- `{{PROJECT_NAME_SNAKE}}` — snake_case(如 `my_project`)

## 生成流程

### Step 1: 验证参数(主 Agent)

- 校验 `$ARGUMENTS` 非空且合法
- 检查目标目录是否已存在同名目录;已存在且非空时询问用户是否覆盖
- 按各 references 模板和「输出文件清单」创建目录结构

### Step 2: 查询文档(主 Agent)

使用 Context7 查询关键依赖的最新文档,确保生成的代码使用当前最佳实践。必查依赖与关注点:

- **Axum** — 路由、状态共享、中间件、静态文件
- **Sea-ORM** — 数据库连接、实体定义、迁移
- **utoipa** — OpenApi derive、Swagger UI、Axum 集成
- **TanStack Router** — 文件路由、Vite 插件、createRouter
- **TanStack Query** — QueryClient、useQuery、Provider
- **@shadcn/lint** — ESLint 集成方式、规则集(no-raw-colors / no-arbitrary-values / no-inline-styles / no-restyle 等)、`settings.shadcn` 与 contracts 配置

如果某个 Context7 查询失败,降级到 `WebSearch` 搜索官方文档。如果都无法获取,基于已有知识生成但标注可能需要调整版本。将查询结果中的版本号和 API 用法保存,传递给后续 subagent。

### Step 3 ~ 5: 调度 subagent 生成代码(主 Agent)

按 `${CLAUDE_PLUGIN_ROOT}/protocols/subagent-dispatch.md` 依次调度 subagent,prompt 使用 [references/subagent-prompts.md](${CLAUDE_PLUGIN_ROOT}/skills/t-init/references/subagent-prompts.md) 中的对应模板,替换全部占位符并附上 Step 2 收集的版本信息。模板中的关键约束已固化,不得省略:

| Step | subagent | 模板 | 输出目录 | 完成验证 |
|---|---|---|---|---|
| 3 | `t-tools:backend-dev` | backend-dev 模板 | `<project-name>/backend/` | `cargo check` |
| 4 | `t-tools:frontend-dev` | frontend-dev 模板 | `<project-name>/frontend/` | `npm install` + `type-check`(routeTree.gen.ts 错误除外)+ `lint`(@shadcn/lint 0 error) |
| 5 | `t-tools:web-demo-dev` | web-demo-dev 模板 | `<project-name>/demo/` | `npm install` + smoke test 全部通过 |

### Step 6: 复制并适配项目本地 scripts(主 Agent)

将插件运行时脚本复制到目标项目根目录 `scripts/`,作为该项目后续环境启动、测试执行和 Demo 运行的优先入口。

复制来源:`${CLAUDE_PLUGIN_ROOT}/scripts/`

必须复制:
- `backend-test.py`
- `test-start.py`
- `test-stop.py`
- `demo-start.py`
- `demo-stop.py`
- `web-demo-test-runner.py`
- `web-demo-run-all.py`
- `debug-test.py`
- `cleanup-demo.py`
- `cleanup-test-logs.py`
- `web-demo-failure-summary.py`
- `lib/*.py`

插件脚本提取自源全栈工程,内置该工程的二进制名、配置环境变量、容器名和端口,原样交付不可运行。复制后必须读取 [references/script-adaptation.md](${CLAUDE_PLUGIN_ROOT}/skills/t-init/references/script-adaptation.md),以本次生成的 `backend/`、`frontend/`、`demo/` 实际事实为输入逐项改写,并执行其中的交付验证(环境可执行时运行一次 `demo-start.py` → `demo-stop.py` 循环;不可执行时在收尾输出标注未验证)。

约束:
- 脚本文件名、主要 CLI 参数和输出 JSON/日志契约保持稳定,便于 `/t-tools:t-*` 流程复用。
- 运行类命令优先使用 `uv run scripts/<name>.py`;只有目标项目缺少对应脚本时,才回退到 `uv run ${CLAUDE_PLUGIN_ROOT}/scripts/<name>.py`。

脚本适配完成后,读取 [references/scripts-template.md](${CLAUDE_PLUGIN_ROOT}/skills/t-init/references/scripts-template.md),根据实际脚本和各端测试配置生成目标项目 `scripts/index.md`,作为测试运行说明的唯一维护位置。

### Step 7: 生成 AGENTS.md、README.md 和 .gitignore(主 Agent)

读取 [references/agents-template.md](${CLAUDE_PLUGIN_ROOT}/skills/t-init/references/agents-template.md) 获取模板内容。

生成三个根目录文件:
- `AGENTS.md` — 项目描述占位符 + 项目行为准则 + `scripts/index.md` 读取入口;不重复测试命令,也不为此生成分端 AGENTS.md
- `README.md` — 快速启动指南;测试运行说明统一维护在 `scripts/index.md`
- `.gitignore` — 只覆盖跨端运行时产物:`log/`(项目本地脚本写入的日志与运行时文件);`backend/`、`frontend/`、`demo/` 的构建产物由各 subagent 按模板内的分端 `.gitignore` 处理,不在此重复。已存在 `.gitignore` 时只增补缺失条目,不重写已有内容

生成后提示用户填写 `AGENTS.md` 顶部的项目描述占位符。

### Step 8: 验证(主 Agent)

From timzaak/web-dev-skills, Apache-2.0.

More from timzaak/web-dev-skills

Signals

Stars
97
Forks
9
Open issues
0
Last commit (this folder)
Oct 19, 2026 (9 days ago)
Last release
Oct 20, 2026 (8 days ago)

From GitHub (fetched Oct 24, 2026).

Details

License
Apache-2.0
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from timzaak

Cite this page

t-init skill. Agent Mart. https://agentmart.dev/skills/timzaak-t-init (last updated 2026-10-24)