Loading...
Loading...
Scaffold a new Rust+Node.js hybrid monorepo with pnpm workspaces, Cargo workspace, CI workflows, and publish infrastructure. Use when: (1) starting a new project from scratch, (2) adding missing infrastructure to an existing repo, (3) figuring out the canonical project structure for a Rust+Node.js tool. Triggers on "bootstrap", "scaffold", "new project", "set up project", or "init" in a Rust+Node.js context.
npx skill4agent add onsager-ai/dev-skills rust-node-bootstrapCargo.tomlpackage.json.github/workflows/scripts/publish.config.tsStarting from scratch?
YES → Full scaffold (all steps in order below)
NO → Incremental setup ↓
Has package.json? → NO: Create root package.json + pnpm-workspace.yaml
Has Cargo.toml? → NO: Create Cargo workspace
Has .github/workflows/? → NO: Generate from rust-node-ci skill templates
Has scripts/? → NO: Generate from rust-npm-publish skill templates
Has publish.config.ts? → NO: Create from rust-npm-publish skill examples
Has specs/? → NO: Initialize LeanSpec| Field | Example | Required |
|---|---|---|
| Project name | | Yes |
| npm scope | | Yes |
| Rust binary name(s) | | Yes |
| Cargo package name(s) | | Yes |
| Main npm packages | | Yes |
| Repository URL | | Yes |
| Platforms | | No (default: all 4) |
my-tool/
├── .github/workflows/ ← CI + publish workflows
├── .lean-spec/config.json ← LeanSpec configuration
├── specs/ ← Spec-driven development
├── packages/cli/ ← Main npm package (thin JS wrapper)
│ ├── package.json ← bin + optionalDependencies
│ └── bin.js ← Resolves platform binary, spawns it
├── rust/ ← Rust workspace
├── scripts/ ← Publish & version scripts
├── publish.config.ts ← Publish pipeline configuration
├── package.json ← Root (version source of truth)
├── pnpm-workspace.yaml ← pnpm workspace definition
└── Cargo.toml ← Rust workspace manifestpackage.jsonpnpm-workspace.yamlCargo.tomlturbo.jsonpublish.config.tsbin.jspackage.json.lean-spec/config.jsonspecs/pnpm install && pnpm build && cargo check --workspace && pnpm tsx scripts/sync-versions.ts# CI/CD workflows and composite actions
npx skills add -g onsager-ai/dev-skills --skill rust-node-ci -a claude-code -y
# npm publishing pipeline and versioning
npx skills add -g onsager-ai/dev-skills --skill rust-npm-publish -a claude-code -y| Directory | Contents |
|---|---|
| templates/bootstrap/ | Root configs: |
npx skills add -g onsager-ai/dev-skills --skill rust-node-bootstrap -a claude-code -y