marrow-magic
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseMarrow Magic
Marrow Magic
You are running a soul sweep. No target was specified — you find the worst offenders yourself, prioritize them, and fix them.
你正在执行灵魂扫描。未指定目标——你需要自行找出违规最严重的文件,按优先级排序后进行修复。
Step 1 — Load the Soul
步骤1 — 加载设计灵魂
Find and read in the project root.
.marrow.mdIf not found:
✗ No .marrow.md found.
Run /marrow with reference images first to extract the design soul.Stop here.
找到并读取项目根目录下的文件。
.marrow.md如果未找到该文件:
✗ No .marrow.md found.
Run /marrow with reference images first to extract the design soul.流程终止。
Step 2 — Discover Frontend Files
步骤2 — 识别前端文件
Scan the project for frontend files. Priority order:
- — component files (
src/components/,.tsx,.jsx).vue - or
src/app/— page-level filessrc/pages/ - or any global CSS/Tailwind files
src/styles/ - Any file the user has open or recently modified (if determinable from context)
Exclude: test files, Storybook files, node_modules, generated files, files.
.d.tsIf no frontend files are found, say:
✗ No frontend files found in standard locations.
Point me at a specific file with /marrow-align [filename].扫描项目中的前端文件,优先级顺序如下:
- — 组件文件(
src/components/、.tsx、.jsx).vue - 或
src/app/— 页面级文件src/pages/ - 或任何全局CSS/Tailwind文件
src/styles/ - 用户已打开或最近修改的所有文件(如果可从上下文判断)
排除项:测试文件、Storybook文件、node_modules、生成的文件、文件。
.d.ts如果未找到任何前端文件,输出:
✗ No frontend files found in standard locations.
Point me at a specific file with /marrow-align [filename].Step 3 — Triage by Soul Violation Severity
步骤3 — 按灵魂违规严重程度分级
Quickly scan found files and score each one by soul violations. Prioritize:
- Files with CRITICAL violations (wrong brand accent, wrong typeface, anti-pattern violations)
- Files with many MAJOR violations
- Shared/global files (a broken global CSS breaks everything downstream)
Select the top 3 most violated files to fix in this pass. Do not attempt to fix everything — depth over breadth.
Tell the user what you found before fixing:
undefined快速扫描找到的文件,按灵魂违规程度为每个文件打分。优先级如下:
- 存在严重违规的文件(错误的品牌强调色、错误的字体、违反反模式规范)
- 存在大量主要违规的文件
- 共享/全局文件(损坏的全局CSS会影响所有下游内容)
选择违规最严重的前3个文件在本次流程中修复,不要尝试修复所有文件——深度优先于广度。
修复前先告知用户扫描结果:
undefinedMarrow Magic — Soul Sweep
Marrow Magic — Soul Sweep
Found [N] frontend files. Biggest soul violations:
- [filename] — [N] violations ([severity summary])
- [filename] — [N] violations ([severity summary])
- [filename] — [N] violations ([severity summary])
Fixing all three now...
---Found [N] frontend files. Biggest soul violations:
- [filename] — [N] violations ([severity summary])
- [filename] — [N] violations ([severity summary])
- [filename] — [N] violations ([severity summary])
Fixing all three now...
---Step 4 — Fix Each File
步骤4 — 修复每个文件
For each of the top 3 files, apply the same surgical alignment logic as :
marrow-align- Fix all violations
- Preserve all logic and functionality
- Show the fixed file
- Show a compact diff summary
Format per file:
undefined对排名前3的每个文件,应用与相同的精准对齐逻辑:
marrow-align- 修复所有违规项
- 保留所有逻辑和功能
- 展示修复后的文件
- 展示精简的diff摘要
每个文件的输出格式:
undefined[filename] — [N] fixes
[filename] — [N] fixes
[aligned code]
Changes: [bullet list of what changed]
---[aligned code]
Changes: [bullet list of what changed]
---Step 5 — Session Summary
步骤5 — 会话总结
After all fixes:
undefined所有修复完成后输出:
undefinedSweep complete
Sweep complete
Fixed [total N] soul violations across [N] files.
Remaining: [N] files with violations not yet fixed.
Run /marrow-magic again to continue the sweep, or target a specific file with /marrow-align [filename].
Untouched files with known violations:
- [filename] — [N] violations
- [filename] — [N] violations
---Fixed [total N] soul violations across [N] files.
Remaining: [N] files with violations not yet fixed.
Run /marrow-magic again to continue the sweep, or target a specific file with /marrow-align [filename].
Untouched files with known violations:
- [filename] — [N] violations
- [filename] — [N] violations
---Rules for This Skill
本功能的使用规则
- Never fix more than 3 files per invocation — keeps output focused and reviewable
- Always show what you're going to fix BEFORE fixing it
- Never touch files outside src/ or the project's source directory
- Never modify config files, package.json, or non-UI files
- If a file has zero violations, skip it silently — don't report "checked and passed" for every file
- Preserve every component's public API, logic, and functionality
- 每次调用最多修复3个文件——保证输出内容集中且便于审核
- 修复前务必先告知用户将要修复的内容
- 永远不要修改src/或项目源目录之外的文件
- 永远不要修改配置文件、package.json或非UI相关文件
- 如果某个文件没有违规项,直接静默跳过——不要为每个文件输出“检查通过”的提示
- 保留每个组件的公开API、逻辑和功能