Link Workspace Packages
nomcopter/react-mosaic
Link workspace packages in monorepos (npm, yarn, pnpm, bun).
在 TypeScript repo 中接入 dependency-cruiser,让每个 package 成为 deep module:implementation 隐藏在 subfolders 中,只能通过 entry-point files 访问。User-invoked。
$ npx skills add vinvcn/mattpocock-skills-zh-CN --skill setup-ts-deep-modules -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install vinvcn/mattpocock-skills-zh-CN setup-ts-deep-modules --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/vinvcn/mattpocock-skills-zh-CN.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/in-progress/setup-ts-deep-modules .claude/skills/setup-ts-deep-modules && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "setup-ts-deep-modules" agent skill from https://github.com/vinvcn/mattpocock-skills-zh-CN/tree/main/skills/in-progress/setup-ts-deep-modules into .claude/skills/setup-ts-deep-modules/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "setup-ts-deep-modules", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/vinvcn/mattpocock-skills-zh-CN/tree/main/skills/in-progress/setup-ts-deep-modulesType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add vinvcn/mattpocock-skills-zh-CN --skill setup-ts-deep-modules -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install vinvcn/mattpocock-skills-zh-CN setup-ts-deep-modules --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/vinvcn/mattpocock-skills-zh-CN.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/in-progress/setup-ts-deep-modules .agents/skills/setup-ts-deep-modules && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "setup-ts-deep-modules" agent skill from https://github.com/vinvcn/mattpocock-skills-zh-CN/tree/main/skills/in-progress/setup-ts-deep-modules into .agents/skills/setup-ts-deep-modules/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "setup-ts-deep-modules", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add vinvcn/mattpocock-skills-zh-CN --skill setup-ts-deep-modules -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install vinvcn/mattpocock-skills-zh-CN setup-ts-deep-modules --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/vinvcn/mattpocock-skills-zh-CN.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/in-progress/setup-ts-deep-modules .cursor/skills/setup-ts-deep-modules && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "setup-ts-deep-modules" agent skill from https://github.com/vinvcn/mattpocock-skills-zh-CN/tree/main/skills/in-progress/setup-ts-deep-modules into .cursor/skills/setup-ts-deep-modules/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "setup-ts-deep-modules", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/vinvcn/mattpocock-skills-zh-CN.git --path skills/in-progress/setup-ts-deep-modules--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add vinvcn/mattpocock-skills-zh-CN --skill setup-ts-deep-modules -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install vinvcn/mattpocock-skills-zh-CN setup-ts-deep-modules --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/vinvcn/mattpocock-skills-zh-CN.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/in-progress/setup-ts-deep-modules .gemini/skills/setup-ts-deep-modules && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "setup-ts-deep-modules" agent skill from https://github.com/vinvcn/mattpocock-skills-zh-CN/tree/main/skills/in-progress/setup-ts-deep-modules into .gemini/skills/setup-ts-deep-modules/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "setup-ts-deep-modules", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install vinvcn/mattpocock-skills-zh-CN setup-ts-deep-modulesInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add vinvcn/mattpocock-skills-zh-CN --skill setup-ts-deep-modules -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/vinvcn/mattpocock-skills-zh-CN.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/in-progress/setup-ts-deep-modules .github/skills/setup-ts-deep-modules && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "setup-ts-deep-modules" agent skill from https://github.com/vinvcn/mattpocock-skills-zh-CN/tree/main/skills/in-progress/setup-ts-deep-modules into .github/skills/setup-ts-deep-modules/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "setup-ts-deep-modules", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add vinvcn/mattpocock-skills-zh-CN --skill setup-ts-deep-modules -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install vinvcn/mattpocock-skills-zh-CN setup-ts-deep-modules --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/vinvcn/mattpocock-skills-zh-CN.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/in-progress/setup-ts-deep-modules .opencode/skills/setup-ts-deep-modules && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "setup-ts-deep-modules" agent skill from https://github.com/vinvcn/mattpocock-skills-zh-CN/tree/main/skills/in-progress/setup-ts-deep-modules into .opencode/skills/setup-ts-deep-modules/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "setup-ts-deep-modules", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
setup-ts-deep-modules在 TypeScript repo 中接入 dependency-cruiser,让每个 package 成为 deep module:implementation 隐藏在 subfolders 中,只能通过 entry-point files 访问。User-invoked。
Setup TS Deep Modules is an agent skill from vinvcn/mattpocock-skills-zh-CN. 在 TypeScript repo 中接入 dependency-cruiser,让每个 package 成为 deep module:implementation 隐藏在 subfolders 中,只能通过 entry-point files 访问。User-invoked。
Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files (for example `agents/openai.yaml`).
It works with TypeScript and pnpm. The repository describes itself as: 这是 mattpocock/skills 的简体中文本地化版本。 The licence is MIT.
7 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 3f92a83. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Ships script files (JavaScript), which the agent can run.
Shell commands in SKILL.md call:
npmFrom the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
github.comFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Setup TS Deep Modules loads about 1.4k tokens when it runs. Until then it costs about 40 tokens; SKILL.md has 534 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from vinvcn/mattpocock-skills-zh-CN at commit 3f92a83, republished under its MIT licence (© vinvcn). 534 words, ~1,388 tokens.
.claude/skills/setup-ts-deep-modules/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.让 repo 中每个 package 成为 deep module:用小 interface 隐藏大量 behaviour。Package 的 public surface 是其 entry points(package root 中的 files),所有 subfolders 都隐藏。这个 skill 会安装 dependency-cruiser,加入强制只能通过 entry points 访问的 rules,并证明这些 rules 确实会拦截违规。
Vocabulary(deep module、interface、seam、depth)来自调用 Skill 工具并指定 codebase-design;整个过程都使用它的语言。
src/packages/
<name>/
index.ts ← an entry point (public). Import this from outside.
client.ts ← another entry point. Packages may expose SEVERAL.
lib/ ← implementation: hidden from outside, free to import each other.
tests/ ← co-located tests + fixtures (a subfolder, so private).Public surface 是 package 的 root files,并非指定的单个 index.ts。按 convention,implementation 放在 lib/,tests 放在 tests/,使所有 packages 采用相同的 two-folder shape。Rule 本身是通用的:任何 subfolder 中的任何内容都是 private,因此永远无需为了新增 folder 扩展 config。
四条 rules,全部为 error:
<pkg>/tests/ 下的 files 可以 import 任意 package 的 entry points 和自己的 tests/ fixtures,但不能 import 任何 package 的 subfolder internals(包括自己的)。允许跨 package integration tests,不允许 deep imports。Entry points, not a barrel. Public surface 是每个 root file,因此 package 可以提供多个小 entry points(index.ts、client.ts、server.ts),不必把一切汇入巨大的 index.ts。不鼓励 re-export 整个 subtree 的 barrel files;entry points 要小,implementation 隐藏在 subfolders。
Layering(哪些 packages 可以依赖哪些)是另一个 concern,在 config 中保留 commented stub,由当前 repo 填写。
pnpm-lock.yaml → pnpm,yarn.lock → yarn,bun.lockb → bun,否则 npm。后续每条 command 都使用它(pnpm/yarn/npm run/bunx)。src/ 就用 src/packages,否则用 packages。如果 repo 已有明显不同的 convention,与用户确认。.dependency-cruiser.* file。若存在,不要覆盖;merge 四条 rules 和 options,并说明添加了什么。Done when: package manager、packages root 和 existing-config status 全部明确。
使用检测到的 package manager,把 dependency-cruiser 安装为 devDependency。
Done when: dependency-cruiser 出现在 devDependencies。
把 dependency-cruiser.config.cjs 复制到 repo root,命名为 .dependency-cruiser.cjs。把 PACKAGES_ROOT 设置成 step 1 检测到的 root。Rules 基于 path depth 且与 extension 无关,不需要其他调整。
Done when: .dependency-cruiser.cjs 存在、PACKAGES_ROOT 正确,并包含四条 forbidden rules。
lint:boundaries script:depcruise <packages-root>(或 depcruise src)。check / ci / validate)。不要修改 tsconfig 或添加 path aliases。lint:boundaries,并告诉用户把它加入 CI。Done when: lint:boundaries 存在,且和 typecheck 由同一 command 运行。
创建并 commit 一个 <packages-root>/example/ 作为 copy-me template:
index.ts — entry point,export 一个 delegate 给 internal file 的 function,让 package 明显是 deep,不是 pass-through。lib/impl.ts — subfolder 中的 internal file,由 index.ts import,外部无法访问。tests/example.test.ts — 只 import ../index(entry point),并针对 public function assert。告诉用户这是可以 copy 或 delete 的 starter template。
Done when: example package 存在,通过 root entry point 暴露 behaviour,并把 impl 隐藏在 subfolder。
这是整个 skill 的 completion criterion;不能在 violation 时失败的 config 毫无价值。
lint:boundaries,clean example 必须 pass。tests/example.test.ts 加一个 deep import,例如 import { thing } from "../lib/impl"。再次运行 lint:boundaries,必须以 tests-through-entrypoints fail。Done when: 已观察到 pass、deep import 时 fail、恢复后再 pass。Step 2 不失败,就先修正 wiring,不能完成任务。
在 packages folder(<packages-root>/README.md)中写 README.md,内容覆盖:src/packages/<name>/ layout(root 中是 entry points、lib/ 放 implementation、tests/ 放 tests)、“只通过 package 的 entry points(root files)import”,以及如何运行 lint:boundaries。明确 discourage barrel files,用多个小 entry points,而不是从一个 index re-export 整个 subtree。内容只保留 copy-me snippet,以及四条 rules 各一段。
再从 repo 的 agent-instructions file 指向它:优先 CLAUDE.md,否则 AGENTS.md;两者都不存在则创建 AGENTS.md。一行即可,例如:Packages are deep modules — see [src/packages/README.md](./src/packages/README.md) before adding or importing one. 这让 agent 能发现 boundary rule,而不是撞上它。
Done when: <packages-root>/README.md 存在且 discourages barrels,repo 的 CLAUDE.md/AGENTS.md 链接到它。
$1 back-references(dependency-cruiser group matching)让 package 能访问自己的 internals,同时阻止 outsiders;不要把它们展开成每 package 一条 rule。lib/ 和 tests/,但 rule 不 hardcode;新增 folder 无需改 config,新增 entry point 只需新增 root file,不需要 barrel。.cjs(不是 .js),确保即使 repo 使用 "type": "module",config 的 module.exports 也能工作。© vinvcn, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 2 other files in skills/in-progress/setup-ts-deep-modules of vinvcn/mattpocock-skills-zh-CN.
Open the folder on GitHubat commit 3f92a83
Setup TS Deep Modules next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Setup TS Deep Modules this skillvinvcn/mattpocock-skills-zh-CN | 4.6k | — | ~1.4k | Automated safety check: Pass | MIT | |
| Link Workspace Packagesnomcopter/react-mosaic | 4.8k | 5 repos | ~760 | Automated safety check: Pass | Custom licence | |
| Pnpm Engineteambit/bit | 18k | — | ~1.9k | Automated safety check: Pass | Custom licence | |
| Create Docsvictorgarciaesgi/nuxt-typed-router | 413 | 2 repos | ~2.8k | Automated safety check: Pass | MIT | |
| Testing Changespnpm/pnpm | 37k | — | ~1.1k | Automated safety check: Pass | MIT | |
| Windows Releasemilind-soni/OpenMausBot | 4.1k | — | ~1.5k | Automated safety check: Pass | Apache-2.0 |
nomcopter/react-mosaic
Link workspace packages in monorepos (npm, yarn, pnpm, bun).
teambit/bit
Work on the pnpm Rust engine (@pnpm/napi, the pacquet crates) that bit install runs through.
victorgarciaesgi/nuxt-typed-router
Create complete documentation sites for projects. An agent skill from victorgarciaesgi/nuxt-typed-router.
pnpm/pnpm
Run the tests that cover a change in the pnpm repository, in the Rust workspace (pnpm/, pnpr/) or the TypeScript CLI (pnpm11/), and recognize the cases where a scoped run passes without testing…
milind-soni/OpenMausBot
Build and verify the Windows desktop build (NSIS installer + latest.yml) for the canonical OpenMausBot release and its legacy updater mirror.
evloghq/evlog
Walks through adding a new built-in evlog drain adapter for an observability platform: source, build config, exports, tests, docs and PR scope.
vinvcn/mattpocock-skills-zh-CN
设置 Claude Code hooks,在危险 git commands(push、reset --hard、clean、branch -D 等)执行前阻止它们。适用于用户想防止破坏性 git 操作、添加 git safety hooks,或在 Claude Code 中阻止 git push/reset 时。
vinvcn/mattpocock-skills-zh-CN
用于设计深模块的共享词汇。适用于用户想设计或改进模块接口、寻找深化机会、决定 seam 放在哪里、让代码更容易测试或更适合 AI 导航,或其他技能需要深模块词汇时。
vinvcn/mattpocock-skills-zh-CN
面向棘手缺陷和性能回退的诊断循环。适用于用户说 “diagnose” / “debug this”,或报告某些东西 broken、throwing、failing、slow 时。
vinvcn/mattpocock-skills-zh-CN
构建并打磨项目的领域模型。适用于讨论 codebase 术语、编写或编辑 CONTEXT.md,或记录或编辑 ADR. An agent skill from vinvcn/mattpocock-skills-zh-CN.
vinvcn/mattpocock-skills-zh-CN
将测试文件从 as 类型断言迁移到 @total-typescript/shoehorn。适用于用户提到 shoehorn、想替换测试中的 as,或需要局部测试数据时。
vinvcn/mattpocock-skills-zh-CN
用于撰写 PR 正文。适用于用户要求起草、改写或改进 PR 正文,或希望 PR 更便于审阅时. An agent skill from vinvcn/mattpocock-skills-zh-CN.
Works with
在 TypeScript repo 中接入 dependency-cruiser,让每个 package 成为 deep module:implementation 隐藏在 subfolders 中,只能通过 entry-point files 访问。User-invoked。. Setup TS Deep Modules is an agent skill from vinvcn/mattpocock-skills-zh-CN.
Run `npx skills add vinvcn/mattpocock-skills-zh-CN --skill setup-ts-deep-modules -a claude-code`. Or copy the skill folder (skills/in-progress/setup-ts-deep-modules in vinvcn/mattpocock-skills-zh-CN) into .claude/skills/setup-ts-deep-modules in your project. Claude Code loads it when a task matches its description.
Run `npx skills add vinvcn/mattpocock-skills-zh-CN --skill setup-ts-deep-modules -a codex`. Or copy the skill folder (skills/in-progress/setup-ts-deep-modules in vinvcn/mattpocock-skills-zh-CN) into .agents/skills/setup-ts-deep-modules in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add vinvcn/mattpocock-skills-zh-CN --skill setup-ts-deep-modules -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/setup-ts-deep-modules, .gemini/skills/setup-ts-deep-modules, .github/skills/setup-ts-deep-modules and .opencode/skills/setup-ts-deep-modules in your project.
Going by SKILL.md and its folder, Setup TS Deep Modules needs JavaScript for the scripts in its folder and the command-line tools its instructions call (npm).
SKILL.md names 1 domain. As links in the text: github.com. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Setup TS Deep Modules is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.4k tokens (SKILL.md is roughly 5.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Setup TS Deep Modules: Link Workspace Packages (nomcopter/react-mosaic, 4.8k stars), Pnpm Engine (teambit/bit, 18k stars), Create Docs (victorgarciaesgi/nuxt-typed-router, 413 stars) and Testing Changes (pnpm/pnpm, 37k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
vinvcn (a GitHub user) maintains it in vinvcn/mattpocock-skills-zh-CN, which has 4,635 GitHub stars. The repository holds 33 skills in this directory. The repository was last updated on September 28, 2026.
Source: vinvcn/mattpocock-skills-zh-CN on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.