一键导入
fsrs-integration
Implement or extend spaced repetition with ts-fsrs
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Implement or extend spaced repetition with ts-fsrs
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Manage the project backlog — add, list, filter, update, prioritize, and suggest work items
Daily session wrapper — start with backlog, work, commit, retro
End-of-session retrospective — summarize work, update backlog statuses, update MEMORY.md
Commit, branch, PR, self-review, fix — then stop for human approval before merge
Pre-flight for parallel work — pick items, check file overlap, set statuses, generate terminal commands
Manage project backlog — add, list, filter, update, prioritize, suggest
| name | fsrs-integration |
| description | Implement or extend spaced repetition with ts-fsrs |
| user-invocable | true |
Implement or extend spaced repetition in DanskPrep.
Reference: Read
.claude/references/fsrs-rules.mdfirst — it covers ts-fsrs configuration, card lifecycle, due queue logic, and TypeScript pitfalls.
src/lib/fsrs.ts — scheduler init, dbToFsrsCard, fsrsCardToDb, scheduleReview, getSchedulingOptionssrc/hooks/useStudy.ts — due queue, reviewCard(), Supabase syncsrc/components/study/CardRating.tsx — 4-button rating UI with interval preview// Supabase user_cards → ts-fsrs Card
{ state, difficulty, stability, due, last_review, reps, lapses }
→ Card { state, difficulty, stability, due: new Date(due), last_review: new Date(last_review) | undefined, reps, lapses, elapsed_days: 0, scheduled_days: 0 }
// After review: Card → Supabase
card.due.toISOString(), card.last_review?.toISOString() ?? null
due <= now() ordered by due ASC, limit 50scheduleReview(dbToFsrsCard(row), rating)UPDATE user_cards SET ...fsrsCardToDb(updatedCard) + increment correct/incorrect/streakINSERT review_logs with rating, response, was_correct, time_taken_msrating === Again: re-append card to end of queue; otherwise remove itAlways show the next interval next to each button so users understand the consequence:
Again (5m) | Hard (1d) | Good (4d) | Easy (14d)
Use getSchedulingOptions(card) which returns { again, hard, good, easy } as human-readable strings.
Rating.Manual = 0 causes type errors. Use numeric literals 1|2|3|4 instead of Rating as key type. Cast f.repeat() result to any when indexing — see fsrs-rules.md.