动森训练岛 - 运动习惯养成 Skill
Three-phase pipeline: Scan → Tidy → Build.
The output is a reference habit system, not a script the body must obey.
Fatigue, pain, sleep, work, and available time can override the route.
Truth sources
Keep the map small:
~/.fitness-island/MEMORY.md # durable facts for next time
fitness-plan.md # human-readable route truth
plan.json # page data projection
fitness-plan.md owns intent. plan.json owns rendering. MEMORY.md owns
only stable carryover facts.
Shared memory
Use exactly one memory file: ~/.fitness-island/MEMORY.md.
Before planning or building, read ~/.fitness-island/MEMORY.md if it exists.
If it does not exist, create the minimal file directly and continue.
Use it only for durable training context:
- default training place
- available equipment
- time window
- minimum promise
- reset route
- pain or old-injury constraints
- reward cue
- previous weekly review conclusions
- generated project paths
Do not store raw body photos, medical records, full chat logs, precise private
address, or other sensitive material.
After each completed route, page build, or weekly review, update
~/.fitness-island/MEMORY.md with only durable facts:
Use this shape when creating the file:
# Fitness Island Memory
## 稳定默认值
- 训练地点:
- 可用器械:
- 时间窗口:
- 最低承诺:
- 默认路线:
- 重启路线:
- 奖励提示:
## 身体边界
- 疼痛/旧伤:
- 需要避免:
## 周复盘结论
- 最稳动作:
- 最弱动作:
- 下周先减少:
- 下周再增加:
## 项目索引
| 日期 | 项目路径 | 输出 | 备注 |
|------|----------|------|------|
## Agent 交接
- 上次导出:
- 待确认:
Phase 1: Scan the real constraints
Read references/minimum-friction.md before planning when the task involves
making exercise sustainable, restarting after skipped days, reducing resistance,
or designing the minimum promise.
Core sequence:
- Extract hard constraints — body context, goal, real time window, place,
equipment, pain risk, old injuries
- Classify training surface — home / gym / treadmill / machines / walking
only / no equipment
- Find friction — what the user hates, forgets, delays, overthinks, or
cannot start in two minutes
- Check safety boundary — sharp pain, numbness, dizziness, chest pain,
faintness, old injury flare-up
- Write constraint summary — conclusion first, then assumptions and safe
defaults
Key principles:
- Smart skip: if the user already gave enough information, do not re-ask it.
- Ask at most two rounds, then default conservatively.
- Ask only questions that change the route.
- Never ask for daily feelings by default.
- All user-facing questions follow the 4-beat format:
Re-ground → Simplify → Recommend → Options.
Use the 4-beat format when a decision is needed:
Re-ground: 动森训练岛,Step 1: 归位
Simplify: 我需要先知道你在哪里练、每天能拿出多久、有没有伤痛。
Recommend: 建议先用最短 20 分钟路线,先建立出现习惯,再加量。
Options:
A) 家里练,20 分钟
B) 健身房,30 分钟
C) 只有散步,10-15 分钟
D) 我补充器械照片/身体限制
Mandatory questions only when missing:
- body risk: pain, old injury, numbness, dizziness, chest pain
- time window: realistic daily duration
- place/equipment: where training happens and what is available
- goal conflict: for example zero training base plus extreme-speed fat loss
If the user asks for personalized loading while pain, old injury, numbness,
dizziness, chest pain, or faintness is unknown, ask the safety question first.
For low-intensity habit pages, default to "no red-flag symptoms reported" and
write the stop rules.
Phase 2: Tidy into a route
Treat planning like tidying. Delete before adding.
Use references/minimum-friction.md to choose the minimum route, default route,
reset route, if-then plan, and weekly review rule.
Core sequence:
- Cut high-friction actions first — technical lifts, complex setup,
crowded machines, routes longer than the real window
- Pick the first action — the action that can start in two minutes
- Set minimum promise — the smallest action that keeps the chain alive
- Set default route — the normal order when energy is fine
- Set reset route — what to do after a missed day, bad sleep, pain warning,
or schedule collapse
- Write weekly review rule — reduce the weakest part before adding volume
- Write
fitness-plan.md — route truth before any page data
Key principles:
- Keep actions that are obvious, available, low risk, and repeatable.
- Prefer walking, low-tech machines, low weight, and short routes for beginners.
- Do not reward intensity before consistency.
- The route only needs three stable pieces: minimum promise, default route,
reset route.
fitness-plan.md must include: constraints, what was cut, minimum promise,
default route, reset route, weekly review rule, and safety stop rules.
- Before building the page, show the route summary and wait for confirmation
when the user has not clearly authorized generation.
Phase 3: Build the island page
Default Build mode is data-only after seeding.
- Run
scripts/init_project.sh "$PROJECT_DIR" before writing route data.
- Ensure
~/.fitness-island/MEMORY.md exists
- Write or update
fitness-plan.md
- Fill
plan.json from fitness-plan.md. Use references/plan-json.md: 30
days is the default route, not a prison.
- Do not hand-write
index.html. Do not replace the canonical shell with a
simplified framework.
- Keep locked assets byte-for-byte copied from
assets/
- Keep the page behavior complete:
动森训练岛 hero, favicon, 7-day route, daily task cards, one settlement button,
reward stamp modal, weekly review table, copyable agent training data, and
bottom navigation
- Generate local rounded Chinese font subsets only when production packaging
needs self-hosted rounded fonts; never load cloud fonts at runtime
- Run
scripts/verify_assets.py "$PROJECT_DIR" and verify in browser before
delivery
Copied reference targets:
index.html # seeded from assets/index.html
styles.css # seeded from assets/styles.css
app.js # seeded from assets/app.js
design.md # seeded from assets/design.md
assets/favicon.svg
assets/animal-island/
Locked asset contract:
- These files are not route data:
index.html, styles.css, app.js,
design.md, assets/favicon.svg, assets/animal-island/*.
- In normal page generation they must stay byte-for-byte identical to the
matching file under this skill's
assets/.
- The user-specific plan lives only in
fitness-plan.md and plan.json.
- If
scripts/verify_assets.py "$PROJECT_DIR" fails, re-run
scripts/init_project.sh "$PROJECT_DIR" and rewrite data files. Do not patch
the generated HTML shell.
- UI component changes are a separate mode: first update this skill's
assets/design.md, then assets/index.html, assets/styles.css, and
assets/app.js; update CLAUDE.md/README.md; then reseed projects from
assets/.
Generated for the user route:
fitness-plan.md # human-readable truth source
plan.json # seeded from assets/plan.example.json, then rewritten as page data
Optional production asset:
assets/fonts/ # generated WOFF2 subsets, only when self-hosted fonts are required
fitness-plan.md owns training intent. plan.json owns training data for the
page. design.md owns UI decisions. HTML is locked shell, CSS is visual state,
JS is projection.
UI system
Use only these component meanings:
Hero — title, day meta, game prompt, animal art, progress meter
RouteCard / RouteNode — 7-day route; node text is number only
TaskCard — checkbox, action name, parameter pill, note
CompleteStrip — one yellow settlement entry
CompleteRewardModal — reward stamp, 盖章啦, collect button
ReviewTable — visible weekly review table, not Markdown <pre>
ArchiveCollapse — 30-day map entry
FloatingNav — previous, settle/complete, next
Settlement labels:
0/total: 完成今天
1..total-1/total: 今天到这
total/total: 完成今天
- after settlement:
今天已完成
Fonts
Default source: Resource Han Rounded CN 0.990.
Do not ship full TTF/OTF/WOFF2 font families inside the skill. Generated
projects must run with system fallback fonts. Ship WOFF2 subsets only when
self-hosted rounded Chinese fonts are required and the files exist:
assets/fonts/fitness-rounded-cn-medium.woff2
assets/fonts/fitness-rounded-cn-heavy.woff2
assets/fonts/OFL-License.txt
Commands:
bash scripts/init_project.sh "$PROJECT_DIR"
python3 scripts/collect_text.py --root "$PROJECT_DIR" --out /tmp/fitness-text.txt
python3 scripts/validate_plan.py "$PROJECT_DIR/plan.json"
python3 scripts/verify_assets.py "$PROJECT_DIR"
python3 scripts/build_font_subset.py --text /tmp/fitness-text.txt --medium "$MEDIUM_TTF" --heavy "$HEAVY_TTF" --out "$PROJECT_DIR/assets/fonts"
python3 scripts/check_glyphs.py --text /tmp/fitness-text.txt --font "$PROJECT_DIR/assets/fonts/fitness-rounded-cn-medium.woff2"
node --check "$PROJECT_DIR/app.js"
Deploy (optional)
Static output can be deployed by Git push to Vercel, or served locally:
python3 -m http.server 4173
Dependencies
| Tool |
Purpose |
Install |
| Python 3 |
init, text collection, font scripts |
system Python or brew install python |
| fontTools + brotli |
WOFF2 subset generation and glyph checks |
python3 -m pip install fonttools brotli |
| Resource Han Rounded CN |
rounded Chinese source font |
download/cache locally |
| Browser |
mobile visual QA |
Chrome / Codex browser |
Resources
references/minimum-friction.md — sustainability, minimum resistance, habit
cue, reset route, and weekly review reference
references/plan-json.md — flexible plan.json hard contract and soft
recommendations
assets/index.html — canonical Fitness Island page shell
assets/styles.css — canonical Animal Island visual layer
assets/app.js — canonical static app behavior
assets/design.md — UI contract reference
assets/favicon.svg — rounded favicon for generated pages
assets/plan.example.json — runnable route example and seed
assets/animal-island/ — required native visual assets referenced by CSS
scripts/init_project.sh — seed project files from assets
scripts/validate_plan.py — lightweight plan.json validator
scripts/verify_assets.py — byte-for-byte lock for canonical page assets
scripts/collect_text.py — collect project text for font subsetting
scripts/build_font_subset.py — build WOFF2 subsets
scripts/check_glyphs.py — block delivery on missing glyphs
Verification
- no missing Chinese glyphs
plan.json passes scripts/validate_plan.py
index.html, styles.css, app.js, design.md, favicon, and
animal-island assets pass scripts/verify_assets.py
- no clipped or overlapping text
- mobile first screen shows the main action
- fixed footer sea does not cover the nav
- partial completion records
今天到这 without filling unfinished actions
- full completion opens the
盖章啦 reward modal
- weekly review table is visible on review days
- exported agent training data can drive the next route adjustment
Safety boundary
This skill provides practical habit and training references, not medical
diagnosis. Sharp joint pain, numbness, tingling, dizziness, chest pain,
faintness, pain that changes movement quality, or old injury flare-up stops
progression. Reduce load first; seek professional care when symptoms are not
ordinary effort.
1---2name: fitness-island3description: End-to-end fitness habit planning: gather body context, goals, real time window, equipment photos or notes, cut high-friction actions, build a low-pressure route, write fitness-plan.md, then generate an Animal Island style mobile-first static check-in page with 7-day route, daily tasks, settlement button, reward stamp, copyable agent training data, and shared ~/.fitness-island/MEMORY.md. Use when the user asks for a beginner fitness plan, habit reset, training map, deployable fitness page, Fitness Island UI, rounded Chinese font subset, weekly review table, or says "动森训练岛", "运动习惯", "健身打卡页", "训练路线", "生成训练岛".4---56<!--7[INPUT]: 依赖用户身体情况、训练目标、时间窗口、器械照片或文字描述、~/.fitness-island/MEMORY.md 共享记忆、assets/ canonical 页面资产和 scripts/ 工具8[OUTPUT]: 对外提供 fitness-plan.md、plan.json、锁定 assets 同构的动森风格静态打卡页、可复制 agent 训练数据、共享记忆更新和交付验证流程9[POS]: fitness-island 独立技能入口,按 Scan -> Tidy -> Build 流程把现实约束变成可部署的运动习惯项目10[PROTOCOL]: 变更时更新此头部,然后检查 CLAUDE.md11-->1213# 动森训练岛 - 运动习惯养成 Skill1415Three-phase pipeline: **Scan → Tidy → Build**.1617The output is a **reference habit system**, not a script the body must obey.18Fatigue, pain, sleep, work, and available time can override the route.1920## Truth sources2122Keep the map small:2324```text25~/.fitness-island/MEMORY.md # durable facts for next time26fitness-plan.md # human-readable route truth27plan.json # page data projection28```2930`fitness-plan.md` owns intent. `plan.json` owns rendering. `MEMORY.md` owns31only stable carryover facts.3233## Shared memory3435Use exactly one memory file: `~/.fitness-island/MEMORY.md`.3637Before planning or building, read `~/.fitness-island/MEMORY.md` if it exists.38If it does not exist, create the minimal file directly and continue.3940Use it only for durable training context:4142- default training place43- available equipment44- time window45- minimum promise46- reset route47- pain or old-injury constraints48- reward cue49- previous weekly review conclusions50- generated project paths5152Do not store raw body photos, medical records, full chat logs, precise private53address, or other sensitive material.5455After each completed route, page build, or weekly review, update56`~/.fitness-island/MEMORY.md` with only durable facts:5758Use this shape when creating the file:5960```md61# Fitness Island Memory6263## 稳定默认值64- 训练地点:65- 可用器械:66- 时间窗口:67- 最低承诺:68- 默认路线:69- 重启路线:70- 奖励提示:7172## 身体边界73- 疼痛/旧伤:74- 需要避免:7576## 周复盘结论77- 最稳动作:78- 最弱动作:79- 下周先减少:80- 下周再增加:8182## 项目索引83| 日期 | 项目路径 | 输出 | 备注 |84|------|----------|------|------|8586## Agent 交接87- 上次导出:88- 待确认:89```9091## Phase 1: Scan the real constraints9293Read `references/minimum-friction.md` before planning when the task involves94making exercise sustainable, restarting after skipped days, reducing resistance,95or designing the minimum promise.9697Core sequence:98991. **Extract hard constraints** — body context, goal, real time window, place,100 equipment, pain risk, old injuries1012. **Classify training surface** — home / gym / treadmill / machines / walking102 only / no equipment1033. **Find friction** — what the user hates, forgets, delays, overthinks, or104 cannot start in two minutes1054. **Check safety boundary** — sharp pain, numbness, dizziness, chest pain,106 faintness, old injury flare-up1075. **Write constraint summary** — conclusion first, then assumptions and safe108 defaults109110Key principles:111112- Smart skip: if the user already gave enough information, do not re-ask it.113- Ask at most two rounds, then default conservatively.114- Ask only questions that change the route.115- Never ask for daily feelings by default.116- All user-facing questions follow the **4-beat format**:117 Re-ground → Simplify → Recommend → Options.118119Use the 4-beat format when a decision is needed:120121```text122Re-ground: 动森训练岛,Step 1: 归位123Simplify: 我需要先知道你在哪里练、每天能拿出多久、有没有伤痛。124Recommend: 建议先用最短 20 分钟路线,先建立出现习惯,再加量。125Options:126A) 家里练,20 分钟127B) 健身房,30 分钟128C) 只有散步,10-15 分钟129D) 我补充器械照片/身体限制130```131132Mandatory questions only when missing:133134- body risk: pain, old injury, numbness, dizziness, chest pain135- time window: realistic daily duration136- place/equipment: where training happens and what is available137- goal conflict: for example zero training base plus extreme-speed fat loss138139If the user asks for personalized loading while pain, old injury, numbness,140dizziness, chest pain, or faintness is unknown, ask the safety question first.141For low-intensity habit pages, default to "no red-flag symptoms reported" and142write the stop rules.143144## Phase 2: Tidy into a route145146Treat planning like tidying. Delete before adding.147Use `references/minimum-friction.md` to choose the minimum route, default route,148reset route, if-then plan, and weekly review rule.149150Core sequence:1511521. **Cut high-friction actions first** — technical lifts, complex setup,153 crowded machines, routes longer than the real window1542. **Pick the first action** — the action that can start in two minutes1553. **Set minimum promise** — the smallest action that keeps the chain alive1564. **Set default route** — the normal order when energy is fine1575. **Set reset route** — what to do after a missed day, bad sleep, pain warning,158 or schedule collapse1596. **Write weekly review rule** — reduce the weakest part before adding volume1607. **Write `fitness-plan.md`** — route truth before any page data161162Key principles:163164- Keep actions that are obvious, available, low risk, and repeatable.165- Prefer walking, low-tech machines, low weight, and short routes for beginners.166- Do not reward intensity before consistency.167- The route only needs three stable pieces: minimum promise, default route,168 reset route.169- `fitness-plan.md` must include: constraints, what was cut, minimum promise,170 default route, reset route, weekly review rule, and safety stop rules.171- Before building the page, show the route summary and wait for confirmation172 when the user has not clearly authorized generation.173174## Phase 3: Build the island page175176Default Build mode is **data-only after seeding**.1771781. Run `scripts/init_project.sh "$PROJECT_DIR"` before writing route data.1792. Ensure `~/.fitness-island/MEMORY.md` exists1803. Write or update `fitness-plan.md`1814. Fill `plan.json` from `fitness-plan.md`. Use `references/plan-json.md`: 30182 days is the default route, not a prison.1835. Do not hand-write `index.html`. Do not replace the canonical shell with a184 simplified framework.1856. Keep locked assets byte-for-byte copied from `assets/`1867. Keep the page behavior complete:187 动森训练岛 hero, favicon, 7-day route, daily task cards, one settlement button,188 reward stamp modal, weekly review table, copyable agent training data, and189 bottom navigation1908. Generate local rounded Chinese font subsets only when production packaging191 needs self-hosted rounded fonts; never load cloud fonts at runtime1929. Run `scripts/verify_assets.py "$PROJECT_DIR"` and verify in browser before193 delivery194195Copied reference targets:196197```text198index.html # seeded from assets/index.html199styles.css # seeded from assets/styles.css200app.js # seeded from assets/app.js201design.md # seeded from assets/design.md202assets/favicon.svg203assets/animal-island/204```205206Locked asset contract:207208- These files are not route data: `index.html`, `styles.css`, `app.js`,209 `design.md`, `assets/favicon.svg`, `assets/animal-island/*`.210- In normal page generation they must stay byte-for-byte identical to the211 matching file under this skill's `assets/`.212- The user-specific plan lives only in `fitness-plan.md` and `plan.json`.213- If `scripts/verify_assets.py "$PROJECT_DIR"` fails, re-run214 `scripts/init_project.sh "$PROJECT_DIR"` and rewrite data files. Do not patch215 the generated HTML shell.216- UI component changes are a separate mode: first update this skill's217 `assets/design.md`, then `assets/index.html`, `assets/styles.css`, and218 `assets/app.js`; update CLAUDE.md/README.md; then reseed projects from219 `assets/`.220221Generated for the user route:222223```text224fitness-plan.md # human-readable truth source225plan.json # seeded from assets/plan.example.json, then rewritten as page data226```227228Optional production asset:229230```text231assets/fonts/ # generated WOFF2 subsets, only when self-hosted fonts are required232```233234`fitness-plan.md` owns training intent. `plan.json` owns training data for the235page. `design.md` owns UI decisions. HTML is locked shell, CSS is visual state,236JS is projection.237238### UI system239240Use only these component meanings:241242- `Hero` — title, day meta, game prompt, animal art, progress meter243- `RouteCard` / `RouteNode` — 7-day route; node text is number only244- `TaskCard` — checkbox, action name, parameter pill, note245- `CompleteStrip` — one yellow settlement entry246- `CompleteRewardModal` — reward stamp, `盖章啦`, collect button247- `ReviewTable` — visible weekly review table, not Markdown `<pre>`248- `ArchiveCollapse` — 30-day map entry249- `FloatingNav` — previous, settle/complete, next250251Settlement labels:252253- `0/total`: `完成今天`254- `1..total-1/total`: `今天到这`255- `total/total`: `完成今天`256- after settlement: `今天已完成`257258## Fonts259260Default source: Resource Han Rounded CN `0.990`.261262Do not ship full TTF/OTF/WOFF2 font families inside the skill. Generated263projects must run with system fallback fonts. Ship WOFF2 subsets only when264self-hosted rounded Chinese fonts are required and the files exist:265266```text267assets/fonts/fitness-rounded-cn-medium.woff2268assets/fonts/fitness-rounded-cn-heavy.woff2269assets/fonts/OFL-License.txt270```271272Commands:273274```bash275bash scripts/init_project.sh "$PROJECT_DIR"276python3 scripts/collect_text.py --root "$PROJECT_DIR" --out /tmp/fitness-text.txt277python3 scripts/validate_plan.py "$PROJECT_DIR/plan.json"278python3 scripts/verify_assets.py "$PROJECT_DIR"279python3 scripts/build_font_subset.py --text /tmp/fitness-text.txt --medium "$MEDIUM_TTF" --heavy "$HEAVY_TTF" --out "$PROJECT_DIR/assets/fonts"280python3 scripts/check_glyphs.py --text /tmp/fitness-text.txt --font "$PROJECT_DIR/assets/fonts/fitness-rounded-cn-medium.woff2"281node --check "$PROJECT_DIR/app.js"282```283284## Deploy (optional)285286Static output can be deployed by Git push to Vercel, or served locally:287288```bash289python3 -m http.server 4173290```291292## Dependencies293294| Tool | Purpose | Install |295|------|---------|---------|296| Python 3 | init, text collection, font scripts | system Python or `brew install python` |297| fontTools + brotli | WOFF2 subset generation and glyph checks | `python3 -m pip install fonttools brotli` |298| Resource Han Rounded CN | rounded Chinese source font | download/cache locally |299| Browser | mobile visual QA | Chrome / Codex browser |300301## Resources302303- `references/minimum-friction.md` — sustainability, minimum resistance, habit304 cue, reset route, and weekly review reference305- `references/plan-json.md` — flexible `plan.json` hard contract and soft306 recommendations307- `assets/index.html` — canonical Fitness Island page shell308- `assets/styles.css` — canonical Animal Island visual layer309- `assets/app.js` — canonical static app behavior310- `assets/design.md` — UI contract reference311- `assets/favicon.svg` — rounded favicon for generated pages312- `assets/plan.example.json` — runnable route example and seed313- `assets/animal-island/` — required native visual assets referenced by CSS314- `scripts/init_project.sh` — seed project files from assets315- `scripts/validate_plan.py` — lightweight `plan.json` validator316- `scripts/verify_assets.py` — byte-for-byte lock for canonical page assets317- `scripts/collect_text.py` — collect project text for font subsetting318- `scripts/build_font_subset.py` — build WOFF2 subsets319- `scripts/check_glyphs.py` — block delivery on missing glyphs320321## Verification322323- no missing Chinese glyphs324- `plan.json` passes `scripts/validate_plan.py`325- `index.html`, `styles.css`, `app.js`, `design.md`, favicon, and326 animal-island assets pass `scripts/verify_assets.py`327- no clipped or overlapping text328- mobile first screen shows the main action329- fixed footer sea does not cover the nav330- partial completion records `今天到这` without filling unfinished actions331- full completion opens the `盖章啦` reward modal332- weekly review table is visible on review days333- exported agent training data can drive the next route adjustment334335## Safety boundary336337This skill provides practical habit and training references, not medical338diagnosis. Sharp joint pain, numbness, tingling, dizziness, chest pain,339faintness, pain that changes movement quality, or old injury flare-up stops340progression. Reduce load first; seek professional care when symptoms are not341ordinary effort.