用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/cwinvestments/memstack --skill shard命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | shard |
| description | Use when the user says 'shard this', 'split file', or when working with files over 1000 lines. |
| version | 1.0.0 |
Split monolithic files into focused, maintainable modules.
When this skill activates, output:
💎 Shard — Refactoring large file...
Then execute the protocol below.
| Context | Status |
|---|---|
| User says "shard", "split file", or "refactor" | ACTIVE — full protocol |
| Editing a file over 1000 lines | ACTIVE — suggest refactor |
| User says "refactor" for logic changes (not splitting) | DORMANT — not a shard task |
| Discussing code organization concepts | DORMANT — do not activate |
| File is under 500 lines | DORMANT — not worth splitting |
Identify the target file and count lines:
wc -l <file>
Analyze structure:
Propose the split — present to user BEFORE executing:
Execute the refactor:
Verify build:
npm run build 2>&1 | tail -20
Present result — new file structure with line counts
User: "shard infrastructure/page.tsx — it's 1100 lines"
💎 Shard — Refactoring large file...
infrastructure/page.tsx (1,110 lines) → 6 files:
page.tsx (~120 lines) — Main page, tab switcher
RailwayTab.tsx (~200 lines) — Railway monitoring
HetznerTab.tsx (~180 lines) — Hetzner monitoring
HeadroomTab.tsx (~250 lines) — Headroom + setup guide
types.ts (~80 lines) — Shared interfaces
constants.ts (~60 lines) — Status configs
Build check: ✓ passed
基于 SOC 职业分类