BlogToken Economics for Solopreneurs: Build Once With Tokens, Run Forever
AI Workflow

Token Economics for Solopreneurs: Build Once With Tokens, Run Forever

KG
Teh Kim GuanACMA · CGMA
2026-04-10 · 5 min read · Updated 2026-05-09
Token Economics for Solopreneurs: Build Once With Tokens, Run Forever

A session spent building a CLI tool for a Malaysian government property database revealed a principle that governs all AI-assisted infrastructure.

The Problem With Burning Tokens Repeatedly

Every time you ask Claude to query a government property database, it costs tokens. Every time you ask it to parse a response, more tokens. Ask it to monitor changes over time. Tokens again, for the same operations, repeated.

There is a more efficient architecture. It requires spending tokens once, upfront, to build a tool. Then running that tool forever without additional AI cost.

This is token economics applied to solopreneur operations. The principle: treat heavy token sessions as capital expenditure, not operating expense.

The JPPH PRISM Case

Build-once vs. per-session cost comparison: single 80K-token build vs. 5K–10K tokens per weekly query cycle, with break-even at 6 weeks marked on a timeline

JPPH PRISM 2.0 is Malaysia's government property transaction database. It sits behind a login wall, a drag-slider CAPTCHA, and a Java Server Faces interface that does not respond well to standard automation tools.

The goal: query rental and transaction data on demand, without navigating the portal manually each time.

The conventional approach, ask Claude to help you search the database in each session, burns 5,000 to 10,000 tokens per query cycle. Multiply that by weekly monitoring across multiple property segments, and the cost compounds quickly.

The alternative: spend 80,000 to 100,000 tokens once to build a Python CLI tool that handles the entire operation, covering cookie injection to bypass CAPTCHA, PrimeFaces form field discovery, query execution, result parsing, and monitoring with history comparison. Then run that tool for free, indefinitely.

The math: if you query JPPH twice per week, the break-even point against per-session token cost is approximately six weeks. After that, the tool pays a dividend in every session it avoids.

How the Session Worked

The build took approximately 2.5 hours and 80,000 to 100,000 tokens. The architecture decision was non-obvious:

Option 1 (rejected): Playwright automation. A browser automation script that logs in, navigates the portal, and scrapes results. Functional but heavyweight. Requires a browser binary, is fragile to UI changes, and costs significant tokens to maintain when the portal updates.

Option 2 (rejected): API reverse engineering. No public API exists for JPPH PRISM. Reverse engineering the form submission protocol is possible but legally ambiguous and technically fragile.

Option 3 (chosen): Cookie injection with CLI-Anything. Login manually once using a browser, export the session cookies, then inject them into programmatic HTTP requests. The CLI handles everything after login: form discovery, query construction, response parsing, data export, monitoring.

The key insight: the CAPTCHA is only on the login page. Once authenticated, the session cookies are valid for the entire browsing session. A tool that reuses those cookies bypasses the CAPTCHA entirely. No Playwright, no image recognition, no fragile UI automation.

This is not a hack. It is the correct use of standard session management.

The Build Architecture

The CLI has five modules:

session.py: Cookie management. Loads cookies from a local JSON file, validates them against the portal, and surfaces a clear error when re-login is needed.

report.py: Form field discovery. Uses heuristics to map PrimeFaces component IDs to readable field names. Constructs the POST request, submits it, parses the response table, and returns structured data.

export.py: Data formatting. Outputs results as JSON (for agent consumption), CSV (for spreadsheet import), or a formatted table (for human reading).

monitor.py: Change detection. Stores query results with timestamps, computes diff against prior runs, and surfaces changes. Useful for tracking rental rate movements in a specific area over time.

jpph_prism_cli.py: Entry point. Click-based CLI with commands: search, rental, export, monitor history, monitor compare, ping (portal health check), and inspect (form field discovery for debugging).

22 unit tests pass. The tool installs to PATH as cli-anything-jpph-prism.

The Skill Layer

After the CLI was built, a skill was created so the AI assistant can operate the tool autonomously.

