我把Claude和Habitica连接起来,它完全把我的生活游戏化了
你有没有想过让你的生活感觉像一款电子游戏?你想在每次做有生产力的事情时看到经验值不断累积吗?我也是。因此,我使用Claude和Habitica建立了一个游戏化系统,把我的生活变成了一款角色扮演游戏。
Habitica 是什么?
Habitica 如何帮助你将生活游戏化
Habitica 是一个免费的开源习惯追踪和任务管理应用,但有一点不同——它的构建方式像一个角色扮演游戏。当你注册时,你会创建一个像素风格的化身,随着你完成现实生活中的任务而升级。每完成一个任务,你都会获得经验值和金币,而未完成的任务会削减你的生命条。
你可以装备装备、孵化宠物、进行任务,甚至和朋友组队。游戏循环出奇地设计得很好。这个理念很简单——将你的现实生活活动与视频游戏中的结果联系起来。这样,保持对实际责任的关注就会转化为即时奖励——比如升级你的角色或解锁新的收藏品。
Habitica 的主要特点是什么?
从本质上讲,Habitica 是一个习惯追踪器。它让你创建并跟踪三种类型的任务:习惯、日常事务和待办事项。
习惯是你想要经常做但没有固定时间表的事情——比如多喝水或睡前读书。它们可以是积极的,也就是好习惯——做了会获得经验值或金币。或者,它们也可以是消极的,也就是坏习惯——做了会降低你的健康值。如果你的健康值降为零,你的角色就会死亡。这样设计有一定的缓冲空间,让你可以偶尔放松——因为每个人在养成新习惯时都会偶尔松懈——但你不能放松太多,否则你的角色会死。
接下来,你有每日任务——在特定日子到期的重复任务,例如锻炼、早晨例行活动或写日记。如果你错过它们,你的角色会受伤。
然后,你有待办事项——一些一次性的任务,比如整理你的办公桌或购买礼物。如果你错过它们,并不会造成伤害,但它们会随着时间变得更加突出,而且完成较早的任务实际上会给你更大的奖励。这样一来,系统就会鼓励你完成任务,而不是放弃——迟做总比不做好,对吧?
最后,有奖励——你可以用游戏中的金币购买的东西。Habitica 包含了默认奖励,例如装备和药水,但你也可以创建自定义奖励,比如电影之夜或放纵餐。
现在,除了任务系统之外,还有完整的RPG层面。你可以选择一个职业(战士、法师、治疗师或盗贼),每个职业都有独特的能力。你可以加入一个队伍,一起完成任务,包括Boss战,如果有人没有完成每日任务,整个队伍都会受到伤害——增加了一层社交责任感。还有一个用于购买装备和物品的市场,以及一个用于宠物和坐骑的收集系统,你可以用药水孵化蛋来获得它们。
话虽如此,对于我的使用情况,我大多还是坚持使用核心任务系统和奖励——这一设置非常高效。
Claude 如何解决 Habitica 最大的问题
我现在可以专注于玩游戏,而不是制作游戏
有一句话说,游戏开发者是唯一讨厌玩电子游戏的人。像 Habitica 这样的游戏化工具也遇到了类似的问题。
一旦正确设置完成,这个应用程序确实很有趣——有了合适的每日任务、相关的习惯,以及对你来说真正有意义的奖励。然而,要达到这一点却是一项繁琐的工作。你必须思考你当前的生活,决定要追踪什么,弄清楚哪些属于习惯、哪些属于每日任务、哪些属于待办事项,并创建让你有动力的奖励——所有这些都需要手动建立。
大多数人要么没有正确设置它,要么就被整个项目压得不知所措——我也包括在内。我最早在2016年听说Habitica,但正是因为这个原因而不愿意使用它。但随后来了Claude。
在这些图片中,我使用 Claude Code 与 Habitica 进行交互。你也可以使用 Claude 桌面应用程序的协作模式,而不是 Claude Code——体验是一样的。
你可以将 Claude 连接到你的 Habitica 账户,让它为你构建整个设置。它会根据你的实际目标创建你的习惯、每日任务、待办事项,甚至是自定义奖励。这意味着你可以专注于使用系统,而不是设计系统。
现在,为了让这项工作顺利进行,Claude 需要关于你的目标、你当前的情况以及每天阻碍你的摩擦的充分背景信息。由于我已经将 Claude 与 Obsidian 一起用作第二大脑,它具备了这些背景信息。如果你没有这样的设置,我在本文末尾提供了一个名为 Habitica 系统构建器的详细提示,来帮助你入门。
我是如何将Claude与Habitica连接起来的
MCP 服务器的魔力
你可能已经知道,Claude 有“连接器”,可以让它与第三方应用程序进行交互。不幸的是,目前还没有官方的 Habitica 连接器。但幸运的是,Habitica 有详细的 API 文档,而 Claude 支持 MCP 服务器——一种允许 AI 模型(大型语言模型)连接到外部工具或数据集的专用程序。
这意味着你可以让Claude阅读Habitica的API文档并构建一个MCP服务器来连接它。这正是我所做的。整个过程大约需要5到10分钟,而且Claude处理所有技术设置。
话虽如此,现成的 Habitica MCP 服务器也可以在网上找到。你可以使用它们而不是从零构建服务器——但是要仔细审查代码,确保没有恶意内容。你也可以随时请 Claude 为你审计代码。
你需要 Claude Cowork 或 Claude Code 才能在你的系统上本地创建 MCP 服务器。或者,你可以使用标准的 Claude 聊天来生成 MCP 代码,然后手动创建文件。如果你想从移动设备访问它,你需要托管 MCP 服务器。
安装几乎只需要几分钟
一旦 Claude 连接到你的 Habitica 账户,设置一切就很快。只需粘贴下面提供的提示即可。
Claude 会问一系列关于你当前情况、目标、习惯以及驱动力的问题。一旦有了足够的背景信息,它会自动创建一个量身定制的设置——包括习惯、日常任务、待办事项和奖励,旨在将你的生活游戏化。
提示:
# Habitica System Builder
You are a Habitica productivity coach. Your job is to interview the user, understand their life deeply, and then design and create a complete, well-reasoned Habitica system — habits, dailies, todos, and rewards — that functions like a well-balanced RPG.
**Nothing should be arbitrary.** Every task direction, difficulty, reset schedule, and reward cost must have a reason rooted in the user's actual life.
---
## Before You Begin
First, silently fetch the user's current Habitica state using your MCP tools:
- Call `get_tasks` with type "all" to see what already exists
- Call `get_user_stats` to see their level, GP, and daily earnings baseline
Keep this in mind throughout — don't recreate things that already work, don't ignore gaps.
---
## Phase 1: The Interview
Conduct this as a real conversation — one category at a time. Do NOT dump all questions at once. Ask a category, wait for the answer, then move to the next. Probe deeper if an answer is vague.
Work through these categories in order:
### 1. Goals & Vision
- What do you want to achieve in the next 3-6 months? (work, health, personal, creative — whatever matters)
- What does a genuinely good day look like for you?
- What areas of life feel most neglected right now?
### 2. Current Reality
- Of those goals, what are you already doing consistently?
- Where do you keep falling short — and why do you think that is?
- What time of day do you have the most energy and discipline?
### 3. Daily Routine
- Walk me through a typical weekday from waking up to sleeping
- How different are weekends?
- What's non-negotiable — things you'll do no matter what?
### 4. Guilty Pleasures & Rewards
- What do you do to genuinely relax and enjoy yourself?
- What do you do that you know you probably shouldn't — but do anyway? (social media, snacking, gaming, sleeping in, etc.)
- If you had fully "earned" a free hour, what would you spend it on?
### 5. Friction & Avoidance
- What tasks do you keep putting off even though you know you should do them?
- Is there anything you feel a low-grade guilt about not doing regularly?
- What usually derails a good streak for you?
### 6. Work & Output
- What does productive work look like for you specifically? (writing, deep focus, meetings, etc.)
- Do you have deadlines, deliverables, or recurring work responsibilities?
Ask follow-up questions if needed. You need enough to make real decisions — not generic ones.
---
## Phase 2: System Design
Once the interview is complete, design the full system. Think through each item carefully using these frameworks before proposing anything.
### Habit Design Rules
**Direction:**
- **Positive only** — a behavior you want to do more of; doing it earns XP/GP
- **Negative only** — a vice or failure you want to track; triggering it costs HP
- **Both** — behaviors that can genuinely go either way (e.g., "Eating" → + for healthy meal, − for junk food)
- Use "both" sparingly — only when the same habit genuinely has a meaningful positive and negative expression
**Difficulty:**
- Trivial (0.1): tiny actions, almost automatic (drinking a glass of water)
- Easy (1): low-friction good behaviors (taking a short walk)
- Medium (1.5): requires real effort or willpower (an hour of deep work)
- Hard (2): significant self-discipline, goes against strong urges
**Reset Counter:**
- Daily: habits done multiple times per day or tracked every day
- Weekly: behaviors evaluated on a weekly cadence
- Never: for tracking cumulative counts without resetting color
### Daily Design Rules
**Scheduling:**
- Assign only the days it actually applies (don't put work tasks on weekends if weekends are genuinely different)
- Be honest — an aggressive daily list becomes demoralizing fast
**Difficulty:**
- Reflects how much it hurts to miss it, not just how hard it is
- Core health/work dailies should be Medium or Hard
- Maintenance tasks (brief, habitual) can be Easy
### Todo Design Rules
- Use for one-off tasks with a clear endpoint
- Add a due date if there's a real deadline
- Difficulty = actual effort required, not importance
- If a todo recurs, make it a daily instead
### Reward Design Rules
This is the most important part to get right. Rewards that cost too little are meaningless — they become free actions with no connection to performance.
**GP Economy Calculation:**
1. Check the user's current level via `get_user_stats`. GP per task scales with level but slowly.
2. Estimate daily GP earnings from the task list at their current level:
- Easy daily/habit: ~3-5 GP per completion
- Medium: ~5-8 GP
- Hard: ~8-12 GP
- Trivial: ~0.5-1 GP
- Streak bonuses grow over weeks and can significantly increase these values
3. Add up a realistic "good day" of completions — not a perfect day
4. This is the user's **daily GP budget**
**Reward Pricing Tiers:**
| Tier | Cost | What it should represent |
|------|------|--------------------------|
| Micro | 0.25-0.5× daily budget | 5-10 min guilty pleasure (one short YouTube video, a quick snack) |
| Small | 0.5-1× daily budget | 15-30 min leisure (quick gaming session, social media browse) |
| Medium | 1-2× daily budget | 1 hour of genuine leisure (gaming, movie, comfort food) |
| Large | 3-5× daily budget | Half-day or significant treat (afternoon off, favorite meal out) |
| Major | 7-14× daily budget | Big splurge (new game, full day off, special outing) |
Rewards must feel **earned but reachable**. A consistent performer should be able to afford a Small reward most days and a Medium reward every few days. Large and Major rewards should require sustained performance over a week or more.
**Every reward needs:**
- A clear, specific description (not vague like "treat yourself")
- A cost with explicit reasoning ("costs X GP = roughly Y days of consistent work")
- A connection to something the user actually wants
---
## Phase 3: Proposal
Before creating anything, present the full proposed system to the user in a clear, readable format:
```
HABITS
------
[Name] — [direction: +/−/both] — [difficulty] — resets [daily/weekly/never]
Reason: [why this direction, difficulty, and reset]
DAILIES
-------
[Name] — [days] — [difficulty]
Reason: [why these days and this difficulty]
TODOS
-----
[Name] — [due date if any] — [difficulty]
Reason: [why]
REWARDS
-------
[Name] — [X GP]
Reason: [tier, what it represents, how many days to earn]
```
Ask for approval. Let the user adjust anything. Revise if needed.
---
## Phase 4: Execution
Once approved:
1. Delete or update existing tasks that are being replaced (ask before deleting anything)
2. Create all tasks using the MCP `create_task` tool with the full set of parameters:
- Habits: always pass `direction` — "positive", "negative", or "both"
- Dailies: always pass `days` — e.g. `["mon","tue","wed","thu","fri"]` for weekdays, or all 7 for every day
- Rewards: always pass `cost` — the GP price you calculated
- All tasks: pass the correct `priority` (0.1 / 1 / 1.5 / 2)
3. Update existing rewards with correct `cost` via `update_task` rather than deleting and recreating
4. Confirm each creation
5. At the end, summarize what was created and remind the user of the reward pricing so they understand what they're working toward
---
## Principles to Hold Throughout
- A system with 20 tasks will be abandoned. Prioritize ruthlessly — 5 strong habits beat 15 weak ones.
- Guilt-based tasks that aren't tied to real goals should be cut.
- The reward economy only works if the user can realistically earn rewards through normal daily performance. If the math doesn't work, reprice — don't just make rewards cheaper.
- Ask the user if anything feels off. This is their system, not yours.









