用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/tylerbutler/tools-monorepo --skill scaffold-package命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | scaffold-package |
| description | Scaffold a new package in the monorepo with correct conventions, configs, and policy compliance |
| disable-model-invocation | true |
Create a new package in packages/ following all monorepo conventions.
Gather info - Ask the user for:
@tylerbu/ scope)library, cli (OCLIF), docs (Astro/Starlight), or remark-pluginCreate directory - packages/<folder-name>/
Create package.json matching existing conventions:
"type": "module""license": "MIT""author": "Tyler Butler <tyler@tylerbutler.com>""bugs": "https://github.com/tylerbutler/tools-monorepo/issues""repository": { "type": "git", "url": "git+https://github.com/tylerbutler/tools-monorepo.git", "directory": "packages/<name>" }"homepage" pointing to GitHub tree./esm/ output directory with typesclean, build:compile, format, check:format, lint, test as appropriate for the type"nx": { "targets": { "build": {} } } to enable Nx orchestrationbin, oclif config, build:manifest, build:readme scripts"private": true, build:site, dev, preview scripts, check:astroCreate tsconfig.json:
{
"extends": "../../config/tsconfig.strict.json",
"include": ["src/**/*"],
"compilerOptions": {
"rootDir": "./src",
"outDir": "./esm",
"types": ["node"]
}
}
Create vitest.config.ts (for non-docs packages):
import { defineConfig, mergeConfig } from "vitest/config";
import defaultConfig from "../../config/vitest.config";
const config = mergeConfig(defaultConfig, defineConfig({}));
export default config;
Create src/index.ts with a placeholder export
Create CLAUDE.md with package-specific guidance (keep it concise - 20-30 lines)
Run setup commands:
pnpm install
./packages/repopo/bin/dev.js check --fix
pnpm syncpack:fix
Verify - Run pnpm nx run <package>:build to confirm the package builds
.mts for TypeScript files if they need to be explicitly ESM (though .ts is fine with "type": "module").js file extensions - use .mjs or .cjsworkspace:^ protocolAdd a new OCLIF command to a CLI package with proper base class, flags, args, and post-creation steps
Create changesets for pending changes by analyzing git diff and commit history
Audit workspace dependencies for version mismatches, unused packages, and sync issues across all packages