This is the delegation pipeline: KG builds, tutorial documents, skill teaches, the assistant operates.

The skill includes reference documentation for all commands, decision trees for which query type to use, error handling protocols (session expired, portal down, no results), and an eval suite for testing skill performance.

When the next property market report needs JPPH data, the assistant runs cli-anything-jpph-prism rental --state Selangor --property-type apartment --period 2025-Q4 and processes the output. No tokens burned on portal navigation. No human time spent on data collection.

This delegation pattern connects directly to what I described in The Self-Sustaining Handoff: the goal is always a system that runs without you in the loop.

The General Principle

The JPPH PRISM session is a single instance of a principle that applies everywhere:

Any operation you perform with Claude more than once per month is a candidate for tooling.

The threshold shifts based on session cost. A 5,000-token operation repeated 12 times per year costs 60,000 tokens. A 60,000-token one-time build breaks even after one use and pays dividends thereafter.

The solopreneur's error is treating every AI session as an operating expense, paying the full cost of intelligence each time. The sustainable architecture treats recurring operations as infrastructure problems. Build once. Operate forever.

Three questions to identify your tooling candidates:

  1. What data do you look up repeatedly that lives behind a login wall?
  2. What multi-step workflows do you reconstruct from scratch each session?
  3. What monitoring tasks could run autonomously if you had the right script?

Each answer is a build-once opportunity.

The Caveat

Build-once assumes the underlying system does not change. Government portals update. APIs version. PrimeFaces form fields rename.

The correct response to this risk is not to avoid tooling. It is to design tools that fail loudly when the underlying system changes. The inspect command in the JPPH CLI exists specifically for this: when the portal updates its form structure, inspect shows what has changed, and the fix is targeted rather than requiring a full rebuild.

A tool that breaks transparently is better than a manual process that silently produces wrong results.

What This Means for the 4-Hour Day

The solopreneur operating on a 4-hour daily budget cannot afford to manually perform the same operations repeatedly. The constraint is absolute. Every hour of manual data collection is an hour not spent on client work.

The build-once principle is how you buy back those hours. The initial investment is significant: 80,000 tokens and 2.5 hours in the JPPH case. The return is durable. Every subsequent query costs seconds, not hours.

Time spent on infrastructure multiplies. The infrastructure overhead problem (see The 67/27 Problem: When Your AI System Becomes Its Own Overhead) does not argue against building tools. It argues against building tools that serve system perfection rather than revenue generation. A data collection tool for client property research is revenue-adjacent. A knowledge graph integrity checker is system perfection. Both have their place, but only one belongs in the core weekly budget.

Build the tools that pay. Defer the ones that don't.


Based on a JPPH PRISM CLI build session, April 2026. The CLI is operational.

About the Author
KG
Teh Kim Guan
Product Consultant · General Manager, PEPS Ventures

Strategy and technology are the same decision. Over 15 years in fintech (CTOS, D&B), prop-tech (PropertyGuru DataSense), and digital startups, I have built frameworks that help founders and executives make both moves at once. Based in Kuala Lumpur.

More from the blog
Consulting
Delegation Without a Team: The 3-Tier Classification System
433 tasks, one solo operator, nine subagents. A classification sprint that reduced the daily briefing surface area by 80% and exposed the real bottleneck in solo delegation.
2026-04-10 · 6 min read
AI Workflow
Brief Before Build: The Hidden Cost of Produce-Then-Constrain
25,000 tokens of rework from one missed constraint. The produce-then-constrain failure mode is common, recoverable, and entirely preventable with one operational change.
2026-04-04 · 6 min read
AI Workflow
Why I Stopped Launching Background Agents for File Creation
Five parallel agents, 40,000 tokens in coordination overhead, zero files produced. The sprint still shipped, because I did the work sequentially. Here is what that failure taught me.
2026-04-17 · 5 min read
Work with KG

Working on a 0→1 product?

I help founders and operators go from idea to validated product. Let's talk about yours.

Get in touch →