npx skills add https://github.com/codervisor/forge --skill bootstrap指导智能体如何通过 forge 技能、GitHub Actions 工作流、发布流水线和版本控制基础设施,来搭建一个新的 Rust+Node.js 混合项目。
当以下任一情况为真时激活:
引导过程会设置四个集成的系统:
| 系统 | 技能 | 创建内容 |
|---|---|---|
| 规范驱动开发 | leanspec-sdd | specs/ 目录,.lean-spec/config.json |
| CI/CD | hybrid-ci |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
.github/workflows/ci.yml,copilot-setup-steps.yml |
| 发布 | rust-npm-publish | publish.config.ts,平台脚本 |
| 版本控制 | monorepo-version-sync | 版本同步脚本,工作区协议处理 |
从用户处收集(或从现有文件推断)以下信息:
| 字段 | 示例 | 必填 |
|---|---|---|
| 项目名称 | my-tool | 是 |
| npm 作用域 | @myorg | 是 |
| Rust 二进制文件名 | my-cli | 是 |
| Cargo 包名 | my-cli-rs | 是 |
| 主要 npm 包 | packages/cli | 是 |
| 仓库 URL | github.com/myorg/my-tool | 是 |
| 平台 | darwin-x64, darwin-arm64, linux-x64, windows-x64 | 否(默认:全部 4 个) |
| Node 版本 | 22 | 否(默认:22) |
创建项目骨架。完整目录树请参阅 references/project-structure.md。
my-tool/
├── .github/workflows/ ← CI + 发布工作流
├── .lean-spec/config.json ← LeanSpec 配置
├── specs/ ← 规范驱动开发
├── packages/cli/ ← 主要 npm 包
├── rust/ ← Rust 工作区(或根 Cargo.toml)
├── scripts/ ← 发布和版本脚本
├── publish.config.ts ← 发布流水线配置
├── package.json ← 根 package.json(版本单一事实来源)
├── pnpm-workspace.yaml ← pnpm 工作区定义
├── Cargo.toml ← Rust 工作区清单
└── turbo.json ← Turborepo 配置(可选)
使用此技能中的模板生成文件。模板是配置驱动的——填入步骤 1 中的值。
顺序很重要:
package.json、pnpm-workspace.yaml、Cargo.toml、turbo.jsonpublish.config.ts(驱动脚本生成)rust-npm-publish/templates/scripts/ 复制hybrid-ci/templates/workflows/ 复制,自定义矩阵.lean-spec/config.json 和 specs/使用项目特定的值更新生成的工作流:
搭建完成后运行以下检查:
pnpm install # 依赖项解析
pnpm build # TypeScript 编译
cargo check --workspace # Rust 编译
pnpm tsx scripts/sync-versions.ts # 版本同步工作
从零开始?
是 → 完整搭建(所有步骤)
否 → 增量设置 ↓
有 package.json 吗?
否 → 创建根 package.json + pnpm-workspace.yaml
是 → 检查是否有 pnpm-workspace.yaml
有 Cargo.toml 吗?
否 → 创建 Cargo 工作区
是 → 验证工作区结构
有 .github/workflows/ 吗?
否 → 从 hybrid-ci 模板生成
是 → 审查并更新现有工作流
有带发布流水线的 scripts/ 吗?
否 → 从 rust-npm-publish 模板复制
是 → 验证 publish.config.ts 是否存在
有 specs/ 或 .lean-spec/ 吗?
否 → 初始化 LeanSpec
是 → 跳过 LeanSpec 设置
此技能引用了其他技能的模板:
| 模板来源 | 文件 |
|---|---|
| bootstrap/templates/ | package.json、pnpm-workspace.yaml、Cargo.toml、turbo.json、AGENTS.md、.lean-spec/config.json、publish.config.ts |
| hybrid-ci/templates/ | 工作流 YAML 文件,action README 文件 |
| rust-npm-publish/templates/ | 发布脚本,类型定义 |
| monorepo-version-sync/templates/ | 版本同步脚本 |
通过 forge 安装:
lean-spec skill install codervisor/forge --skill bootstrap
.github/workflows/ 且没有 scripts/ 目录每周安装数
0
仓库
首次出现
7 天前
安全审计
Teach agents how to scaffold a new Rust+Node.js hybrid project with forge skills, GitHub Actions workflows, publish pipeline, and versioning infrastructure.
Activate when any of the following are true:
The bootstrap process sets up four integrated systems:
| System | Skill | What It Creates |
|---|---|---|
| Spec-Driven Dev | leanspec-sdd | specs/ dir, .lean-spec/config.json |
| CI/CD | hybrid-ci | .github/workflows/ci.yml, copilot-setup-steps.yml |
| Publishing | rust-npm-publish | publish.config.ts, platform scripts |
| Versioning | monorepo-version-sync | Version sync scripts, workspace protocol handling |
Collect these from the user (or infer from existing files):
| Field | Example | Required |
|---|---|---|
| Project name | my-tool | Yes |
| npm scope | @myorg | Yes |
| Rust binary name(s) | my-cli | Yes |
| Cargo package name(s) | my-cli-rs | Yes |
| Main npm packages | packages/cli | Yes |
Create the project skeleton. See references/project-structure.md for the full tree.
my-tool/
├── .github/workflows/ ← CI + publish workflows
├── .lean-spec/config.json ← LeanSpec configuration
├── specs/ ← Spec-driven development
├── packages/cli/ ← Main npm package(s)
├── rust/ ← Rust workspace (or root Cargo.toml)
├── scripts/ ← Publish & version scripts
├── publish.config.ts ← Publish pipeline configuration
├── package.json ← Root package.json (version source of truth)
├── pnpm-workspace.yaml ← pnpm workspace definition
├── Cargo.toml ← Rust workspace manifest
└── turbo.json ← Turborepo config (optional)
Use the templates in this skill to generate files. The templates are config-driven — fill in values from Step 1.
Order matters:
package.json, pnpm-workspace.yaml, Cargo.toml, turbo.jsonpublish.config.ts (drives script generation)rust-npm-publish/templates/scripts/hybrid-ci/templates/workflows/, customize matrix.lean-spec/config.json and specs/Update the generated workflows with project-specific values:
Run these checks after scaffolding:
pnpm install # Dependencies resolve
pnpm build # TypeScript compiles
cargo check --workspace # Rust compiles
pnpm tsx scripts/sync-versions.ts # Version sync works
Starting from scratch?
YES → Full scaffold (all steps)
NO → Incremental setup ↓
Has package.json?
NO → Create root package.json + pnpm-workspace.yaml
YES → Check for pnpm-workspace.yaml
Has Cargo.toml?
NO → Create Cargo workspace
YES → Verify workspace structure
Has .github/workflows/?
NO → Generate from hybrid-ci templates
YES → Review and update existing workflows
Has scripts/ with publish pipeline?
NO → Copy from rust-npm-publish templates
YES → Verify publish.config.ts exists
Has specs/ or .lean-spec/?
NO → Initialize LeanSpec
YES → Skip LeanSpec setup
This skill references templates from other skills:
| Template Source | Files |
|---|---|
| bootstrap/templates/ | package.json, pnpm-workspace.yaml, Cargo.toml, turbo.json, AGENTS.md, .lean-spec/config.json, publish.config.ts |
| hybrid-ci/templates/ | Workflow YAMLs, action READMEs |
Install via forge:
lean-spec skill install codervisor/forge --skill bootstrap
.github/workflows/ and no scripts/ directoryWeekly Installs
0
Repository
First Seen
7 days ago
Security Audits
Azure Data Explorer (Kusto) 查询技能:KQL数据分析、日志遥测与时间序列处理
114,200 周安装
| Repository URL |
github.com/myorg/my-tool |
| Yes |
| Platforms | darwin-x64, darwin-arm64, linux-x64, windows-x64 | No (default: all 4) |
| Node version | 22 | No (default: 22) |
| Publish scripts, type definitions |
| monorepo-version-sync/templates/ | Version sync scripts |