{"id":987524168,"date":"2026-07-24T14:41:37","date_gmt":"2026-07-24T12:41:37","guid":{"rendered":"https:\/\/www.obviousworks.ch\/?p=987524168"},"modified":"2026-07-24T14:41:38","modified_gmt":"2026-07-24T12:41:38","slug":"claude-code-statusline-context-costs-rate-limits","status":"publish","type":"post","link":"https:\/\/www.obviousworks.ch\/en\/claude-code-statusline-context-kosten-rate-limits\/","title":{"rendered":"Setting Up Claude Code Statusline: Download the Script"},"content":{"rendered":"\n[et_pb_section fb_built=&#187;1&#8243; _builder_version=&#187;4.27.7&#8243; _module_preset=&#187;default&#187; custom_margin=&#187;0px||||false|false&#187; custom_padding=&#187;0px||||false|false&#187; global_colors_info=&#187;{}&#187;][et_pb_row _builder_version=&#187;4.27.7&#8243; _module_preset=&#187;default&#187; custom_margin=&#187;0px||||false|false&#187; custom_padding=&#187;0px||||false|false&#187; global_colors_info=&#187;{}&#187;][et_pb_column type=&#187;4_4&#8243; _builder_version=&#187;4.27.7&#8243; _module_preset=&#187;default&#187; global_colors_info=&#187;{}&#187;][et_pb_text _builder_version=&#187;4.27.7&#8243; _module_preset=&#187;default&#187; hover_enabled=&#187;0&#8243; global_colors_info=&#187;{}&#187; sticky_enabled=&#187;0&#8243;]<p data-pm-slice=\"1 3 []\"><span>Eine Claude-Code-Session kann lange sauber laufen und sp\u00e4ter Details \u00fcbersehen, die am Anfang noch pr\u00e4sent waren. Das Modell blieb gleich. Sein Arbeitskontext hat sich ver\u00e4ndert.<\/span><\/p>\n<p><span>Genau daf\u00fcr habe ich mir eine eigene Statusline gebaut. Sie zeigt mir w\u00e4hrend der Arbeit, wie voll der Context ist, welches Modell l\u00e4uft, auf welchem Git-Branch ich arbeite und wann meine Rate Limits zur\u00fcckgesetzt werden.<\/span><\/p>\n<p><span>So sieht sie in einer laufenden Session aus:<\/span><\/p>\n<pre dir=\"ltr\"><code dir=\"ltr\"><span>[Sonnet 5] | \ud83c\udf3f main | \ud83e\udde0 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2591\u2591\u2591 72% | \ud83d\udd22 143820 tok | \ud83d\udcb0 $1.8420 | \u23f1\ufe0f 48m 12s\nRate Limits: \ud83d\udcca 5h: 64% \u21ba 17:30 24.07.2026 | 7d: 37% \u21ba 17:30 31.07.2026<\/span><\/code><\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>[\/et_pb_text][dsm_card title=&#187;Claude Code Statusline Script&#187; subtitle=&#187;Kostenlos runterladen &#8211; Details im txt File &#8211; Umbenennen nicht vergessen.&#187; badge_text=&#187;Claude Code Cheat Sheet 2026&#8243; badge_url=&#187;https:\/\/www.obviousworks.ch\/download\/statusline_claude_code.txt&#187; button_text=&#187;Hier klicken &#038; kostenlos downloaden&#187; button_url=&#187;https:\/\/www.obviousworks.ch\/download\/CLAUDE.md_Architecture_Guide_2026_ObviousWorks.pdf&#187; button_url_new_window=&#187;on&#187; _builder_version=&#187;4.27.7&#8243; _module_preset=&#187;default&#187; background_color=&#187;#0a0001&#8243; custom_button=&#187;on&#187; button_text_size=&#187;21px&#187; button_text_color=&#187;#F67E28&#8243; button_alignment=&#187;center&#187; background_layout=&#187;dark&#187; link_option_url=&#187;https:\/\/www.obviousworks.ch\/download\/statusline_claude_code.txt&#187; locked=&#187;off&#187; global_colors_info=&#187;{}&#187;][\/dsm_card][et_pb_image src=&#187;https:\/\/www.obviousworks.ch\/wp-content\/uploads\/2026\/07\/Best-Whiteboard-2.png&#187; _builder_version=&#187;4.27.7&#8243; _module_preset=&#187;default&#187; title_text=&#187;Best Whiteboard (2)&#187; hover_enabled=&#187;0&#8243; sticky_enabled=&#187;0&#8243;][\/et_pb_image][et_pb_text _builder_version=&#187;4.27.7&#8243; _module_preset=&#187;default&#187; hover_enabled=&#187;0&#8243; global_colors_info=&#187;{}&#187; sticky_enabled=&#187;0&#8243;]<p><span>Die Installation dauert etwa zwei Minuten. Das Script l\u00e4uft lokal, ben\u00f6tigt kein <\/span><code dir=\"ltr\"><span>jq<\/span><\/code><span> und verbraucht selbst keine API-Tokens.<\/span><\/p>\n<h2><span>Was zeigt die Claude Code Statusline?<\/span><\/h2>\n<p><span>Die Statusline fasst die Daten zusammen, die ich w\u00e4hrend einer Coding-Session regelm\u00e4\u00dfig brauche:<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<th><span>Anzeige<\/span><\/th>\n<th><span>Bedeutung<\/span><\/th>\n<th><span>Wof\u00fcr ich sie nutze<\/span><\/th>\n<\/tr>\n<tr>\n<td><span>Modell<\/span><\/td>\n<td><code dir=\"ltr\"><span>model.display_name<\/span><\/code><\/td>\n<td><span>Pr\u00fcfen, ob die Session mit dem geplanten Modell l\u00e4uft<\/span><\/td>\n<\/tr>\n<tr>\n<td><span>Git-Branch<\/span><\/td>\n<td><span>Ausgabe von <\/span><code dir=\"ltr\"><span>git branch --show-current<\/span><\/code><\/td>\n<td><span>Verwechslungen zwischen parallelen Tasks vermeiden<\/span><\/td>\n<\/tr>\n<tr>\n<td><span>Context<\/span><\/td>\n<td><code dir=\"ltr\"><span>context_window.used_percentage<\/span><\/code><\/td>\n<td><span>Rechtzeitig verdichten oder eine neue Session beginnen<\/span><\/td>\n<\/tr>\n<tr>\n<td><span>Tokens<\/span><\/td>\n<td><span>Input plus Output im aktuellen Context<\/span><\/td>\n<td><span>Gr\u00f6\u00dfe des aktiven Arbeitskontexts einsch\u00e4tzen<\/span><\/td>\n<\/tr>\n<tr>\n<td><span>Kosten<\/span><\/td>\n<td><code dir=\"ltr\"><span>cost.total_cost_usd<\/span><\/code><\/td>\n<td><span>Gesch\u00e4tzte Session-Kosten bei API-Nutzung beobachten<\/span><\/td>\n<\/tr>\n<tr>\n<td><span>Laufzeit<\/span><\/td>\n<td><code dir=\"ltr\"><span>cost.total_duration_ms<\/span><\/code><\/td>\n<td><span>Sehen, wie lange die Session bereits l\u00e4uft<\/span><\/td>\n<\/tr>\n<tr>\n<td><span>Rate Limits<\/span><\/td>\n<td><span>5-Stunden- und 7-Tage-Fenster<\/span><\/td>\n<td><span>Verbleibende Kapazit\u00e4t bei Pro und Max planen<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span>Die Anzeige aktualisiert sich nach Ereignissen in Claude Code, zum Beispiel nach einer neuen Antwort oder nach <\/span><code dir=\"ltr\"><span>\/compact<\/span><\/code><span>. Anthropic f\u00fchrt die m\u00f6glichen Trigger und alle verf\u00fcgbaren JSON-Felder in der <\/span><a href=\"https:\/\/code.claude.com\/docs\/en\/statusline\"><span>offiziellen Statusline-Dokumentation<\/span><\/a><span> auf.<\/span><\/p>\n<h2><span>Warum ist die Context-Auslastung die wichtigste Zahl?<\/span><\/h2>\n<p><span>Anthropic beschreibt den Context als Arbeitsged\u00e4chtnis des Modells. Darin liegen der Gespr\u00e4chsverlauf, gelesene Dateien, Tool-Ausgaben, Systemanweisungen, CLAUDE.md-Inhalte und geladene Skills.<\/span><\/p>\n<p><span>Mehr Context liefert dem Modell mehr Material. Gleichzeitig sinken bei sehr langen Kontexten oft Genauigkeit und Erinnerungsverm\u00f6gen. Anthropic verwendet daf\u00fcr den Begriff \u201eContext Rot\u201c und erkl\u00e4rt die Ursachen im Beitrag <\/span><a href=\"https:\/\/www.anthropic.com\/engineering\/effective-context-engineering-for-ai-agents\"><span>Effective context engineering for AI agents<\/span><\/a><span>.<\/span><\/p>\n<p><span>Claude Code r\u00e4umt selbst auf, sobald das Context Window an seine Grenze kommt. \u00c4ltere Tool-Ausgaben werden entfernt. Bei Bedarf fasst Claude Code anschlie\u00dfend den bisherigen Verlauf zusammen.<\/span><\/p>\n<p><span>Diese Verdichtung ist hilfreich, aber sie kann Details aus fr\u00fchen Anweisungen verlieren. Anthropic empfiehlt deshalb, dauerhafte Projektregeln in <\/span><code dir=\"ltr\"><span>CLAUDE.md<\/span><\/code><span> zu speichern und bei einem Themenwechsel mit <\/span><code dir=\"ltr\"><span>\/clear<\/span><\/code><span> einen frischen Context zu \u00f6ffnen. Mehr dazu steht in den offiziellen Seiten <\/span><a href=\"https:\/\/code.claude.com\/docs\/en\/context-window\"><span>Explore the context window<\/span><\/a><span> und <\/span><a href=\"https:\/\/code.claude.com\/docs\/en\/best-practices\"><span>Best practices for Claude Code<\/span><\/a><span>.<\/span><\/p>\n<h2><span>Wie lese ich die Context-Ampel?<\/span><\/h2>\n<p><span>Mein Script teilt die Auslastung in drei Bereiche ein. Die Grenzen sind meine Arbeitsregel und keine offizielle Empfehlung von Anthropic.<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><span>Bereich<\/span><\/td>\n<td><span>Anzeige<\/span><\/td>\n<td><span>Mein Vorgehen<\/span><\/td>\n<\/tr>\n<tr>\n<td><span>Unter 70 Prozent<\/span><\/td>\n<td><span>Gr\u00fcn<\/span><\/td>\n<td><span>Normal weiterarbeiten<\/span><\/td>\n<\/tr>\n<tr>\n<td><span>70 bis 89 Prozent<\/span><\/td>\n<td><span>Gelb<\/span><\/td>\n<td><span>Aktuellen Schritt abschlie\u00dfen und Entscheidungen sichern<\/span><\/td>\n<\/tr>\n<tr>\n<td><span>Ab 90 Prozent<\/span><\/td>\n<td><span>Rot<\/span><\/td>\n<td><span>Den n\u00e4chsten gro\u00dfen Task in einer frischen Session starten<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span>Bei Gelb nutze ich bei Bedarf einen fokussierten Compact:<\/span><\/p>\n<pre dir=\"ltr\"><code dir=\"ltr\"><span>\/compact focus on the authentication bug, the chosen fix and all open tests<\/span><\/code><\/pre>\n<p><span>Der Zusatz hilft Claude Code dabei, die passende Information in die Zusammenfassung zu \u00fcbernehmen. Bei einem fachlich neuen Task nutze ich <\/span><code dir=\"ltr\"><span>\/clear<\/span><\/code><span>. So muss das Modell alten Gespr\u00e4chsverlauf nicht bei jeder weiteren Antwort erneut verarbeiten.<\/span><\/p>\n<p><span>Die Prozentzahl sagt wenig \u00fcber die Qualit\u00e4t einzelner Tokens aus. Ein sauberer Context mit 75 Prozent kann besser funktionieren als ein chaotischer Context mit 40 Prozent. Die Anzeige ist ein Fr\u00fchwarnsystem, kein Qualit\u00e4tsmesser.<\/span><\/p>\n<h2><span>Welche Vorteile bringt die Statusline im Alltag?<\/span><\/h2>\n<h3><span>1. Der Context wird sichtbar<\/span><\/h3>\n<p><span>Ohne Statusline merke ich einen \u00fcberf\u00fcllten Context h\u00e4ufig erst an den Symptomen: Claude liest dieselbe Datei erneut, vergisst eine Entscheidung oder zieht eine alte Anforderung heran. Die Prozentanzeige zeigt mir fr\u00fcher, wann ich die Session aufr\u00e4umen sollte.<\/span><\/p>\n<h3><span>2. Modell und Branch stehen direkt nebeneinander<\/span><\/h3>\n<p><span>Bei mehreren Terminal-Tabs ist schnell unklar, welche Session zu welchem Branch geh\u00f6rt. Die Statusline liest den aktuellen Git-Branch aus dem Arbeitsverzeichnis und setzt ihn neben den Modellnamen.<\/span><\/p>\n<h3><span>3. Rate Limits werden planbar<\/span><\/h3>\n<p><span>Pro- und Max-Abonnenten erhalten nach der ersten API-Antwort Daten zum 5-Stunden- und 7-Tage-Fenster. Das Script zeigt die Nutzung samt Reset-Zeitpunkt. Fehlen diese Daten, blendet es die zweite Zeile aus.<\/span><\/p>\n<h3><span>4. Kosten und Laufzeit bekommen einen Platz<\/span><\/h3>\n<p><code dir=\"ltr\"><span>total_cost_usd<\/span><\/code><span> ist eine clientseitige Sch\u00e4tzung und kann von der sp\u00e4teren Abrechnung abweichen. Bei einem Claude.ai-Abo kann der Wert fehlen oder bei null bleiben. F\u00fcr API-Sessions hilft er trotzdem dabei, ein Gef\u00fchl f\u00fcr den Verbrauch einer langen Session zu entwickeln.<\/span><\/p>\n<h3><span>5. Das Script braucht kein jq<\/span><\/h3>\n<p><span>Viele Statusline-Beispiele verwenden <\/span><code dir=\"ltr\"><span>jq<\/span><\/code><span> zum Lesen des JSON-Inputs. Meine Variante nutzt Python und erkennt automatisch <\/span><code dir=\"ltr\"><span>python3<\/span><\/code><span> oder <\/span><code dir=\"ltr\"><span>python<\/span><\/code><span>. Das ist auch in Git Bash praktisch, wo <\/span><code dir=\"ltr\"><span>python3<\/span><\/code><span> manchmal nur auf den Windows Store verweist.<\/span><\/p>\n<h2><span>Wie installiere ich die Statusline?<\/span><\/h2>\n<h3><span>Schritt 1: Script herunterladen<\/span><\/h3>\n<blockquote>\n<p><a href=\"https:\/\/www.obviousworks.ch\/download\/statusline_claude_code.txt\" target=\"_blank\" rel=\"noopener\"><span>statusline Script kostenlos herunterladen (als .txt Datei)<\/span><\/a><\/p>\n<\/blockquote>\n<p><span>und speichere sie unter:<\/span><\/p>\n<pre dir=\"ltr\"><code dir=\"ltr\"><span>~\/.claude\/statusline.sh<\/span><\/code><\/pre>\n<p><span>Auf macOS und Linux steht <\/span><code dir=\"ltr\"><span>~<\/span><\/code><span> f\u00fcr dein Home-Verzeichnis. Unter Windows funktioniert das Script am einfachsten in Git Bash, sofern Python installiert und \u00fcber <\/span><code dir=\"ltr\"><span>python<\/span><\/code><span> oder <\/span><code dir=\"ltr\"><span>python3<\/span><\/code><span> erreichbar ist.<\/span><\/p>\n<h3><span>Schritt 2: Script ausf\u00fchrbar machen<\/span><\/h3>\n<pre dir=\"ltr\"><code dir=\"ltr\"><span>chmod +x ~\/.claude\/statusline.sh<\/span><\/code><\/pre>\n<h3><span>Schritt 3: Claude Code konfigurieren<\/span><\/h3>\n<p><span>Erg\u00e4nze in <\/span><code dir=\"ltr\"><span>~\/.claude\/settings.json<\/span><\/code><span> den Eintrag <\/span><code dir=\"ltr\"><span>statusLine<\/span><\/code><span>:<\/span><\/p>\n<pre dir=\"ltr\"><code dir=\"ltr\"><span>{\n  \"statusLine\": {\n    \"type\": \"command\",\n    \"command\": \"~\/.claude\/statusline.sh\"\n  }\n}<\/span><\/code><\/pre>\n<p><span>Wenn deine Datei bereits weitere Einstellungen enth\u00e4lt, erg\u00e4nzt du nur das Feld <\/span><code dir=\"ltr\"><span>statusLine<\/span><\/code><span>. Achte auf die Kommata zwischen den vorhandenen JSON-Eintr\u00e4gen.<\/span><\/p>\n<h3><span>Schritt 4: N\u00e4chste Interaktion abwarten<\/span><\/h3>\n<p><span>Claude Code l\u00e4dt \u00c4nderungen an den Settings automatisch. Die Anzeige erscheint nach der n\u00e4chsten Interaktion. Rate-Limit-Daten stehen bei Pro und Max erst nach der ersten API-Antwort der Session bereit.<\/span><\/p>\n<p><span>Claude Code kann \u00fcber den Befehl <\/span><code dir=\"ltr\"><span>\/statusline<\/span><\/code><span> auch selbst eine einfache Statusleiste erzeugen. Das Script aus diesem Artikel enth\u00e4lt bereits die farbige Context-Ampel, Git-Branch, Tokenanzeige, Laufzeit und beide Rate-Limit-Fenster.<\/span><\/p>\n<h2><span>Wie funktioniert das Script?<\/span><\/h2>\n<p><span>Claude Code \u00fcbergibt bei jeder Aktualisierung ein JSON-Objekt \u00fcber <\/span><code dir=\"ltr\"><span>stdin<\/span><\/code><span>. Das Script liest diesen Input ein und zerlegt die ben\u00f6tigten Felder mit Python.<\/span><\/p>\n<pre dir=\"ltr\"><code dir=\"ltr\"><span>input=$(cat)<\/span><\/code><\/pre>\n<p><span>Danach sucht es nach einer erreichbaren Python-Version:<\/span><\/p>\n<pre dir=\"ltr\"><code dir=\"ltr\"><span>if python3 -c \"import sys\" &gt;\/dev\/null 2&gt;&amp;1; then\n    PY=python3\nelif python -c \"import sys\" &gt;\/dev\/null 2&gt;&amp;1; then\n    PY=python\nelse\n    PY=\"\"\nfi<\/span><\/code><\/pre>\n<p><span>Der Python-Teil liest unter anderem diese Werte:<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td><span>Variable<\/span><\/td>\n<td><span>JSON-Feld<\/span><\/td>\n<td><span>Bedeutung<\/span><\/td>\n<\/tr>\n<tr>\n<td><code dir=\"ltr\"><span>MODEL<\/span><\/code><\/td>\n<td><code dir=\"ltr\"><span>model.display_name<\/span><\/code><\/td>\n<td><span>Angezeigter Modellname<\/span><\/td>\n<\/tr>\n<tr>\n<td><code dir=\"ltr\"><span>DIR<\/span><\/code><\/td>\n<td><code dir=\"ltr\"><span>workspace.current_dir<\/span><\/code><\/td>\n<td><span>Aktuelles Arbeitsverzeichnis<\/span><\/td>\n<\/tr>\n<tr>\n<td><code dir=\"ltr\"><span>COST<\/span><\/code><\/td>\n<td><code dir=\"ltr\"><span>cost.total_cost_usd<\/span><\/code><\/td>\n<td><span>Gesch\u00e4tzte Session-Kosten in US-Dollar<\/span><\/td>\n<\/tr>\n<tr>\n<td><code dir=\"ltr\"><span>PCT<\/span><\/code><\/td>\n<td><code dir=\"ltr\"><span>context_window.used_percentage<\/span><\/code><\/td>\n<td><span>Belegter Anteil des Context Windows<\/span><\/td>\n<\/tr>\n<tr>\n<td><code dir=\"ltr\"><span>DURATION_MS<\/span><\/code><\/td>\n<td><code dir=\"ltr\"><span>cost.total_duration_ms<\/span><\/code><\/td>\n<td><span>Laufzeit der Session in Millisekunden<\/span><\/td>\n<\/tr>\n<tr>\n<td><code dir=\"ltr\"><span>TOK_IN<\/span><\/code><\/td>\n<td><code dir=\"ltr\"><span>context_window.total_input_tokens<\/span><\/code><\/td>\n<td><span>Input-Tokens im aktuellen Context<\/span><\/td>\n<\/tr>\n<tr>\n<td><code dir=\"ltr\"><span>TOK_OUT<\/span><\/code><\/td>\n<td><code dir=\"ltr\"><span>context_window.total_output_tokens<\/span><\/code><\/td>\n<td><span>Output-Tokens der letzten Antwort<\/span><\/td>\n<\/tr>\n<tr>\n<td><code dir=\"ltr\"><span>RL_5H<\/span><\/code><\/td>\n<td><code dir=\"ltr\"><span>rate_limits.five_hour.used_percentage<\/span><\/code><\/td>\n<td><span>Nutzung des 5-Stunden-Fensters<\/span><\/td>\n<\/tr>\n<tr>\n<td><code dir=\"ltr\"><span>RL_7D<\/span><\/code><\/td>\n<td><code dir=\"ltr\"><span>rate_limits.seven_day.used_percentage<\/span><\/code><\/td>\n<td><span>Nutzung des 7-Tage-Fensters<\/span><\/td>\n<\/tr>\n<tr>\n<td><code dir=\"ltr\"><span>RL_5H_RA<\/span><\/code><\/td>\n<td><code dir=\"ltr\"><span>rate_limits.five_hour.resets_at<\/span><\/code><\/td>\n<td><span>Reset des 5-Stunden-Fensters<\/span><\/td>\n<\/tr>\n<tr>\n<td><code dir=\"ltr\"><span>RL_7D_RA<\/span><\/code><\/td>\n<td><code dir=\"ltr\"><span>rate_limits.seven_day.resets_at<\/span><\/code><\/td>\n<td><span>Reset des 7-Tage-Fensters<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span>Seit Claude Code 2.1.132 sind <\/span><code dir=\"ltr\"><span>total_input_tokens<\/span><\/code><span> und <\/span><code dir=\"ltr\"><span>total_output_tokens<\/span><\/code><span> keine kumulierten Session-Werte mehr. Sie beschreiben den aktuellen Context aus der j\u00fcngsten API-Antwort. Das Script addiert beide Werte f\u00fcr die kompakte Tokenanzeige.<\/span><\/p>\n<p><span>Der Fortschrittsbalken besteht aus zehn Segmenten. Jedes Segment steht f\u00fcr zehn Prozent. ANSI-Farbcodes f\u00e4rben Balken und Rate Limits gr\u00fcn, gelb oder rot.<\/span><\/p>\n<h2><span>Der vollst\u00e4ndige Code f\u00fcr statusline.sh<\/span><\/h2>\n<pre dir=\"ltr\"><code dir=\"ltr\"><span>#!\/usr\/bin\/env bash\n#\n# Claude Code status line by Obvious Works\n# Documentation: https:\/\/code.claude.com\/docs\/en\/statusline\n#\n# Installation:\n#   1. Copy this file to ~\/.claude\/statusline.sh\n#   2. Make it executable: chmod +x ~\/.claude\/statusline.sh\n#   3. Add this to ~\/.claude\/settings.json:\n#      \"statusLine\": {\n#        \"type\": \"command\",\n#        \"command\": \"~\/.claude\/statusline.sh\"\n#      }\n#\n# The script uses Python for JSON parsing, so jq is not required.\n\ninput=$(cat)\n\n# On Git Bash, python3 can be a Windows Store stub. Fall back to python.\nif python3 -c \"import sys\" &gt;\/dev\/null 2&gt;&amp;1; then\n    PY=python3\nelif python -c \"import sys\" &gt;\/dev\/null 2&gt;&amp;1; then\n    PY=python\nelse\n    PY=\"\"\nfi\n\nif [ -n \"$PY\" ]; then\n    JSON=$(printf '%s' \"$input\" | \"$PY\" -c \"\nimport json\nimport sys\nfrom datetime import datetime\n\nd = json.load(sys.stdin)\nm = d.get('model', {})\ncw = d.get('context_window', {})\nc = d.get('cost', {})\nrl = d.get('rate_limits', {})\n\nmodel = m.get('display_name', 'unknown')\ncwd = d.get('workspace', {}).get('current_dir', '') or d.get('cwd', '')\ncost = float(c.get('total_cost_usd', 0) or 0)\npct = int(float(cw.get('used_percentage', 0) or 0))\ndur = int(c.get('total_duration_ms', 0) or 0)\ntok_in = int(cw.get('total_input_tokens', 0) or 0)\ntok_out = int(cw.get('total_output_tokens', 0) or 0)\n\nrl_5h = rl.get('five_hour', {}).get('used_percentage')\nrl_7d = rl.get('seven_day', {}).get('used_percentage')\nrl_5h_s = f'{rl_5h:.0f}' if rl_5h is not None else ''\nrl_7d_s = f'{rl_7d:.0f}' if rl_7d is not None else ''\n\ndef fmt_ts(ts):\n    if ts is None:\n        return ''\n    return datetime.fromtimestamp(int(ts)).strftime('%H:%M %d.%m.%Y')\n\nrl_5h_ra = fmt_ts(rl.get('five_hour', {}).get('resets_at'))\nrl_7d_ra = fmt_ts(rl.get('seven_day', {}).get('resets_at'))\n\nprint(\n    f'{model}|{cwd}|{cost:.4f}|{pct}|{dur}|'\n    f'{tok_in}|{tok_out}|{rl_5h_s}|{rl_7d_s}|{rl_5h_ra}|{rl_7d_ra}'\n)\n\" 2&gt;\/dev\/null)\n\n    IFS='|' read -r MODEL DIR COST PCT DURATION_MS TOK_IN TOK_OUT \\\n        RL_5H RL_7D RL_5H_RA RL_7D_RA &lt;&lt;&lt; \"$JSON\"\nfi\n\nMODEL=${MODEL:-unknown}\nDIR=${DIR:-}\nCOST=${COST:-0.0000}\nPCT=${PCT:-0}\nDURATION_MS=${DURATION_MS:-0}\nTOK_IN=${TOK_IN:-0}\nTOK_OUT=${TOK_OUT:-0}\n\n# Keep malformed or unexpected percentages inside the progress-bar range.\n[ \"$PCT\" -lt 0 ] 2&gt;\/dev\/null &amp;&amp; PCT=0\n[ \"$PCT\" -gt 100 ] 2&gt;\/dev\/null &amp;&amp; PCT=100\n\nCYAN='\\033[36m'\nGREEN='\\033[32m'\nYELLOW='\\033[33m'\nRED='\\033[31m'\nRESET='\\033[0m'\n\nif [ \"$PCT\" -ge 90 ]; then\n    BAR_COLOR=\"$RED\"\nelif [ \"$PCT\" -ge 70 ]; then\n    BAR_COLOR=\"$YELLOW\"\nelse\n    BAR_COLOR=\"$GREEN\"\nfi\n\nFILLED=$((PCT \/ 10))\nEMPTY=$((10 - FILLED))\n[ \"$FILLED\" -gt 0 ] &amp;&amp; printf -v FILL \"%${FILLED}s\" || FILL=\"\"\n[ \"$EMPTY\" -gt 0 ] &amp;&amp; printf -v PAD \"%${EMPTY}s\" || PAD=\"\"\nBAR=\"${FILL\/\/ \/\u2588}${PAD\/\/ \/\u2591}\"\n\nMINS=$((DURATION_MS \/ 60000))\nSECS=$(((DURATION_MS % 60000) \/ 1000))\n\nBRANCH=\"\"\nif [ -n \"$DIR\" ] &amp;&amp; git -C \"$DIR\" rev-parse --git-dir &gt;\/dev\/null 2&gt;&amp;1; then\n    GIT_BRANCH=$(git -C \"$DIR\" branch --show-current 2&gt;\/dev\/null)\n    [ -n \"$GIT_BRANCH\" ] &amp;&amp; BRANCH=\" | \ud83c\udf3f $GIT_BRANCH\"\nfi\n\n# Since Claude Code v2.1.132, these token values describe the current context\n# window from the latest API response, not cumulative session usage.\nTOK_TOTAL=$((TOK_IN + TOK_OUT))\nCOST_FMT=$(printf '$%.4f' \"$COST\")\n\nprintf \"%b\\n\" \\\n    \"${CYAN}[$MODEL]${RESET}${BRANCH} | \ud83e\udde0 ${BAR_COLOR}${BAR}${RESET} ${PCT}% | \ud83d\udd22 ${TOK_TOTAL} tok | \ud83d\udcb0 ${YELLOW}${COST_FMT}${RESET} | \u23f1\ufe0f ${MINS}m ${SECS}s\"\n\n# Anthropic currently exposes rate_limits for Claude.ai Pro\/Max subscribers\n# after the first API response. Either window can be absent.\nif [ -n \"$RL_5H\" ] || [ -n \"$RL_7D\" ]; then\n    RL_LINE=\"\"\n\n    if [ -n \"$RL_5H\" ]; then\n        if [ \"$RL_5H\" -ge 90 ]; then\n            RL_5H_COLOR=\"$RED\"\n        elif [ \"$RL_5H\" -ge 70 ]; then\n            RL_5H_COLOR=\"$YELLOW\"\n        else\n            RL_5H_COLOR=\"$GREEN\"\n        fi\n\n        RL_5H_RESET=\"\"\n        [ -n \"$RL_5H_RA\" ] &amp;&amp; RL_5H_RESET=\" \u21ba ${RL_5H_RA}\"\n        RL_LINE=\"\ud83d\udcca 5h: ${RL_5H_COLOR}${RL_5H}%${RESET}${RL_5H_RESET}\"\n    fi\n\n    if [ -n \"$RL_7D\" ]; then\n        if [ \"$RL_7D\" -ge 90 ]; then\n            RL_7D_COLOR=\"$RED\"\n        elif [ \"$RL_7D\" -ge 70 ]; then\n            RL_7D_COLOR=\"$YELLOW\"\n        else\n            RL_7D_COLOR=\"$GREEN\"\n        fi\n\n        RL_7D_RESET=\"\"\n        [ -n \"$RL_7D_RA\" ] &amp;&amp; RL_7D_RESET=\" \u21ba ${RL_7D_RA}\"\n        [ -n \"$RL_LINE\" ] &amp;&amp; RL_LINE=\"${RL_LINE} | \"\n        RL_LINE=\"${RL_LINE}7d: ${RL_7D_COLOR}${RL_7D}%${RESET}${RL_7D_RESET}\"\n    fi\n\n    printf \"%b\\n\" \"Rate Limits: ${RL_LINE}\"\nfi<\/span><\/code><\/pre>\n<h2><span>Was sollte ich bei den angezeigten Werten beachten?<\/span><\/h2>\n<p><span>Die Cost-Anzeige ist eine Sch\u00e4tzung. Anthropic weist ausdr\u00fccklich darauf hin, dass <\/span><code dir=\"ltr\"><span>total_cost_usd<\/span><\/code><span> von der Rechnung abweichen kann.<\/span><\/p>\n<p><span>Die Rate Limits erscheinen laut aktueller Dokumentation nur bei Claude.ai Pro und Max und erst nach der ersten API-Antwort. Jedes der beiden Zeitfenster kann einzeln fehlen.<\/span><\/p>\n<p><span>Der Context-Prozentwert wird aus den Input-Tokens berechnet. Output-Tokens flie\u00dfen laut Anthropic nicht in <\/span><code dir=\"ltr\"><span>used_percentage<\/span><\/code><span> ein. Die danebenstehende Tokenzahl addiert Input und Output, weshalb sich beide Anzeigen nicht exakt ineinander umrechnen lassen.<\/span><\/p>\n<p><span>Die Statusline l\u00e4uft oft. Teure Befehle wie <\/span><code dir=\"ltr\"><span>git diff<\/span><\/code><span> oder gro\u00dfe Repository-Scans geh\u00f6ren daher nicht hinein. Das Script liest nur den Branch und bleibt auch in gr\u00f6\u00dferen Projekten leicht.<\/span><\/p>\n<h2><span>Wie passe ich die Statusline an?<\/span><\/h2>\n<p><span>Alle sichtbaren Teile stehen in den letzten <\/span><code dir=\"ltr\"><span>printf<\/span><\/code><span>-Befehlen. Du kannst Emojis entfernen, Farben \u00e4ndern oder weitere JSON-Felder ausgeben.<\/span><\/p>\n<p><span>Die aktuelle Anthropic-Dokumentation f\u00fchrt zum Beispiel Session-Name, Claude-Code-Version, Effort-Level, Vim-Modus, Pull-Request-Status und Worktree-Daten auf. Pr\u00fcfe vor einer Erweiterung, ob das Feld in deinem Tarif und deiner Claude-Code-Version vorhanden ist.<\/span><\/p>\n<p><span>F\u00fcr eine schmalere Anzeige reicht zum Beispiel:<\/span><\/p>\n<pre dir=\"ltr\"><code dir=\"ltr\"><span>printf \"%b\\n\" \\\n    \"${CYAN}[$MODEL]${RESET}${BRANCH} | ${BAR_COLOR}${BAR}${RESET} ${PCT}%\"<\/span><\/code><\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>[\/et_pb_text][dsm_card title=&#187;Claude Code Statusline Script&#187; subtitle=&#187;Kostenlos runterladen &#8211; Details im txt File &#8211; Umbenennen nicht vergessen.&#187; badge_text=&#187;Claude Code Cheat Sheet 2026&#8243; badge_url=&#187;https:\/\/www.obviousworks.ch\/download\/statusline_claude_code.txt&#187; button_text=&#187;Hier klicken &#038; kostenlos downloaden&#187; button_url=&#187;https:\/\/www.obviousworks.ch\/download\/CLAUDE.md_Architecture_Guide_2026_ObviousWorks.pdf&#187; button_url_new_window=&#187;on&#187; _builder_version=&#187;4.27.7&#8243; _module_preset=&#187;default&#187; background_color=&#187;#0a0001&#8243; custom_button=&#187;on&#187; button_text_size=&#187;21px&#187; button_text_color=&#187;#F67E28&#8243; button_alignment=&#187;center&#187; background_layout=&#187;dark&#187; link_option_url=&#187;https:\/\/www.obviousworks.ch\/download\/statusline_claude_code.txt&#187; locked=&#187;off&#187; global_colors_info=&#187;{}&#187;][\/dsm_card][et_pb_pricing_tables _builder_version=&#187;4.27.7&#8243; _module_preset=&#187;default&#187; global_module=&#187;987524102&#8243; saved_tabs=&#187;all&#187; global_colors_info=&#187;{}&#187;][et_pb_pricing_table featured=&#187;on&#187; title=&#187;AI Developer Bootcamp&#187; subtitle=&#187;KI-First Ansatz etablieren&#187; button_text=&#187;Zum Hackathon&#187; _builder_version=&#187;4.27.5&#8243; _module_preset=&#187;default&#187; global_colors_info=&#187;{}&#187; sticky_transition=&#187;on&#187;]<p><strong>Ihr startet jetzt mit KI in der Software Entwicklung? Dann ist das AI Developer Bootcamp das Richtige f\u00fcr euch.<\/strong><strong><\/strong><\/p>\n<p id=\"devaihackathonhandsonagentharnesstraining\">In 12 Wochen etablieren wir mit Hands-on Aufgaben und w\u00f6chentlichen Retros in einem blenden-Learning Ansatz neue und stabile KI-Gewohnheiten.<\/p>\n<p>\ud83d\udc49 <strong>Infos &amp; Anmeldung zum AI Developer Bootcamp<\/strong>: <a href=\"https:\/\/www.obviousworks.ch\/schulungen\/ai-developer-bootcamp\/\">obviousworks.ch\/schulungen\/ai-developer-bootcamp<\/a><\/p>[\/et_pb_pricing_table][et_pb_pricing_table title=&#187;Agentic Coding Hackathon&#187; subtitle=&#187;In 2-3 Tagen auf Kurs sein!&#187; button_text=&#187;Zum Hackathon&#187; _builder_version=&#187;4.27.7&#8243; _module_preset=&#187;default&#187; global_colors_info=&#187;{}&#187; sticky_transition=&#187;on&#187;]<p><strong>Du und dein Team habt schon die ersten Schritte Richtung KI gemacht bzw. seid schon gut unterwegs? Dann ist der Agentic Coding Hackathon das Richtige f\u00fcr euch.<\/strong><strong><\/strong><\/p>\n<p id=\"devaihackathonhandsonagentharnesstraining\">In 2-3 Tagen vom Green- zum Brown-Field die neue Rolle des Agentic Harness Engineer kennen und sp\u00fcren lernen. Legt weitere Bausteine Richtung eines stabilen neuen KI-basierten Software Development Prozess?<br \/>\ud83d\udc49 <strong>Infos &amp; Anmeldung zum Hackathon<\/strong>: <a href=\"https:\/\/www.obviousworks.ch\/schulungen\/agentic-coding-hackathon\/\" target=\"_blank\" rel=\"noopener\">https:\/\/www.obviousworks.ch\/schulungen\/agentic-coding-hackathon<\/a><\/p>[\/et_pb_pricing_table][\/et_pb_pricing_tables][et_pb_text _builder_version=&#187;4.27.7&#8243; _module_preset=&#187;default&#187; global_colors_info=&#187;{}&#187;]<p>&nbsp;<\/p>\n<h2><span>Quellen und weiterf\u00fchrende Anthropic-Dokumentation<\/span><\/h2>\n<ol data-spread=\"false\" start=\"1\">\n<li><a href=\"https:\/\/code.claude.com\/docs\/en\/statusline\"><span>Customize your status line, Claude Code Docs<\/span><\/a><\/li>\n<li><a href=\"https:\/\/code.claude.com\/docs\/en\/context-window\"><span>Explore the context window, Claude Code Docs<\/span><\/a><\/li>\n<li><a href=\"https:\/\/code.claude.com\/docs\/en\/best-practices\"><span>Best practices for Claude Code, Claude Code Docs<\/span><\/a><\/li>\n<li><a href=\"https:\/\/www.anthropic.com\/engineering\/effective-context-engineering-for-ai-agents\"><span>Effective context engineering for AI agents, Anthropic Engineering<\/span><\/a><\/li>\n<li><a href=\"https:\/\/docs.anthropic.com\/en\/docs\/build-with-claude\/context-windows\"><span>Context windows, Claude Platform Docs<\/span><\/a><\/li>\n<\/ol>\n<h2><span><\/span><\/h2>\n<h2><span>FAQ zur Claude Code Statusline<\/span><\/h2>\n<h3><span>Verbraucht die Statusline zus\u00e4tzliche Tokens?<\/span><\/h3>\n<p><span>Nein. Anthropic best\u00e4tigt in der Dokumentation, dass das Script lokal l\u00e4uft und selbst keine API-Tokens verbraucht.<\/span><\/p>\n<h3><span>Brauche ich jq?<\/span><\/h3>\n<p><span>Nein. Das Script liest den JSON-Input mit Python. Es sucht zuerst nach <\/span><code dir=\"ltr\"><span>python3<\/span><\/code><span> und verwendet bei Bedarf <\/span><code dir=\"ltr\"><span>python<\/span><\/code><span>.<\/span><\/p>\n<h3><span>Funktioniert das Script unter Windows?<\/span><\/h3>\n<p><span>Ja, am einfachsten in Git Bash mit installiertem Python. F\u00fcr PowerShell zeigt Anthropic eigene Beispiele in der offiziellen Statusline-Dokumentation.<\/span><\/p>\n<h3><span>Warum zeigt die Statusline 0 Dollar?<\/span><\/h3>\n<p><span>Bei Claude.ai-Abos stehen direkte API-Kosten nicht immer bereit. Auch in einer neuen Session kann der Wert zun\u00e4chst fehlen. Das Script setzt fehlende Kosten auf <\/span><code dir=\"ltr\"><span>$0.0000<\/span><\/code><span>.<\/span><\/p>\n<h3><span>Warum sehe ich keine Rate Limits?<\/span><\/h3>\n<p><span>Das Feld <\/span><code dir=\"ltr\"><span>rate_limits<\/span><\/code><span> wird laut Anthropic nur f\u00fcr Claude.ai Pro und Max nach der ersten API-Antwort geliefert. Bei API-basierten Setups oder vor der ersten Antwort bleibt die zweite Zeile leer.<\/span><\/p>\n<h3><span>Ersetzt die Statusline den Befehl <\/span><code dir=\"ltr\"><span>\/context<\/span><\/code><span>?<\/span><\/h3>\n<p><span>Nein. Die Statusline zeigt die Auslastung kompakt. <\/span><code dir=\"ltr\"><span>\/context<\/span><\/code><span> liefert eine Aufschl\u00fcsselung nach Kategorien und Hinweise dazu, welche Inhalte Platz belegen.<\/span><\/p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][et_pb_row column_structure=&#187;1_3,2_3&#8243; admin_label=&#187;Author Matthias&#187; _builder_version=&#187;4.27.4&#8243; _module_preset=&#187;default&#187; saved_tabs=&#187;all&#187; global_colors_info=&#187;{}&#187;][et_pb_column type=&#187;1_3&#8243; _builder_version=&#187;4.27.4&#8243; _module_preset=&#187;default&#187; global_colors_info=&#187;{}&#187;][dsm_tilt_image src=&#187;https:\/\/www.obviousworks.ch\/wp-content\/uploads\/2024\/09\/MH_Trainer_BW_T.png&#187; title_text=&#187;MH_Trainer_BW_T&#187; dsm_tilt_scale=&#187;1.1&#8243; _builder_version=&#187;4.27.4&#8243; _module_preset=&#187;default&#187; transform_rotate=&#187;0deg|0deg|349deg&#187; border_radii=&#187;on|50%|50%|50%|50%&#187; border_width_all=&#187;4px&#187; border_color_all=&#187;#F5FAFE&#187; border_style_all=&#187;double&#187; box_shadow_style=&#187;preset1&#8243; global_colors_info=&#187;{}&#187;][\/dsm_tilt_image][\/et_pb_column][et_pb_column type=&#187;2_3&#8243; _builder_version=&#187;4.27.4&#8243; _module_preset=&#187;default&#187; global_colors_info=&#187;{}&#187;][dsm_dual_heading before_text=&#187;Matthias &#187; middle_text=&#187;(AI Ninja) &#187; _builder_version=&#187;4.27.4&#8243; _module_preset=&#187;default&#187; global_colors_info=&#187;{}&#187;][\/dsm_dual_heading][et_pb_text _builder_version=&#187;4.27.4&#8243; _module_preset=&#187;default&#187; global_colors_info=&#187;{}&#187;]<p><span>Matthias ist mit Herz, Seele und Verstand dabei. Er macht dich, dein Team und deine Firma fit f\u00fcr die Zukunft mit KI!<\/span><\/p>\n<p>Zu Matthias <a href=\"https:\/\/www.obviousworks.ch\/ueber-uns\/trainer-matthias-herbert\/\">Trainerprofil<\/a><br \/>Zu seinem <a href=\"https:\/\/www.linkedin.com\/in\/matthiasherbert\/\" target=\"_blank\" rel=\"noopener\">LinkedIn Profil<\/a><\/p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][\/et_pb_section]\n","protected":false},"excerpt":{"rendered":"<p>Eine Claude-Code-Session kann lange sauber laufen und sp\u00e4ter Details \u00fcbersehen, die am Anfang noch pr\u00e4sent waren. Das Modell blieb gleich. Sein Arbeitskontext hat sich ver\u00e4ndert. Genau daf\u00fcr habe ich mir eine eigene Statusline gebaut. Sie zeigt mir w\u00e4hrend der Arbeit, wie voll der Context ist, welches Modell l\u00e4uft, auf welchem Git-Branch ich arbeite und wann meine Rate Limits zur\u00fcckgesetzt werden. So sieht sie in einer laufenden Session aus: [Sonnet 5] | \ud83c\udf3f main | \ud83e\udde0 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2591\u2591\u2591 72% | \ud83d\udd22 143820 tok | \ud83d\udcb0 $1.8420 | \u23f1\ufe0f 48m 12s Rate Limits: \ud83d\udcca 5h: 64% \u21ba 17:30 24.07.2026 | 7d: 37% \u21ba 17:30 31.07.2026 &nbsp; &nbsp;<div class=\"et_pb_module dsm_card dsm_card_0 et_clickable et_pb_bg_layout_dark  dsm_card_layout_stacked\">\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t<div class=\"et_pb_module_inner\">\n\t\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t<div class=\"et_pb_module dsm_card_wrapper et_pb_text_align_left\">\n\t\t\t\t\t\n\t\t\t\t\t<h4 class=\"dsm_card_title et_pb_module_header\">Claude Code Statusline Script<\/h4>\n\t\t\t\t\t<div class=\"dsm_card_subtitle\">Kostenlos runterladen - Details im txt File - Umbenennen nicht vergessen.<\/div>\n\t\t\t\t\t\n\t\t\t\t\t<div class=\"et_pb_button_wrapper\"><a class=\"et_pb_button et_pb_more_button \" href=\"https:\/\/www.obviousworks.ch\/download\/CLAUDE.md_Architecture_Guide_2026_ObviousWorks.pdf\" target=\"_blank\">Hier klicken &#038; kostenlos downloaden<\/a><\/div>\n\t\t\t\t<\/div>\n\t\t\t\n\t\t\t\t<\/div>\n\t\t\t<\/div>Die Installation dauert etwa zwei Minuten. Das Script l\u00e4uft lokal, ben\u00f6tigt kein jq und verbraucht selbst keine API-Tokens. Was zeigt die Claude Code Statusline? Die Statusline fasst die Daten zusammen, die ich w\u00e4hrend einer Coding-Session regelm\u00e4\u00dfig brauche: Anzeige Bedeutung Wof\u00fcr ich sie nutze Modell model.display_name Pr\u00fcfen, ob die Session mit dem geplanten Modell l\u00e4uft Git-Branch Ausgabe von git [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":987524177,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"on","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[32],"tags":[125,181,182],"class_list":["post-987524168","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ai","tag-claude-code","tag-claude-code-statusline","tag-claude-statusline"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Claude Code Statusline einrichten: Script zum Download - Obvious Works [EN]<\/title>\n<meta name=\"description\" content=\"Mit dieser Claude Code Statusline siehst du Context-Auslastung, Modell, Git-Branch, Tokens, Kosten, Laufzeit und Rate Limits direkt im Terminal. Mit fertigem Bash-Script und Anleitung.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.obviousworks.ch\/en\/claude-code-statusline-context-costs-rate-limits\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Claude Code Statusline einrichten: Script zum Download - Obvious Works [EN]\" \/>\n<meta property=\"og:description\" content=\"Mit dieser Claude Code Statusline siehst du Context-Auslastung, Modell, Git-Branch, Tokens, Kosten, Laufzeit und Rate Limits direkt im Terminal. Mit fertigem Bash-Script und Anleitung.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.obviousworks.ch\/en\/claude-code-statusline-context-costs-rate-limits\/\" \/>\n<meta property=\"og:site_name\" content=\"Obvious Works\" \/>\n<meta property=\"article:published_time\" content=\"2026-07-24T12:41:37+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-07-24T12:41:38+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.obviousworks.ch\/wp-content\/uploads\/2026\/07\/Best-Whiteboard-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1375\" \/>\n\t<meta property=\"og:image:height\" content=\"825\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"obviousworks_boss\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"obviousworks_boss\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.obviousworks.ch\\\/claude-code-statusline-context-kosten-rate-limits\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.obviousworks.ch\\\/claude-code-statusline-context-kosten-rate-limits\\\/\"},\"author\":{\"name\":\"obviousworks_boss\",\"@id\":\"https:\\\/\\\/www.obviousworks.ch\\\/#\\\/schema\\\/person\\\/c2c4552bf4b637b0762c2b518b63636b\"},\"headline\":\"Claude Code Statusline einrichten: Script zum Download\",\"datePublished\":\"2026-07-24T12:41:37+00:00\",\"dateModified\":\"2026-07-24T12:41:38+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.obviousworks.ch\\\/claude-code-statusline-context-kosten-rate-limits\\\/\"},\"wordCount\":2141,\"publisher\":{\"@id\":\"https:\\\/\\\/www.obviousworks.ch\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.obviousworks.ch\\\/claude-code-statusline-context-kosten-rate-limits\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.obviousworks.ch\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/Best-Whiteboard-1.png\",\"keywords\":[\"Claude Code\",\"claude code statusline\",\"claude statusline\"],\"articleSection\":[\"AI\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.obviousworks.ch\\\/claude-code-statusline-context-kosten-rate-limits\\\/\",\"url\":\"https:\\\/\\\/www.obviousworks.ch\\\/claude-code-statusline-context-kosten-rate-limits\\\/\",\"name\":\"Claude Code Statusline einrichten: Script zum Download - Obvious Works [EN]\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.obviousworks.ch\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.obviousworks.ch\\\/claude-code-statusline-context-kosten-rate-limits\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.obviousworks.ch\\\/claude-code-statusline-context-kosten-rate-limits\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.obviousworks.ch\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/Best-Whiteboard-1.png\",\"datePublished\":\"2026-07-24T12:41:37+00:00\",\"dateModified\":\"2026-07-24T12:41:38+00:00\",\"description\":\"Mit dieser Claude Code Statusline siehst du Context-Auslastung, Modell, Git-Branch, Tokens, Kosten, Laufzeit und Rate Limits direkt im Terminal. Mit fertigem Bash-Script und Anleitung.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.obviousworks.ch\\\/claude-code-statusline-context-kosten-rate-limits\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.obviousworks.ch\\\/claude-code-statusline-context-kosten-rate-limits\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.obviousworks.ch\\\/claude-code-statusline-context-kosten-rate-limits\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.obviousworks.ch\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/Best-Whiteboard-1.png\",\"contentUrl\":\"https:\\\/\\\/www.obviousworks.ch\\\/wp-content\\\/uploads\\\/2026\\\/07\\\/Best-Whiteboard-1.png\",\"width\":1375,\"height\":825},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.obviousworks.ch\\\/claude-code-statusline-context-kosten-rate-limits\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.obviousworks.ch\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Claude Code Statusline einrichten: Script zum Download\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.obviousworks.ch\\\/#website\",\"url\":\"https:\\\/\\\/www.obviousworks.ch\\\/\",\"name\":\"Obvious Works\",\"description\":\"Dein Partner f\u00fcr KI, Requirements &amp; Agilit\u00e4t\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.obviousworks.ch\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.obviousworks.ch\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.obviousworks.ch\\\/#organization\",\"name\":\"Obvious Works\",\"url\":\"https:\\\/\\\/www.obviousworks.ch\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.obviousworks.ch\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.obviousworks.ch\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/cropped-9952_ObviousWorks_Logo_DA_01.png\",\"contentUrl\":\"https:\\\/\\\/www.obviousworks.ch\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/cropped-9952_ObviousWorks_Logo_DA_01.png\",\"width\":2980,\"height\":1164,\"caption\":\"Obvious Works\"},\"image\":{\"@id\":\"https:\\\/\\\/www.obviousworks.ch\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/linkedin.com\\\/company\\\/obviousworks\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.obviousworks.ch\\\/#\\\/schema\\\/person\\\/c2c4552bf4b637b0762c2b518b63636b\",\"name\":\"obviousworks_boss\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/87c044a8ef70725f45cd4b2c9c8a3978a0d195f587d69a8af9fe63cb57728c37?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/87c044a8ef70725f45cd4b2c9c8a3978a0d195f587d69a8af9fe63cb57728c37?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/87c044a8ef70725f45cd4b2c9c8a3978a0d195f587d69a8af9fe63cb57728c37?s=96&d=mm&r=g\",\"caption\":\"obviousworks_boss\"},\"sameAs\":[\"https:\\\/\\\/www.obviousworks.ch\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Claude Code Statusline einrichten: Script zum Download - Obvious Works [EN]","description":"With this Claude Code Statusline, you can view context usage, model, Git branch, tokens, costs, runtime, and rate limits right in the terminal. Includes a ready-to-use Bash script and instructions.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.obviousworks.ch\/en\/claude-code-statusline-context-costs-rate-limits\/","og_locale":"en_US","og_type":"article","og_title":"Claude Code Statusline einrichten: Script zum Download - Obvious Works [EN]","og_description":"Mit dieser Claude Code Statusline siehst du Context-Auslastung, Modell, Git-Branch, Tokens, Kosten, Laufzeit und Rate Limits direkt im Terminal. Mit fertigem Bash-Script und Anleitung.","og_url":"https:\/\/www.obviousworks.ch\/en\/claude-code-statusline-context-costs-rate-limits\/","og_site_name":"Obvious Works","article_published_time":"2026-07-24T12:41:37+00:00","article_modified_time":"2026-07-24T12:41:38+00:00","og_image":[{"width":1375,"height":825,"url":"https:\/\/www.obviousworks.ch\/wp-content\/uploads\/2026\/07\/Best-Whiteboard-1.png","type":"image\/png"}],"author":"obviousworks_boss","twitter_card":"summary_large_image","twitter_misc":{"Written by":"obviousworks_boss","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.obviousworks.ch\/claude-code-statusline-context-kosten-rate-limits\/#article","isPartOf":{"@id":"https:\/\/www.obviousworks.ch\/claude-code-statusline-context-kosten-rate-limits\/"},"author":{"name":"obviousworks_boss","@id":"https:\/\/www.obviousworks.ch\/#\/schema\/person\/c2c4552bf4b637b0762c2b518b63636b"},"headline":"Claude Code Statusline einrichten: Script zum Download","datePublished":"2026-07-24T12:41:37+00:00","dateModified":"2026-07-24T12:41:38+00:00","mainEntityOfPage":{"@id":"https:\/\/www.obviousworks.ch\/claude-code-statusline-context-kosten-rate-limits\/"},"wordCount":2141,"publisher":{"@id":"https:\/\/www.obviousworks.ch\/#organization"},"image":{"@id":"https:\/\/www.obviousworks.ch\/claude-code-statusline-context-kosten-rate-limits\/#primaryimage"},"thumbnailUrl":"https:\/\/www.obviousworks.ch\/wp-content\/uploads\/2026\/07\/Best-Whiteboard-1.png","keywords":["Claude Code","claude code statusline","claude statusline"],"articleSection":["AI"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.obviousworks.ch\/claude-code-statusline-context-kosten-rate-limits\/","url":"https:\/\/www.obviousworks.ch\/claude-code-statusline-context-kosten-rate-limits\/","name":"Claude Code Statusline einrichten: Script zum Download - Obvious Works [EN]","isPartOf":{"@id":"https:\/\/www.obviousworks.ch\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.obviousworks.ch\/claude-code-statusline-context-kosten-rate-limits\/#primaryimage"},"image":{"@id":"https:\/\/www.obviousworks.ch\/claude-code-statusline-context-kosten-rate-limits\/#primaryimage"},"thumbnailUrl":"https:\/\/www.obviousworks.ch\/wp-content\/uploads\/2026\/07\/Best-Whiteboard-1.png","datePublished":"2026-07-24T12:41:37+00:00","dateModified":"2026-07-24T12:41:38+00:00","description":"With this Claude Code Statusline, you can view context usage, model, Git branch, tokens, costs, runtime, and rate limits right in the terminal. Includes a ready-to-use Bash script and instructions.","breadcrumb":{"@id":"https:\/\/www.obviousworks.ch\/claude-code-statusline-context-kosten-rate-limits\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.obviousworks.ch\/claude-code-statusline-context-kosten-rate-limits\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.obviousworks.ch\/claude-code-statusline-context-kosten-rate-limits\/#primaryimage","url":"https:\/\/www.obviousworks.ch\/wp-content\/uploads\/2026\/07\/Best-Whiteboard-1.png","contentUrl":"https:\/\/www.obviousworks.ch\/wp-content\/uploads\/2026\/07\/Best-Whiteboard-1.png","width":1375,"height":825},{"@type":"BreadcrumbList","@id":"https:\/\/www.obviousworks.ch\/claude-code-statusline-context-kosten-rate-limits\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.obviousworks.ch\/"},{"@type":"ListItem","position":2,"name":"Claude Code Statusline einrichten: Script zum Download"}]},{"@type":"WebSite","@id":"https:\/\/www.obviousworks.ch\/#website","url":"https:\/\/www.obviousworks.ch\/","name":"Obvious Works","description":"Your partner for AI, requirements &amp; agility","publisher":{"@id":"https:\/\/www.obviousworks.ch\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.obviousworks.ch\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.obviousworks.ch\/#organization","name":"Obvious Works","url":"https:\/\/www.obviousworks.ch\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.obviousworks.ch\/#\/schema\/logo\/image\/","url":"https:\/\/www.obviousworks.ch\/wp-content\/uploads\/2023\/01\/cropped-9952_ObviousWorks_Logo_DA_01.png","contentUrl":"https:\/\/www.obviousworks.ch\/wp-content\/uploads\/2023\/01\/cropped-9952_ObviousWorks_Logo_DA_01.png","width":2980,"height":1164,"caption":"Obvious Works"},"image":{"@id":"https:\/\/www.obviousworks.ch\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/linkedin.com\/company\/obviousworks"]},{"@type":"Person","@id":"https:\/\/www.obviousworks.ch\/#\/schema\/person\/c2c4552bf4b637b0762c2b518b63636b","name":"obviousworks_boss","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/87c044a8ef70725f45cd4b2c9c8a3978a0d195f587d69a8af9fe63cb57728c37?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/87c044a8ef70725f45cd4b2c9c8a3978a0d195f587d69a8af9fe63cb57728c37?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/87c044a8ef70725f45cd4b2c9c8a3978a0d195f587d69a8af9fe63cb57728c37?s=96&d=mm&r=g","caption":"obviousworks_boss"},"sameAs":["https:\/\/www.obviousworks.ch"]}]}},"_links":{"self":[{"href":"https:\/\/www.obviousworks.ch\/en\/wp-json\/wp\/v2\/posts\/987524168","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.obviousworks.ch\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.obviousworks.ch\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.obviousworks.ch\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.obviousworks.ch\/en\/wp-json\/wp\/v2\/comments?post=987524168"}],"version-history":[{"count":7,"href":"https:\/\/www.obviousworks.ch\/en\/wp-json\/wp\/v2\/posts\/987524168\/revisions"}],"predecessor-version":[{"id":987524182,"href":"https:\/\/www.obviousworks.ch\/en\/wp-json\/wp\/v2\/posts\/987524168\/revisions\/987524182"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.obviousworks.ch\/en\/wp-json\/wp\/v2\/media\/987524177"}],"wp:attachment":[{"href":"https:\/\/www.obviousworks.ch\/en\/wp-json\/wp\/v2\/media?parent=987524168"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.obviousworks.ch\/en\/wp-json\/wp\/v2\/categories?post=987524168"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.obviousworks.ch\/en\/wp-json\/wp\/v2\/tags?post=987524168"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}