prototype-tools-v2
v1.0.6
Published
CLI (prototool) to sync bundled Cursor/Claude rules and skills from assets into any repo — init --cursor or init --claude
Maintainers
Readme
prototype-tools
CLI to deep copy the bundled assets/ tree into a target repo as .cursor/ or .claude/. Publish to npm; run from any project root.
Install
npm install prototype-tools
# or
pnpm add -D prototype-toolsUsage
Run from the project root where you want .cursor/ or .claude/ created.
npx proto init --cursor
npx proto init --claude(proto is the package bin; npx prototool works if the package name resolves that way.)
Behavior
- Npm install / repo khác: CLI chạy từ
node_modules/prototype-tools/dist/cli.js.assets/được resolve từ root của package đã cài (có cảpackage.json+ thư mụcassets/— nằm trong tarball nhờpackage.json→"files": ["dist", "assets", ...]). Đích ghi luôn làprocess.cwd()— phảicdvào root project rồi chạy (npx proto init --cursor→ tạo./.cursortrong project đó). - Deep copy: Everything under
assets/is copied recursively into.cursor/or.claude/with the same relative paths. - Cursor:
assets/rules/...→.cursor/rules/...,assets/skills/...→.cursor/skills/...(and any other top-level folders underassets/). - Claude: Deep copy vào
.claude/rồi format tương thích Claude:- Rules: mọi file
.mdctrong.claude/rules/→ đổi thành.md, frontmatter Cursor (globs,alwaysApply) map sang Claude (paths;alwaysApply: true→paths: **/*). File.mdcgốc bị xóa sau khi ghi.md. - Skills: thư mục con trực tiếp của
skills/mà chỉ có đúng một file.mdvà chưa cóSKILL.mdthì được copy thànhSKILL.mdđể Claude discovery (vd.momos-be/momos-be.md→ thêmSKILL.md).
- Rules: mọi file
Output structure (example)
| Source (package) | After init --cursor |
|------------------|------------------------|
| assets/rules/momos-fe/tailwind.mdc | .cursor/rules/momos-fe/tailwind.mdc |
| assets/skills/momos-ui/SKILL.md | .cursor/skills/momos-ui/SKILL.md |
| assets/skills/momos-ui/references/... | .cursor/skills/momos-ui/references/... |
After init --claude, rules are .md only under .claude/rules/; skills tree giữ nguyên, thêm SKILL.md chỉ khi đủ điều kiện như trên.
Develop
npm run build
node dist/cli.js init --cursorLicense
ISC
