Duyệt miễn phí mỗi ngày. Lên Pro để cài đặt và dùng Airsc MCP không giới hạn.

Xem gói Pro
PluginCẩn thậnQuy trình & bộ nhớ agentDễ cho người mới

Chisle

JayPokale · JayPokale/Chisle

Plugin này dành cho Claude Code và các tác nhân AI khác giúp giảm chi phí token và cải thiện hiệu quả bằng cách khuyến khích văn xuôi súc tích, mã ưu tiên YAGNI và nén đầu ra công cụ.

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.

714 sao49Giấy phép: MITCập nhật Hôm kia0 lượt mở

Xem trước

▍

Bạn có thể làm gì với nó

  • Giảm đáng kể chi phí vận hành khi sử dụng các tác nhân lập trình AI cho các tác vụ phát triển.
  • Nhận các đề xuất mã ngắn gọn và tập trung hơn từ AI bằng cách loại bỏ sự dài dòng không cần thiết.
  • Tối ưu hóa việc sử dụng cửa sổ ngữ cảnh cho các tác nhân AI bằng cách nén các đầu ra công cụ lớn.

Kiểm tra an toàn

Cẩn thận

Dùng được, nhưng nên đọc ghi chú trước.

  • ●Trình cài đặt tải script từ xa và chạy thẳng bằng shell.install.sh

Quét tự động các file trong repo. Luôn xem lại code trước khi chạy.

Trích từ README

Chisle

Fewer tokens than caveman and ponytail. No accuracy lost.

Your AI talks less, builds less, reads less, and says more. Like a senior dev who bills by the syllable.

The only tool in this class that publishes the runs where it lost. Here's why.

Built for Claude Code: answers about half as long, shorter than caveman and ponytail · 13 agents · zero dependencies · one command

Chisle is a Claude Code plugin that makes Claude cheaper to run without making it dumber. It cuts what Claude writes: no filler, no hedging, no speculative abstractions, just the smallest code that works. It also cuts what Claude reads: a PostToolUse hook trims oversized tool output by ~46% before it re-enters the context window, where it would be re-billed on every later request. In agent-loop tests Claude with Chisle passes the same tasks as Claude without it. One npx chisle installs it, and the same ruleset ships to Pi, Cursor, Codex, Gemini, Copilot, OpenCode, Antigravity and four more agents. Every number here comes from committed raw transcripts, including the runs where it lost.

Pi, 6 tasks: answer length vs the same model with no ruleset. Lower is leaner. More below.


"Implement an order state machine covering created, paid, shipped, delivered, cancelled and refunded, with the legal transitions enforced and invalid ones rejected." Same model, same prompt, one difference: the injected ruleset. Both answers are the verbatim committed output from raw-oct-notools/large-s2:

bare model: 125 lines, 1,342 answer tokensChisle: 54 lines, 450 answer tokens

An Enum of states, a custom exception class, type hints and docstrings on every method, a file write, then a test harness:

class OrderState(Enum):
    CREATED = "created"
    PAID = "paid"
    # … four more

class InvalidTransition(Exception):
    """Raised when attempting an invalid state transition."""
    pass

class Order:
    VALID_TRANSITIONS = { … }
    def transition_to(self, next_state: OrderState) -> None:
        """Transition to next state if valid, …"""

…plus usage, tests and a summary.

One dict of legal transitions, one method that enforces it:

class OrderStateMachine:
    TRANSITIONS = {
        'created': {'paid', 'cancelled'},
        'paid': {'shipped', 'refunded'},
        'shipped': {'delivered', 'cancelled'},
        'delivered': {'refunded'},
        'cancelled': set(),
        'refunded': set(),
    }
    def transition(self, new_state):
        if new_state not in self.TRANSITIONS[self.state]:
            raise ValueError(f"Invalid transition: …")
        self.state = new_state

Then a short usage block and one line on how it works.

Same behaviour, a third of the tokens. caveman wrote 1,140 and ponytail 842 on the same prompt.

What it compresses

axiswhathow
Output: prosefiller, hedging, manufactured structurezero-fluff ruleset, injected per session
Output: codespeculative abstractions, unrequested boilerplateYAGNI efficiency ladder
Input: contextoversized tool output flooding the windowClaude PostToolUse, Pi tool_result, OpenCode plugin, Copilot CLI postToolUse: scrub, elide, dedup, plus prevention rules
Input: MCPoversized MCP tool results in any agentnpx chisle mcp wrap: a proxy in front of each stdio MCP server (Cursor, Windsurf, Cline, Kiro, Gemini, Qwen Code, Copilot CLI)

Where each one attaches to a session:

flowchart LR
    subgraph S["Session start"]
        H1["Ruleset injectiononce per active session"]
    end
    subgraph T["Every turn"]
        H2["Mode trackingClaude + Pi"]
    end
    subgraph L["Every tool call"]
        H3["PostToolUse / tool_resultscrub → elide → dedup"]
    end

    H1 --> M(["Model"])
    H2 --> M
    M -->|writes| O["Output:terser prose,YAGNI-first code"]
    M -->|calls a tool| TOOL[["Bash / grep / web / extension tools"]]
    TOOL -->|raw output| H3
    H3 -->|"compressed, rebuilt intothe tool's own shape"| M

    RE["Read / Edit / Write"] -.->|"never touched,exact bytes feed later edits"| M

    style M fill:#1f2937,stroke:#d78a3c,color:#e6edf3
    style O fill:#14532d,stroke:#2da44e,color:#e6edf3
    style H3 fill:#1f2937,stroke:#2da44e,color:#e6edf3
    style RE fill:#3f1d1d,stroke:#cf3b3b,color:#e6edf3

The loop on the right is the input axis: tool output is billed again on every later request in the session, so shrinking it once pays repeatedly. Read, Edit, and Write are deliberately outside it.


Install

One command. Auto-detects your agents (Claude Code, Pi, Cursor, Windsurf, Cline, Kiro, Antigravity, Codex, Gemini, Copilot, Copilot CLI, OpenCode, Hermes) and wires each one. --uninstall puts everything back. npx chisle mcp wrap extends tool-output compression to MCP servers in any agent (details).

npx chisle
# or via 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

Preview first with npx chisle --dry-run, scope with --only claude or --only pi, see everything with npx chisle --help. Remove with npx chisle --uninstall.

Upgrading, per-agent setup, --stats and config: docs/usage.md.


Benchmarks

Same model, same prompts, one difference: the injected ruleset. Lower = leaner. Chisle is the leanest on every row.

Claude Code (Haiku 4.5, 26 live prompts, tools off, raw cells):

% of a bare modelcavemanponytailChisle
answer length65%58%56%
answer lines66%54%52%

Pi (GPT-5.5, 6 tasks, raw cells

Xem mã nguồn trên GitHub