Skip to main content

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

  1. ๐Ÿ” Fetches your incomplete Habitica todos (optionally filtered by tag)
  2. โš”๏ธ Walks you through every pair: "Which is higher priority?"
  3. ๐Ÿ“Š Tallies wins and produces a definitive ranked list
  4. ๐Ÿ’พ 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.

๐Ÿ“Š Check ranking status without running battles

To see how many battles are answered and how many remain, without being prompted for any comparisons:

uv run habitica-prioritize --tags Work --status

Example output (fully ranked):

๐Ÿ“Š Status for: Work
   Todos fetched:        14
   Battles answered:     43  (already saved)
   Battles remaining:    48
   Total battles:        91
   New todos:             0

Example output (new todos found):

๐Ÿ“Š Status for: Work
   Todos fetched:        16
   Battles answered:     91  (already saved)
   New todos:             2  (not yet compared)
   New battles needed:   32  (2 new ร— 16 existing)

โšก 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 ๐Ÿ’ช
  1: Fix production bug in auth service
  2: Write Q2 roadmap doc
  ๐Ÿ‘‘ Winner? (1/2): 1

...

โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
๐Ÿ†  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

habitica_prioritize-0.1.13.tar.gz (64.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

habitica_prioritize-0.1.13-py3-none-any.whl (18.2 kB view details)

Uploaded Python 3

File details

Details for the file habitica_prioritize-0.1.13.tar.gz.

File metadata

  • Download URL: habitica_prioritize-0.1.13.tar.gz
  • Upload date:
  • Size: 64.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","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

Hashes for habitica_prioritize-0.1.13.tar.gz
Algorithm Hash digest
SHA256 4e99bd23cdd45450f37d2cd08d77115b19ebef6610f2c842697577f2ead0544d
MD5 8b98ea62608cbaaa614c85e1d1ac433e
BLAKE2b-256 eddc94c0ebbc09255e1cafaeb62e6cd036c20bf247e59526beba7c5f53473859

See more details on using hashes here.

File details

Details for the file habitica_prioritize-0.1.13-py3-none-any.whl.

File metadata

  • Download URL: habitica_prioritize-0.1.13-py3-none-any.whl
  • Upload date:
  • Size: 18.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","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

Hashes for habitica_prioritize-0.1.13-py3-none-any.whl
Algorithm Hash digest
SHA256 3e39e3d6fdcaa22d47afe6c468485454ddceff2625860ed57dd6e22ef64d3fce
MD5 30610723123db30befd7c4141fcbe75e
BLAKE2b-256 1173fe86ca01fe82b968b9b2d4f0798c6c40aeec975af80ec84fc1dc69a5a800

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page