update-cnw-templates
БесплатноЗапускает вложенные скриптыНе проверенMigrate create-nx-workspace template repositories to a target Nx version, verify each template, and prepare draft PRs. Use when asked to update or bump the…
от nrwl★ 29 499 звёзд на GitHubОб этом скилле
Read Codex execution conventions before following this workflow.
Update CNW Templates
Bump every CNW template repo to one target nx version, verify it still builds and
still scaffolds, then open a draft PR per repo. Each template is an independent
GitHub repo under nrwl/; create-nx-workspace --template nrwl/<repo> clones its
main to scaffold a user's workspace. Each repo has a ci.yml that lints, tests,
builds, typechecks, and e2es it on PRs - but the consumer path (scaffolding from main
via --template) isn't covered there, and a force-push to main skips PR CI entirely
(how the react template broke). So verify before you ship.
This skill makes no assumption that the repos are checked out locally. It clones what it needs. Anyone on the team can run it from a fresh machine.
Input
- Target nx version - e.g.
23.2.0. If omitted, use latest stable:npm view nx@latest version. Verify it exists:npm view nx@<version> version. - Repos - one, several, or (default) all live templates. Names may be given with or without the
-templatesuffix. - Work dir - where clones land. Default
./tmp/cnw-templates/(gitignored). Reuse an existing clone if one is already there and clean.
The template repos
All live under nrwl/<name>-template, push target branch main. --template accepts
the full nrwl/<repo> form for all of them. Four templates also have a bare shorthand.
| Template | --template value |
Shorthand |
|---|---|---|
| empty | nrwl/empty-template |
empty |
| typescript | nrwl/typescript-template |
ts |
| react | nrwl/react-template |
react |
| angular | nrwl/angular-template |
angular |
| react-mfe | nrwl/react-mfe-template |
- |
| nextjs | nrwl/nextjs-template |
- |
| nestjs | nrwl/nestjs-template |
- |
| express-api | nrwl/express-api-template |
- |
| astro-starlight | nrwl/astro-starlight-template |
- |
| remotion | nrwl/remotion-template |
- |
| tanstack-start | nrwl/tanstack-start-template |
- |
| tanstack-ai | nrwl/tanstack-ai-template |
- |
Before continuing, check that all the templates are live. A repo is live if
GET https://api.github.com/repos/nrwl/<name>-template/commits/main returns 200 (a sha).
If you hit 404 report it.
This table may change, and the user will tell you which repos to use (defaults to all in the table).
Procedure
1. Resolve version + repo set
npm view nx@<version> version # confirm target exists
# for each requested repo, confirm it's live:
curl -s -o /dev/null -w "%{http_code}" https://api.github.com/repos/nrwl/<name>-template/commits/main
1a. If in a Polygraph session, add the templates to it
If this skill runs inside a Polygraph session (the startup banner names a session ID),
add every target template repo to the session so their per-repo PRs link together under
one session. The repos are exact owner/repo refs, so add them directly - no discovery:
add_repo(sessionId: "<session-id>", repoIds: ["nrwl/empty-template", "nrwl/react-template", ...])
Add only the live repos you're actually touching. After add_repo, the PRs you open in
step 5 join the session automatically - the link is the session, not any cross-reference
in the PR bodies. If there's no session, skip this and proceed normally.
2. Clone (or reuse) each repo
All template repos are npm (package-lock.json). Clone over SSH; the working tree must
be clean before you touch it.
mkdir -p tmp/cnw-templates && cd tmp/cnw-templates
git clone [email protected]:nrwl/<name>-template.git # or reuse an existing clean clone
cd <name>-template
git checkout main
git status --porcelain # MUST be empty; if dirty, skip this repo and report
git fetch origin main && git reset --hard origin/main # make sure we start from latest origin
grep '"nx"' package.json # record current version
3. Migrate
Use CI=true to skip prompts.
CI=true npm install # node_modules at current version
CI=true npx nx migrate <target-version> # updates package.json, writes migrations.json
CI=true npm install # apply the dep bump
if [ -f migrations.json ]; then
CI=true npx nx migrate --run-migrations
rm -f migrations.json
fi
4. Verify
NX_NO_CLOUD=true NX_DAEMON=false CI=true npx nx run-many -t build test lint typecheck --skip-nx-cache
NX_NO_CLOUD=true NX_DAEMON=false CI=true npx nx run-many -t e2e # where the repo defines it
If any target fails, revert that repo (git checkout .) and report - never open a red PR.
5. Commit + PR (per repo)
Every template's `main
Установить update-cnw-templates в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл update-cnw-templates?
Migrate create-nx-workspace template repositories to a target Nx version, verify each template, and prepare draft PRs. Use when asked to update or bump the CNW templates.
Как установить скилл update-cnw-templates?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл update-cnw-templates запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic