A platform for serving and completing microtasks while waiting for claude code to finish thinking.
When entering a prompt, a claude code hook is called to procure a micro task for the user to complete, or dismiss.
This is an example of the typing test task:
- Python 3.14
- uv (package manager)
- PostgreSQL 16
- Set up environment:
cp .env.template .env.localEdit .env.local with your local settings. The defaults work with the Docker PostgreSQL setup.
- Install dependencies:
uv sync-
Start PostgreSQL: Make sure postgres is running!
-
Run database migrations:
uv run alembic upgrade head- Start the dev server:
uv run uvicorn app.main:app --reloadMicrotasks uses a Claude Code hook to open a small task window each time you submit a prompt. The server must be running for tasks to appear.
To install the hook in your project:
uv run microtasks installThis adds a UserPromptSubmit hook to .claude/settings.local.json. When you submit a prompt in Claude Code, the hook fetches the next available task from the server and opens it in a floating window.
To temporarily disable prompts without removing the hook:
uv run microtasks disable
uv run microtasks enableOr via a skill directly in claude:
/microtask-toggle on
/microtask-toggle off
To fully remove the hook:
uv run microtasks uninstallYou can manage which tasks are enabled via the admin panel at http://localhost:8000/admin.
- API docs: http://localhost:8000/docs
- Admin panel: http://localhost:8000/admin
- Task dev harness: http://localhost:8000/dev/
The task dev harness at /dev/ lets you preview and test individual task UIs in the browser. It lists all registered tasks and renders each one in an iframe at its configured dimensions, simulating how the task appears in the pywebview popup. Each preview generates a temporary task ID so completion callbacks work end-to-end.
To preview a specific task directly:
http://localhost:8000/dev/{task-slug}
uv run pytest./scripts/check.sh./scripts/fix.shruff check finds lint errors (some auto-fixable with --fix). ruff format handles code formatting. The scripts above combine these for convenience.
uv run ruff check src/ tests/ # lint
uv run ruff format src/ tests/ # format
uv run mypy src/ # type check# Create a new migration
uv run alembic revision --autogenerate -m "description"
# Apply migrations
uv run alembic upgrade head
# Rollback one migration
uv run alembic downgrade -1The issue-sorter task pulls issues from a GitHub repo and tracks ELO ratings on a GitHub Projects v2 board. Issues must be on a project board because ELO is stored as a custom number field — only board items can have custom fields.
This requires the GitHub CLI (gh) to be installed and authenticated with the project scope.
brew install gh
gh auth login
gh auth refresh -h github.com -s projectCreate a GitHub Projects v2 board on your repo and add your issues to it. The CLI will auto-discover the board and create an ELO number field if one doesn't exist.
uv run microtasks configure-github --repo owner/repo-nameThe CLI will:
- Test-run
gh issue listagainst the repo to verify access - Discover the project board (or prompt you to pick one)
- Find or create an "ELO" number field on the board
- Save the repo, project ID, and field ID to the database
Only one config is stored at a time — running configure-github again replaces the previous one.
After configuring, you can check that issues are being fetched:
# Via the API
curl http://localhost:8000/tasks/issue-sorter/issues
# Or visit the admin panel to edit this
open http://localhost:8000/admin- Runtime: Python 3.14
- Package manager: uv
- Web framework: FastAPI
- ORM: SQLModel (SQLAlchemy + Pydantic)
- Database: PostgreSQL (via Docker)
- Admin: SQLAdmin
- Migrations: Alembic
- CLI: Typer
- Testing: pytest
- Linting: ruff
- Type checking: mypy
