Claude Code Mods: context देखें और edits replay करें, लेकिन संकेतों को verification न मानें
Claude Code के heavy users के लिए practical guide: Token Weather या Replay Theater चुनना, एक session के लिए एक Mod load करना, उसकी सीमाएँ समझना और Git, targeted checks तथा provider request records से परिणाम verify करना।
विषय-सूची

लंबे Claude Code session में आम तौर पर दो अलग सवाल आते हैं: पिछली turn के बाद context कितना बढ़ा, और Claude ने कौन-से file-edit operations call किए? Anthropic playground में दोनों सवालों के लिए तैयार sample है। Token Weather main session का context usage दिखाता है; Replay Theater पिछली editing turn के file-edit calls को step by step देखने देता है।
सबसे महत्वपूर्ण सीमा यह है कि दोनों observability tools हैं, acceptance tests नहीं। Context percentage आपके बचे quota, cost या task completion का प्रमाण नहीं है। Replay में edit दिखना यह साबित नहीं करता कि आपने उसे अनुमति दी, tool सफल हुआ या final file में वही change बचा है।
अभी जिस सवाल का जवाब चाहिए, उसी आधार पर Mod चुनें
| सवाल | पहले क्या load करें | क्या पता चलता है | क्या साबित नहीं होता |
|---|---|---|---|
| Main context window कितना भरा है और हाल की turns में तेजी से बढ़ा या नहीं? | Token Weather | Context tokens, window size, percentage और 12-turn trend | Subscription balance, charge, बाकी requests या task completion |
पिछली editing turn में कौन-से Edit, Write या MultiEdit calls हुए? | Replay Theater | File, tool, local before/after text और छोटा diff | Approval, tool success, final disk state या passing tests |
Diagnosis के लिए एक समय में केवल एक Mod load करें। दोनों samples AbovePrompt में draw कर सकते हैं। उनके README बताते हैं कि यह band shared है; कोई दूसरा Mod भी इसे उपयोग करे तो केवल एक display दिख सकता है।
Code चलाने से पहले version और trust boundary जाँचें
Current sample READMEs के अनुसार Claude Code 2.1.287 या बाद का version और terminal चाहिए। पहले client देखें:
claude --version
ये Mods Anthropic DevRel playground के examples हैं। Repository इन्हें as-is samples बताता है, जिनके लिए support या यह guarantee नहीं है कि Claude Code, API या models बदलने के बाद भी वे चलते रहेंगे। Run करने से पहले चुने हुए folder का README.md, .claude-plugin/plugin.json, hooks/hooks.json और hooks module पढ़ें।
Mod आपके user permissions के साथ चलता है; “यह सिर्फ UI draw करता है” security boundary नहीं है। पहली बार --plugin-dir से केवल एक session के लिए load करना बेहतर है। Claude Code process बंद होते ही trial खत्म हो जाता है और diagnostic experiment persistent installation नहीं बनता।
Official samples clone करें और चुना हुआ Mod validate करें
git clone https://github.com/anthropics/claude-code-playground.git
cd claude-code-playground/claude-code/mods
Repository download हो जाना valid structure का प्रमाण नहीं है। Session शुरू करने से पहले exact folder validate करें।
Token Weather के लिए:
claude plugin validate ./token-weather
claude --plugin-dir ./token-weather
Replay Theater के लिए:
claude plugin validate ./replay-theater
claude --plugin-dir ./replay-theater
यदि validate error दे, वहीं रुकें और बताए गए manifest, hooks configuration या module को restore करें। यह मानकर आगे न बढ़ें कि Claude Code malformed package को safely ignore कर देगा। New session में /plugin से loaded components की पुष्टि की जा सकती है। Functional success signal इसके बाद आता है: Token Weather completed main-loop turn के बाद update हो; Replay Theater उस completed turn के बाद entry दिखाए जिसमें सचमुच file edits call हुई हों।
Token Weather को context telemetry मानें, bill नहीं
हर main-loop turn के बाद Token Weather $.session.usage() call करके context से tokens, window और percent पढ़ता है। यह prompt के ऊपर एक line draw करता है, latest 12 readings रखता है और latest turn की बढ़ोतरी दिखाता है।
इन fields का अर्थ:
tokens: वह input context जिस पर latest response बना, जिसमें uncached, cache-written और cache-read input tokens शामिल हैं;window: session model की context window;percent:tokens / window।
पहले response से पहले 0% normal है, क्योंकि किसी response ने usage report नहीं किया। Display turn के दौरान लगातार नहीं बदलता; turn complete होने के बाद एक बार update होता है। Subagent turns अलग main-loop reading नहीं बनाते।
Compaction notice से percentage अलग क्यों हो सकता है
Token Weather पूरी context window को denominator मानता है। Claude Code का auto-compact notice उससे नीचे वाले compaction point पर आधारित है, इसलिए दोनों percentages अलग हो सकते हैं। Official sample screenshot में Token Weather 81% और client notice 90% था। यह sample conditions में दो scales का example है; आपके session में numbers match करना जरूरी नहीं है।
History bars displayed readings में सबसे बड़े value के relative होते हैं। इसलिए absolute percentage कम होने पर भी bars में बड़ा बदलाव दिख सकता है। Absolute reading के लिए percentage और token count देखें। Session start या plugin reload पर history reset होती है।
Token Weather से कौन-सा निष्कर्ष सही है
आप कह सकते हैं: “हाल की turns में main session का input context तेजी से बढ़ा।” आप यह नहीं कह सकते: “Account में 19% बचा है”, “इस turn की cost इतनी थी” या “task complete है।” Caching billing treatment बदलता है, लेकिन cached input context में जगह लेता रहता है। Balance, charge और request status provider record से जाँचें।
Replay Theater से edit attempts देखें
Mod load होने के बाद Claude को ऐसा task दें जो वास्तव में files बदलता हो और turn complete होने तक प्रतीक्षा करें। Hint आने पर replay खोलें:
/replay
आप ctrl+x, Tab से band focus करके r भी दबा सकते हैं। Panel में:
| Key | Action |
|---|---|
n | अगला step |
p | पिछला step |
c या Escape | बंद करें |
हर step file, tool, added/removed line counts और छोटा diff दिखाता है। Sample एक step को 12 displayed lines तक सीमित करता है। Edit में पूरे file के बजाय old_string और new_string compare होते हैं, और line numbers नहीं दिखते। Write call से ठीक पहले पुराना disk content पढ़ता है; 400 से अधिक lines वाले file में complete line matching नहीं होती।
Replay में edit दिखे, फिर भी final file क्यों न बदले
Replay Theater call को आगे भेजने से पहले record करता है। इसलिए आपके द्वारा denied edit या failed tool call भी replay में आ सकता है। बाद का call पहले change को overwrite या reverse कर सकता है।
Replay current session की memory में रहता है। Claude Code restart या plugin reload पर मिट जाता है। अगली turn में edit न हो तो पिछला replay बना रहता है। इसे “Claude ने क्या कोशिश की” समझने के लिए उपयोग करें, final repository snapshot के रूप में नहीं।
Acceptance हमेशा असली files पर करें
Replay Theater जो भी दिखाए, अंत में repository जाँचें:
git status --short
git diff --stat
git diff -- path/to/file
git diff --check
git status --short वास्तविक additions, modifications और deletions दिखाता है। git diff --stat unexpected broad scope पकड़ता है। Important files का पूरा diff पढ़ें, 12-line replay excerpt पर निर्भर न रहें। git diff --check से whitespace errors देखें, फिर changed files से सीधे जुड़ा सबसे छोटा test, type check या build चलाएँ।
Acceptance criteria observable हों: “Target function rename हुई, सभी references update हुए, relevant unit test pass है और unrelated file नहीं बदली।” “Replay में पाँच green steps दिखे” acceptance criterion नहीं है।
Actual usage provider request record में verify करें
Token Weather context fill दिखाता है; API bill calculate नहीं करता। किसी भी API provider में completed turn को time और model से match करें, फिर status, input/output tokens, applicable cache tokens और recorded charge देखें।
यदि Claude Code के लिए BetterToken API route उपयोग हो रहा है, उसकी current page के अनुसार model, time, token counts, cache usage, final cost और status एक request record में साथ रहते हैं। Actual API usage verify करने के लिए उस record का उपयोग करें। इसका अर्थ यह नहीं कि BetterToken Mods देता है, पूरा prompt/response store करता है या code change को automatically accept करता है। Connection steps BetterToken Claude Code guide में हैं।
सबसे छोटे उपयोगी क्रम में troubleshooting करें
claude plugin validate fail होता है
Validator द्वारा बताए exact file और field को पढ़ें। Confirm करें कि current directory claude-code-playground/claude-code/mods है, download tool ने hidden files rename नहीं किए और checkout intact है। Launch से पहले दोबारा validate करें।
Token Weather नहीं दिखता या 0% पर रहता है
केवल VS Code chat panel पर निर्भर न रहें; terminal उपयोग करें, version 2.1.287 या बाद का रखें और सही Mod loaded होने की पुष्टि करें। Normal request भेजें और main-loop turn complete होने दें। First response से पहले zero normal है।
Replay Theater hint नहीं दिखाता
Confirm करें कि turn ने Edit, Write या MultiEdit call किया और turn पूरा हो गया। Files पढ़ना, सवाल का जवाब देना या केवल Bash commands चलाना file-edit step नहीं बनाता।
Replay और git diff अलग हैं
Real files पर भरोसा करें। Edit denied या failed हो सकता है, बाद का call उसे बदल सकता है, panel केवल local excerpt दिखा सकता है या restart/reload memory state बदल सकता है। Full diff और targeted tests से फिर जाँचें।
दो Mods साथ नहीं दिखते
एक को disable करें और दूसरे के साथ new session शुरू करें। दोनों AbovePrompt share करते हैं; second band न दिखना package टूटने का प्रमाण नहीं है।
भरोसेमंद minimum loop
Context growth जानना हो तो Token Weather चुनें; file-edit calls जानने हों तो Replay Theater। Successful load केवल पहला step है, visible meter या replay दूसरा। तीसरा step हमेशा real files inspect करना, सबसे छोटा relevant validation चलाना और usage महत्वपूर्ण हो तो provider request record जाँचना है। इसी से process visibility verified result बनती है।