Skip to content
JayPokalePublic

About

Cut your AI coding agent's token bill on three axes: terse prose, YAGNI-first code, and tool-output compression. Claude Code, Pi, Cursor, Codex, Gemini + 4 more. Zero deps, published benchmarks including the runs it loses.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1.3k stars

Watchers

4 watching

Forks

Latest commit

 

History

368 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chisle: fewer tokens in, fewer tokens out, same answers.

GitHub stars npm version npm downloads per month Works with 13 agents MIT license Follow @JayPokale on GitHub Buy me a coffee

English · Español · 한국어 · 简体中文 · 日本語

Chisle versus the same model with no ruleset, on Sonnet 5.5: 39% fewer billed output tokens (Haiku 4.5: 9%), answers 43% shorter (Haiku 4.5: 39%), oversized tool output 48% smaller, accuracy 156 of 156, the same as the bare model.

Shorter answers than caveman and ponytail. No accuracy lost.

npx chisle

Chisle is free. Its benchmarks aren't. Saved you tokens? Buy me a coffee.

Same prompt, four rulesets, visible answer tokens, mean of 3 runs: Chisle 515, ponytail 672, caveman 667, no ruleset 1,081. Chisle is 52% shorter than no ruleset.

See both answers

The prompt: "Implement an order state machine covering created, paid, shipped, delivered, cancelled and refunded, with the legal transitions enforced and invalid ones rejected." Excerpts from the verbatim committed answers in raw-314-direct/large-s2:

no ruleset: 132 lines, 1,307 answer tokensChisle: 60 lines, 577 answer tokens
class StateTransition:
    """Defines valid state transitions"""
    from_state: OrderState
    to_states: Set[OrderState]

class OrderStateMachine:
    # Define all valid transitions
    TRANSITIONS = {
        OrderState.CREATED: {OrderState.PAID, OrderState.CANCELLED},
        …
    }
    def __init__(self, order_id: str):
        …
        self.state_history = [(OrderState.CREATED, datetime.now())]
    def can_transition(self, target_state: OrderState) -> bool:
    def transition(self, target_state: OrderState) -> bool:
        """
        Attempt to transition to target_state.
        Returns True if successful, False if invalid.
        """
    def get_valid_transitions(self) -> Set[OrderState]:

…plus a StateTransition class nothing uses, example usage and tests, and "Key Design Decisions", "Why these transitions" and "Features" sections.

class OrderStateMachine:
    VALID_TRANSITIONS: Dict[OrderState, Set[OrderState]] = {
        OrderState.CREATED: {OrderState.PAID, OrderState.CANCELLED},
        OrderState.PAID: {OrderState.SHIPPED, OrderState.REFUNDED, OrderState.CANCELLED},
        …
    }
    def transition(self, target: OrderState) -> None:
        if target not in self.VALID_TRANSITIONS[self.state]:
            raise ValueError(
                f"Invalid transition: {self.state.value} → {target.value}"
            )
        self.state = target

Then a short example and a five-line list of the transitions.

Claude Code with Sonnet 5.5, 39 answers (13 prompts, 3 runs) in one session, billed output tokens as percent of the same model with no ruleset: caveman 78%, ponytail 73%, Chisle 61%.

Claude Code with Haiku 4.5, the same prompts: caveman 96%, ponytail 115%, Chisle 91%. On Haiku every ruleset adds hidden thinking, which eats most of the shorter answers.

Terminal output Claude reads across 37 shell commands, as percent of the raw output: no ruleset 100%, caveman 100%, ponytail 100% (rulesets only, they never touch tool output), Chisle 28%.

Total cost of three real agent tasks with noisy commands (fix a failing npm test, add a feature that keeps a 391-test suite green, find a bug in a large commit), as percent of the same agent with no ruleset, no RTK in any arm, each ruleset's own cached prompt not counted: caveman 120%, ponytail 104%, Chisle 87%. Every run fixed its task.

Every raw transcript is committed, losses included. Method and data · why we publish the losses

Animated illustration of the Chisle tool-output compressor: raw npm test output with colour codes, six identical lines and 172 passing lines becomes a short version with the codes stripped, the repeats collapsed, the middle elided with the full output saved to a file, and the failing test and its error kept.

Command-aware filters on real output, raw characters to what Claude reads: npm test 19,374 → 445 (−98%), a failing npm test 16,107 → 309 (−98%), git status 485 → 92 (−81%), git log -n 15 6,561 → 3,784 (−42%). Across 37 commands Claude reads 28% of the raw output with Chisle, 100% with caveman or ponytail.

The Chisle efficiency ladder. Before writing code, stop at the first rung that holds: 1 does this need to exist at all, 2 already in this codebase, 3 does the stdlib do it, 4 a native platform feature, 5 an already-installed dependency, 6 can it be one line, 7 only then the minimum code that works.

Animated terminal: npx chisle detects Claude Code, Gemini CLI, Codex, OpenCode, Copilot CLI and Cursor, installs into each, and prints Done.

Other ways to install
# Claude Code plugin marketplace
claude plugin marketplace add JayPokale/Chisle
claude plugin install chisle@chisle

# curl
curl -fsSL https://raw.githubusercontent.com/JayPokale/Chisle/main/install.sh | bash
# Windows
irm https://raw.githubusercontent.com/JayPokale/Chisle/main/install.ps1 | iex

Per-agent setup, upgrading and config: docs/usage.md.

Cheat sheet: npx chisle wires every agent; --dry-run previews; --uninstall puts everything back; /chisle off pauses it; /chisle-review finds over-engineering; /chisle-audit finds bloated code and prose; npx chisle tools shows tool schemas you pay for but never use; npx chisle mcp wrap trims MCP output in any agent.

GitHub stars over time

Chisle is free. Its benchmarks aren't. Every benchmark run costs real API money. Saved you tokens? Buy me a coffee.

⭐ Star the repo: it costs zero tokens. · Follow @JayPokale for more tools.

Contributors

MIT · Contributing · Began as a merge of caveman and ponytail (notices) · Command filters follow RTK's design

About

Cut your AI coding agent's token bill on three axes: terse prose, YAGNI-first code, and tool-output compression. Claude Code, Pi, Cursor, Codex, Gemini + 4 more. Zero deps, published benchmarks including the runs it loses.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1.3k stars

Watchers

4 watching

Forks

Releases

Packages

Contributors

Languages