重要前提
安装AI Skills的关键前提是:必须科学上网,且开启TUN模式,这一点至关重要,直接决定安装能否顺利完成,在此郑重提醒三遍:科学上网,科学上网,科学上网。查看完整安装教程 →
npx skills add https://github.com/nrwl/nx --skill nx-run-tasks你可以通过以下方式使用 Nx 运行任务。
请注意,如果用户没有全局安装 nx,你可能需要在命令前加上 npx/pnpx/yarn。请查看 package.json 或 lockfile 以确定正在使用哪个包管理器。
有关任何命令的更多详细信息,请使用 --help 运行它(例如 nx run-many --help、nx affected --help)。
你可以通过 nx show project <projectname> --json 来检查这些任务,例如 nx show project myapp --json。它包含一个 targets 部分,其中包含有关可运行目标的信息。你也可以直接查看 package.json 中的 scripts 或 project.json 中的 targets,但可能会错过 Nx 插件推断出的任务。
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
nx run <project>:<task>
其中 project 是在 package.json 或 project.json(如果存在)中定义的项目名称。
nx run-many -t build test lint typecheck
你可以传递 -p 标志来筛选特定项目,否则它将在所有项目上运行。你也可以使用 --exclude 来排除项目,并使用 --parallel 来控制并行进程的数量(默认为 3)。
示例:
nx run-many -t test -p proj1 proj2 — 测试特定项目nx run-many -t test --projects=*-app --exclude=excluded-app — 测试匹配模式的项目nx run-many -t test --projects=tag:api-* — 按标签测试项目使用 nx affected 仅对已更改的项目以及依赖于已更改项目的项目运行任务。这在 CI 和大型工作区中特别有用。
nx affected -t build test lint
默认情况下,它会与基础分支进行比较。你可以自定义此行为:
nx affected -t test --base=main --head=HEAD — 与特定的 base 和 head 进行比较nx affected -t test --files=libs/mylib/src/index.ts — 直接指定已更改的文件这些标志适用于 run、run-many 和 affected:
--skipNxCache — 即使结果已缓存也重新运行任务--verbose — 打印额外信息,例如堆栈跟踪--nxBail — 在第一个任务失败后停止执行--configuration=<name> — 使用特定的配置(例如 production)每周安装量
71
代码仓库
GitHub 星标数
28.5K
首次出现
2026年1月28日
安全审计
已安装于
opencode67
gemini-cli64
github-copilot64
codex64
cursor62
amp61
You can run tasks with Nx in the following way.
Keep in mind that you might have to prefix things with npx/pnpx/yarn if the user doesn't have nx installed globally. Look at the package.json or lockfile to determine which package manager is in use.
For more details on any command, run it with --help (e.g. nx run-many --help, nx affected --help).
You can check those via nx show project <projectname> --json, for example nx show project myapp --json. It contains a targets section which has information about targets that can be run. You can also just look at the package.json scripts or project.json targets, but you might miss out on inferred tasks by Nx plugins.
nx run <project>:<task>
where project is the project name defined in package.json or project.json (if present).
nx run-many -t build test lint typecheck
You can pass a -p flag to filter to specific projects, otherwise it runs on all projects. You can also use --exclude to exclude projects, and --parallel to control the number of parallel processes (default is 3).
Examples:
nx run-many -t test -p proj1 proj2 — test specific projectsnx run-many -t test --projects=*-app --exclude=excluded-app — test projects matching a patternnx run-many -t test --projects=tag:api-* — test projects by tagUse nx affected to only run tasks on projects that have been changed and projects that depend on changed projects. This is especially useful in CI and for large workspaces.
nx affected -t build test lint
By default it compares against the base branch. You can customize this:
nx affected -t test --base=main --head=HEAD — compare against a specific base and headnx affected -t test --files=libs/mylib/src/index.ts — specify changed files directlyThese flags work with run, run-many, and affected:
--skipNxCache — rerun tasks even when results are cached--verbose — print additional information such as stack traces--nxBail — stop execution after the first failed task--configuration=<name> — use a specific configuration (e.g. production)Weekly Installs
71
Repository
GitHub Stars
28.5K
First Seen
Jan 28, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode67
gemini-cli64
github-copilot64
codex64
cursor62
amp61
Azure Data Explorer (Kusto) 查询技能:KQL数据分析、日志遥测与时间序列处理
145,500 周安装
Azure合规性安全审计工具 - 密钥保管库过期检查与资源配置评估
152,500 周安装
Azure AI 服务指南:AI Search、Speech、OpenAI、文档智能功能与SDK
152,500 周安装
Azure云迁移工具:AWS Lambda到Azure Functions自动评估与代码迁移指南
152,500 周安装
Azure 托管 GitHub Copilot SDK 部署指南 - 微软官方技能模板
152,100 周安装
Azure部署指南:从验证到执行的完整流程与最佳实践
152,700 周安装
Azure AI 网关配置指南:使用 APIM 治理 AI 模型、MCP 工具与智能体
152,100 周安装