ตอบสั้นๆ ก็เข้าใจแบบพอดีๆ
Create a Claude Code plugin that compresses Thai language responses by removing unnecessary words while preserving technical accuracy and reducing token usage by 60-75%
I need to create a Claude Code plugin called "pordee" that helps compress Thai language responses from Claude by removing unnecessary words while keeping technical accuracy. The plugin reduces token usage by 60-75% through intelligent text reduction.
Build this as a JavaScript/TypeScript Claude Code plugin with these core features: A slash command system that supports `/pordee`, `/pordee lite`, `/pordee full`, `/pordee stop`, `/pordee-stats`, and `/pordee-stats --share` commands. Also implement keyword detection so users can type Thai keywords like "พอดี" (pordee/concise) or "หยุดพอดี" (stop) as regular messages to toggle the feature on and off automatically.
The plugin should have two compression modes. The lite mode removes politeness particles (ครับ/ค่ะ/นะคะ), filler words (อาจจะ/น่าจะ), and unnecessary greetings but keeps proper grammar. The full mode (default) goes further by also removing redundant particles (ที่/ซึ่ง/ว่า), nominalizers (การ-, ความ-), using shorter synonyms, and allowing sentence fragmentation when appropriate.
Create a system hook that intercepts Claude's responses before they're shown to users, applies the appropriate compression level, and modifies the output in real-time. Include a statistics tracking system that measures token savings per session and can display metrics like "73% tokens saved" or summarizable one-liners for sharing.
The plugin should preserve all English technical terms, code blocks, and technical accuracy while only compressing the Thai natural language portions. Store configuration state (which level is active, whether the feature is enabled) persistently across the session.
Structure this with separate modules: a compression engine with lite and full algorithms, a command parser for slash commands and keywords, a statistics tracker, and Claude plugin hooks that integrate with the Code editor. Include comprehensive benchmarks and tests to verify the compression ratios match the README claims (60-75% token savings). The whole thing should feel lightweight and fast since it's a real-time text processor working on every response from Claude.