Rank Habitica todos using a pairwise prioritization matrix
Project description
⚔️ habitica-prioritize
A Claude Code skill that ranks your Habitica todos using a pairwise prioritization matrix — the same method described in this video.
Instead of staring at a long list trying to figure out what matters most, you compare tasks two at a time. The item that wins the most head-to-head battles rises to the top. It's like a tournament bracket for your todo list. 🏆
⚙️ How it works
- 🔍 Fetches your incomplete Habitica todos (optionally filtered by tag)
- ⚔️ Walks you through every pair: "Which is higher priority?"
- 📊 Tallies wins and produces a definitive ranked list
- 💾 Saves results so future runs can insert new tasks without re-doing all comparisons — or re-prioritize everything from scratch
📦 Installation
bunx skills add mikedfunk/habitica-prioritize -g
Or with npx:
npx skills add mikedfunk/habitica-prioritize -g
🔑 Requirements
You'll need a Habitica account. Set these environment variables (e.g. in ~/.zshrc):
export HABITICA_USER_ID=your-user-id
export HABITICA_API_TOKEN=your-api-token
Find these in Habitica under Settings → API.
🚀 Usage
Full ranking (first time, or periodic re-rank)
uv run habitica-prioritize
You'll be prompted to choose which tags to filter by:
🏷️ Available tags:
• Personal
• Urgent
• Work
...
Filter by tags (comma-separated, or press Enter for no filter): Work
You can also pass tags directly as CLI arguments to skip the prompt:
# Single tag
uv run habitica-prioritize --tags Work
# Multiple tags (todos must match ALL specified tags)
uv run habitica-prioritize --tags Work Urgent
# No filter — rank all incomplete todos
uv run habitica-prioritize --tags
Optionally limit to top N items manually:
uv run habitica-prioritize --tags Work --limit 10
Or let the script handle it — if you have enough tasks that a full ranking would exceed 100 comparisons (more than 14 items), you'll be warned and offered an automatic trim:
🚨 Yikes! 35 items = 595 comparisons — that's a marathon, not a sprint! 😅
💡 Limiting to the top 14 items would give you a breezy 91 comparisons instead.
✂️ Trim to top 14 items? (Y/N):
🆕 When new tasks are found (K/R prompt)
When a saved ranking exists and new todos are detected, the script asks:
🆕 2 new challenger(s) detected! 5 veterans already ranked.
Keep existing priorities (K) or re-prioritize everything from scratch (R)? (K/R):
- K (keep) — compares each new item against every existing item only. Existing-vs-existing comparisons are skipped, preserving the order you already established.
- R (re-rank) — discards the saved ranking and runs a full pairwise comparison of all items from scratch.
For example, if existing tasks A and B are ranked and new tasks C and D appear, choosing K runs: C vs A, C vs B, D vs A, D vs B — but never C vs D or A vs B again.
⚡ Incremental re-rank without prompting
To automatically choose K (keep existing priorities) without being asked:
uv run habitica-prioritize --incremental
🎮 Applying the ranking to Habitica
After every ranking run, you'll be prompted:
🚀 Apply this order to Habitica? (Y/N):
Answering Y remotely reorders your To Do tasks under the Active tab in Habitica to match your ranking. To skip the prompt and always apply automatically:
uv run habitica-prioritize --tags Work --reorder
🖥️ Example output
📋 Found 10 todos (Work):
A: Fix production bug in auth service
B: Write Q2 roadmap doc
...
⚔️ 45 head-to-head battles! Pick the higher-priority task.
🥊 Battle [1/45]
⚔️ [████░░░░░░░░░░░░░░░░] 20% — 9 done, 36 to go 💪
A: Fix production bug in auth service
B: Write Q2 roadmap doc
👑 Winner? (A/B): A
...
──────────────────────────────────────────────────
🏆 YOUR PRIORITY RANKING
──────────────────────────────────────────────────
🥇 # 1 (9 wins) Fix production bug in auth service
🥈 # 2 (8 wins) Unblock design team on API spec
🥉 # 3 (7 wins) Write Q2 roadmap doc
# 4 (6 wins) ...
💾 Results saved to ~/.habitica-priority-rank.json
💡 Tip: applying will reorder your To Do tasks under the Active tab in Habitica remotely.
🚀 Apply this order to Habitica? (Y/N): Y
✅ Done! Your tasks are ranked and ready to conquer. 🎮
🧪 Running tests
uv run --extra dev pytest scripts/tests/ -v
📄 License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file habitica_prioritize-0.1.5.tar.gz.
File metadata
- Download URL: habitica_prioritize-0.1.5.tar.gz
- Upload date:
- Size: 57.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6eba530f0691698d651123e29448004acdd68a0e4d11ffae6766a5ce0003012e
|
|
| MD5 |
7a30f2c77c644c9f7efb582d10bdf4de
|
|
| BLAKE2b-256 |
b137e91e5ff4e2df6b386827e49c569a0f0c145e43440270ca328eaa21fcce47
|
File details
Details for the file habitica_prioritize-0.1.5-py3-none-any.whl.
File metadata
- Download URL: habitica_prioritize-0.1.5-py3-none-any.whl
- Upload date:
- Size: 15.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2af4831831027d962c12bad63ac4fba44580e2db98b0269e5494078564dc8427
|
|
| MD5 |
ac623ebbae98f96ab8a906da33af0066
|
|
| BLAKE2b-256 |
9e240dca96d6d5901ad2f0c70bfcde719c24bbc4507ca4266e35420fbcd0f73e
|