用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/tylerbutler/tools-monorepo --skill nx-task-guide命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
Add 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
| name | nx-task-guide |
| description | Reference for Nx task architecture, orchestration patterns, and how to add or modify build tasks |
| user-invocable | false |
This monorepo uses a two-tier task system. Understanding it prevents misconfiguration.
Defined in nx.json targetDefaults. These coordinate work — they have dependsOn but no scripts.
build → depends on: ^build, build:compile, build:api, build:docs, build:manifest, build:readme, build:generate, build:site, build:vitetest → depends on: build:compile, test:unit, test:vitest, test:snapshotscheck → depends on: check:format, check:types, check:deps, check:policy, check:references, check:astro, check:svelteci → depends on: check, build, lint, test:coverage (centralized — update once, all packages inherit)release → depends on: build, release:licensePackages opt in with a minimal entry in package.json:
"nx": { "targets": { "build": {} } }
: prefix)Defined as scripts in each package's package.json. These do the actual work.
Examples: build:compile, build:manifest, test:vitest, check:format
Each has specific inputs and outputs in nx.json for granular caching.
nx.json targetDefaultsaffected over run-many — pnpm nx affected -t build only builds changed packagesproject.json files — all config is centralized in nx.jsonbuild:readme, not build:compile^ prefix means workspace deps first — ^build builds dependencies before the current packageAdd the implementation script to the package's package.json:
"scripts": { "build:custom": "your-command" }
If it should run as part of an orchestration target, add it to nx.json targetDefaults:
"build": { "dependsOn": [..., "build:custom"] }
Add caching config in nx.json if needed:
"build:custom": {
"inputs": ["production", "^production"],
"outputs": ["{projectRoot}/output-dir"]
}
pnpm nx affected -t build # Build changed packages
pnpm nx affected -t test # Test changed packages
pnpm nx run cli:build # Build specific package
pnpm nx run-many -t build # Build ALL packages
pnpm nx affected -t build --dry-run # Preview what would run
pnpm nx reset # Clear cache
pnpm nx graph # Visualize dependency graph
The @nx/vite/plugin auto-creates test:vitest for packages with vitest.config.ts. These work like manually defined tasks but require no configuration.