Airsc miễn phí cho tất cả. Nếu nó giúp bạn, hãy ủng hộ $2–$20.

Ủng hộ
PluginCẩn thậnQuy trình & bộ nhớ agentCần cài đặt chút

Few-Word

sheeki03 · sheeki03/Few-Word

Plugin Claude Code này tự động chuyển các đầu ra lệnh lớn sang hệ thống tệp, giữ cho ngữ cảnh của tác nhân sạch sẽ và tối ưu hóa việc sử dụng token.

Plugin Claude Code chuyển các output lớn sang hệ thống tệp và truy xuất khi cần.

38 sao4Giấy phép: Không có giấy phépCập nhật 9 tháng trước0 lượt mở

Xem trước

▍

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

  • Ngăn chặn các đầu ra từ bộ kiểm thử lớn tiêu thụ quá nhiều token ngữ cảnh trong quá trình gỡ lỗi.
  • Cải thiện hiệu suất tác nhân bằng cách giảm lượng thông tin không liên quan trong ngữ cảnh hoạt động.
  • Cho phép tác nhân truy xuất nhật ký đầy đủ hoặc báo cáo chi tiết từ đĩa chỉ khi được yêu cầu cụ thể.

Kiểm tra an toàn

Cẩn thận

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

  • ●Không có giấy phép rõ ràng: hỏi tác giả trước khi dùng cho sản phẩm thương mại.

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

Trích từ README

FewWord

"Why waste time say lot word when few word do trick? Big output go file. Small word stay. Context happy. Me happy. Everyone go home by seven."

— Kevin Malone

A Claude Code plugin that automatically offloads large command outputs to files, keeping your context clean and retrievable.


The Problem

AI coding agents hit a wall when:

  • Tool outputs bloat your context — One big test run or log dump eats 10k tokens that sit there forever
  • Plans get lost — After context summarization, Claude forgets what it was doing
  • You're paying for waste — Most of your context is irrelevant to the current step

The Solution

FewWord implements dynamic context discovery — patterns from Manus and LangChain that use the filesystem as infinite, searchable memory.

Instead of this:

[26,000 tokens of command outputs sitting in context forever]

You get this (~35 tokens):

[fw A1B2C3D4] find e=0 15K 882L | /open A1B2C3D4

For failures, you also get a preview:

[fw E5F6G7H8] pytest e=1 45K 234L | /open E5F6G7H8
FAILED test_auth.py::test_login - AssertionError
FAILED test_api.py::test_endpoint - TimeoutError
2 failed, 48 passed in 12.34s

How It Works

┌─────────────────────────────────────────────────────────────────┐
│                        Claude Code Session                       │
├─────────────────────────────────────────────────────────────────┤
│                                                                  │
│   You: "Run the test suite"                                     │
│                              │                                   │
│                              ▼                                   │
│   ┌──────────────────────────────────────────┐                  │
│   │  PreToolUse Hook Intercepts              │                  │
│   │  ─────────────────────────               │                  │
│   │  Command: pytest                         │                  │
│   │  Output: 45,678 bytes (>8KB threshold)   │                  │
│   └──────────────────────────────────────────┘                  │
│                              │                                   │
│              ┌───────────────┴───────────────┐                  │
│              ▼                               ▼                   │
│   ┌─────────────────────┐      ┌─────────────────────────┐      │
│   │  Write to Disk      │      │  Return to Context      │      │
│   │  ─────────────────  │      │  ────────────────────   │      │
│   │  .fewword/scratch/  │      │  File: pytest_143022.txt│      │
│   │  tool_outputs/      │      │  Size: 45KB, Exit: 1    │      │
│   │  pytest_143022.txt  │      │  === Last 10 lines ===  │      │
│   │                     │      │  FAILED auth_test...    │      │
│   │  [Full 45KB output] │      │  [~200 tokens only]     │      │
│   └─────────────────────┘      └─────────────────────────┘      │
│                                                                  │
│   Later: "What tests failed?"                                   │
│                              │                                   │
│                              ▼                                   │
│   Claude: grep FAILED .fewword/scratch/tool_outputs/pytest.txt  │
│           → Retrieves exactly what's needed                     │
│                                                                  │
└─────────────────────────────────────────────────────────────────┘

Result: 45KB output → ~35 tokens in context + full data on disk when needed.


Test Results

We ran the same 3 commands (find, ls -la, env) in two fresh Claude Code sessions:

MetricWITH PluginWITHOUT Plugin
Message Tokens4.7k26.0k
Tokens Saved21.3k—
Savings82%—

Understanding the Numbers

When you run /context, you see several categories:

Total Context: 84k tokens (with plugin) vs 105k tokens (without)
├── System prompt:  3.8k  (constant - Claude's instructions)
├── System tools:  15.8k  (constant - built-in tools)
├── MCP tools:     14.7k  (constant - browser automation, etc.)
├── Messages:       4.7k  ← THIS IS WHAT FEWWORD REDUCES (was 26k)
└── Free space:      ...

The 82% savings (21.3k tokens) is specifically on Message tokens — that's where your actual conversation and command outputs live.


Installation

Step 1: Add the marketplace

claude plugin marketplace add sheeki03/Few-Word

Step 2: Install the plugin

claude plugin install fewword@sheeki03-Few-Word

Step 3: Start a new session for hooks to load.

That's it! FewWord works automatically — no configuration needed.

Alternative: Install from inside Claude Code

You can also run these commands inside an active Claude session:

/plugin marketplace add sheeki03/Few-Word
/plugin install fewword@sheeki03-Few-Word

Then start a new session.


Updates

FewWord checks for updates automatically on session start. Notifications are rate-limited (at most once every 24 hours).

To update manually:

claude plugin update fewword@sheeki03-Few-Word

Then start a new session for hooks to reload.

Check your version: /version

Disable update checks: export FEWWORD_DISABLE_UPDATE_CHECK=1


Commands

CommandWhat It Does
/helpShow detailed help and how the plugin works
/statsShow session statistics and estimated token savings
/versionShow installed version and update command
/open <id>Retrieve an offloaded output by ID
/recentShow recent offloaded outputs (recovery after compaction)
/pin <id>Pin an output to prevent auto-clea
Xem mã nguồn trên GitHub