Status Line Meta Skill
🚨 MANDATORY: Invoke docs-management First
STOP - Before providing ANY response about status line configuration:
- INVOKE
docs-management skill
- QUERY for the user's specific topic
- BASE all responses EXCLUSIVELY on official documentation loaded
Skipping this step results in outdated or incorrect information.
Verification Checkpoint
Before responding, verify:
If ANY checkbox is unchecked, STOP and invoke docs-management first.
Overview
Central authority for Claude Code status line configuration. This skill uses 100% delegation to docs-management - it contains NO duplicated official documentation.
Architecture: Pure delegation with keyword registry. All official documentation is accessed via docs-management skill queries.
When to Use This Skill
Keywords: status line, statusline, /statusline command, custom status line, status line configuration, statusLine setting, status line script, status line JSON input, model display, workspace info, cost tracking display, session info display, ANSI colors status line, git-aware status line, PS1-style prompt
Use this skill when:
- Creating custom status lines
- Configuring status line settings
- Understanding status line JSON input structure
- Writing status line scripts (Bash, Python, Node.js)
- Adding git information to status line
- Styling status lines with ANSI colors
- Troubleshooting status line issues
- Displaying model, cost, or workspace information
Keyword Registry for docs-management Queries
Use these keywords when querying docs-management skill for official documentation:
Status Line Fundamentals
| Topic |
Keywords |
| Overview |
"status line", "statusline", "custom status line" |
| Purpose |
"status line purpose", "contextual information display" |
| Behavior |
"status line update", "status line refresh rate" |
Configuration Methods
| Topic |
Keywords |
| Slash Command |
"/statusline command", "statusline setup" |
| Settings |
"statusLine setting", "settings.json statusLine" |
| Command Type |
"statusLine type command", "status line command config" |
| Padding |
"statusLine padding", "status line edge" |
JSON Input Structure
| Topic |
Keywords |
| Input Format |
"status line JSON input", "statusline stdin JSON" |
| Model Info |
"status line model", "model display_name", "model id" |
| Workspace Info |
"status line workspace", "current_dir", "project_dir" |
| Session Info |
"status line session_id", "transcript_path" |
| Cost Info |
"status line cost", "total_cost_usd", "lines_added" |
| Version Info |
"status line version", "output_style" |
| Context Usage |
"used_percentage", "remaining_percentage", "context window usage", "context capacity" |
Script Examples
| Topic |
Keywords |
| Bash Scripts |
"status line bash script", "statusline.sh" |
| Python Scripts |
"status line python", "statusline python example" |
| Node.js Scripts |
"status line nodejs", "statusline javascript" |
| Helper Functions |
"status line helper functions", "statusline helpers" |
Git Integration
| Topic |
Keywords |
| Git-Aware Status |
"git-aware status line", "git branch status line" |
| Git Branch Display |
"status line git branch", "show git branch" |
Styling and Display
| Topic |
Keywords |
| ANSI Colors |
"status line ANSI", "status line colors", "styling status line" |
| Emojis |
"status line emojis", "status line icons" |
| Concise Display |
"status line concise", "fit on one line" |
Troubleshooting
| Topic |
Keywords |
| Not Appearing |
"status line not appearing", "statusline troubleshooting" |
| Executable Issues |
"status line chmod", "script not executable" |
| Output Issues |
"status line stdout", "statusline stderr" |
| Testing |
"test status line script", "mock JSON input" |
Quick Decision Tree
What do you want to do?
- Create a status line quickly -> Query docs-management: "/statusline command", "statusline setup"
- Configure status line in settings -> Query docs-management: "statusLine setting", "settings.json statusLine"
- Understand JSON input -> Query docs-management: "status line JSON input", "statusline stdin JSON"
- Show model information -> Query docs-management: "status line model", "model display_name"
- Show cost/usage -> Query docs-management: "status line cost", "total_cost_usd"
- Add git branch -> Query docs-management: "git-aware status line", "git branch status line"
- Write bash script -> Query docs-management: "status line bash script", "statusline.sh"
- Write Python script -> Query docs-management: "status line python", "statusline python example"
- Add colors -> Query docs-management: "status line ANSI", "status line colors"
- Fix status line issues -> Query docs-management: "statusline troubleshooting", "status line not appearing"
Topic Coverage
Status Line Configuration
- /statusline slash command for quick setup
- statusLine setting in settings.json
- Command type configuration
- Padding configuration (edge alignment)
- Script path specification
JSON Input Data
- hook_event_name (always "Status")
- session_id (current session identifier)
- transcript_path (path to transcript file)
- cwd (current working directory)
- model object (id and display_name)
- workspace object (current_dir and project_dir)
- version (Claude Code version)
- output_style object (current style name)
- cost object (usage metrics)
Cost Tracking Fields
- total_cost_usd (session cost)
- total_duration_ms (session duration)
- total_api_duration_ms (API call time)
- total_lines_added (lines added)
- total_lines_removed (lines removed)
Script Implementation Patterns
- Bash with jq for JSON parsing
- Python with json module
- Node.js with JSON.parse
- Helper function patterns for complex scripts
- Reading from stdin
- Outputting to stdout (first line only)
Git Integration Patterns
- Detecting git repository
- Reading current branch
- Branch display formatting
- Error handling for non-git directories
Styling Approaches
- ANSI color code support
- Emoji usage for visual indicators
- Concise formatting (one line)
- Information density considerations
Update Behavior
- Updates on conversation message changes
- 300ms rate limiting
- First line of stdout becomes status text
- ANSI color code preservation
Delegation Patterns
Standard Query Pattern
User asks: "How do I create a custom status line?"
1. Invoke docs-management skill
2. Use keywords: "/statusline command", "custom status line"
3. Load official documentation
4. Provide guidance based EXCLUSIVELY on official docs
Multi-Topic Query Pattern
User asks: "I want a status line showing git branch and cost"
1. Invoke docs-management skill with multiple queries:
- "git-aware status line", "git branch status line"
- "status line cost", "total_cost_usd"
2. Synthesize guidance from official documentation
Troubleshooting Pattern
User reports: "My status line script isn't showing up"
1. Invoke docs-management skill
2. Use keywords: "statusline troubleshooting", "status line not appearing"
3. Check official docs for common issues
4. Guide user through troubleshooting steps
Troubleshooting Quick Reference
| Issue |
Keywords for docs-management |
| Status line not appearing |
"statusline troubleshooting", "status line not appearing" |
| Script not executable |
"status line chmod", "script not executable" |
| Wrong output |
"status line stdout", "first line output" |
| JSON parsing errors |
"status line JSON input", "jq parsing" |
| Colors not working |
"status line ANSI", "terminal colors" |
| Git branch not showing |
"git-aware status line", "git branch display" |
| Slow updates |
"status line update", "rate limiting" |
| Settings not applied |
"statusLine setting", "settings.json" |
Repository-Specific Notes
This repository does not currently use custom status lines. Status line documentation is relevant for:
- Understanding status line customization options
- Potential custom status line creation for development workflows
- Understanding session information available via JSON input
When working with status line topics, always use the docs-management skill to access official documentation.
Auditing Status Lines
This skill provides the validation criteria used by the statusline-auditor agent for formal audits.
Audit Resources
| Resource |
Location |
Purpose |
| Audit Framework |
references/audit-framework.md |
Query guides and scoring criteria |
Scoring Categories
| Category |
Points |
Key Criteria |
| Script Structure |
25 |
Valid script, shebang, executable |
| JSON Handling |
25 |
Correct JSON input parsing |
| Output Format |
25 |
Proper terminal formatting, colors |
| Cross-Platform |
25 |
Works on Windows, macOS, Linux |
Thresholds: 85+ = PASS, 70-84 = PASS WITH WARNINGS, <70 = FAIL
Related Agent
The statusline-auditor agent (Haiku model) performs formal audits using this skill:
- Auto-loads this skill via
skills: status-line-customization
- Uses audit framework and docs-management for rules
- Generates structured audit reports
- Invoked by
/audit-statuslines command
External Technology Validation
When auditing status line scripts that use external technologies (scripts, packages, runtimes), the auditor MUST validate claims using MCP servers before flagging findings.
Technologies Requiring MCP Validation:
- .NET/C# scripts: Validate with microsoft-learn + perplexity
- Node.js/npm packages: Validate with context7 + perplexity
- Python scripts/packages: Validate with context7 + perplexity
- Shell scripts: Validate with perplexity
- Any version-specific claims: ALWAYS validate with perplexity
Validation Rule:
Never flag a technology usage as incorrect without first:
- Querying appropriate MCP server(s) for current documentation
- Verifying with perplexity for recent changes (especially .NET 10+)
- Documenting MCP sources in the finding
Stale Data Warning:
- microsoft-learn can return cached/outdated documentation
- ALWAYS pair microsoft-learn with perplexity for version verification
- Trust perplexity for version numbers and recently-released features
References
Official Documentation (via docs-management skill):
- Primary: "statusline" documentation
- Related: "settings", "terminal-config", "output-styles"
Repository-Specific:
- Status line settings:
.claude/settings.json (statusLine setting)
- Custom scripts:
~/.claude/statusline.sh (user-level)
Version History
Last Updated
Date: 2026-01-16
Model: claude-opus-4-5-20251101
1---2name: status-line-customization3description: Central authority for Claude Code status line configuration. Covers custom status line creation, /statusline command, status line settings (statusLine in settings.json), JSON input structure (model, workspace, cost, session info), status line scripts (Bash, Python, Node.js), terminal color codes, git-aware status lines, helper functions, and status line troubleshooting. Supports creating custom status lines, configuring status line behavior, and displaying contextual session information. Delegates 100% to docs-management skill for official documentation.4---5
6# Status Line Meta Skill
7
8> ## 🚨 MANDATORY: Invoke docs-management First
9>
10> **STOP - Before providing ANY response about status line configuration:**
11>
12> 1. **INVOKE** `docs-management` skill
13> 2. **QUERY** for the user's specific topic
14> 3. **BASE** all responses EXCLUSIVELY on official documentation loaded
15>
16> **Skipping this step results in outdated or incorrect information.**
17>
18> ### Verification Checkpoint
19>
20> Before responding, verify:
21>
22> - [ ] Did I invoke docs-management skill?
23> - [ ] Did official documentation load?
24> - [ ] Is my response based EXCLUSIVELY on official docs?
25>
26> If ANY checkbox is unchecked, STOP and invoke docs-management first.
27
28## Overview
29
30Central authority for Claude Code status line configuration. This skill uses **100% delegation to docs-management** - it contains NO duplicated official documentation.
31
32**Architecture:** Pure delegation with keyword registry. All official documentation is accessed via docs-management skill queries.
33
34## When to Use This Skill
35
36**Keywords:** status line, statusline, /statusline command, custom status line, status line configuration, statusLine setting, status line script, status line JSON input, model display, workspace info, cost tracking display, session info display, ANSI colors status line, git-aware status line, PS1-style prompt
37
38**Use this skill when:**
39
40- Creating custom status lines
41- Configuring status line settings
42- Understanding status line JSON input structure
43- Writing status line scripts (Bash, Python, Node.js)
44- Adding git information to status line
45- Styling status lines with ANSI colors
46- Troubleshooting status line issues
47- Displaying model, cost, or workspace information
48
49## Keyword Registry for docs-management Queries
50
51Use these keywords when querying docs-management skill for official documentation:
52
53### Status Line Fundamentals
54
55| Topic | Keywords |
56| --- | --- |
57| Overview | "status line", "statusline", "custom status line" |
58| Purpose | "status line purpose", "contextual information display" |
59| Behavior | "status line update", "status line refresh rate" |
60
61### Configuration Methods
62
63| Topic | Keywords |
64| --- | --- |
65| Slash Command | "/statusline command", "statusline setup" |
66| Settings | "statusLine setting", "settings.json statusLine" |
67| Command Type | "statusLine type command", "status line command config" |
68| Padding | "statusLine padding", "status line edge" |
69
70### JSON Input Structure
71
72| Topic | Keywords |
73| --- | --- |
74| Input Format | "status line JSON input", "statusline stdin JSON" |
75| Model Info | "status line model", "model display_name", "model id" |
76| Workspace Info | "status line workspace", "current_dir", "project_dir" |
77| Session Info | "status line session_id", "transcript_path" |
78| Cost Info | "status line cost", "total_cost_usd", "lines_added" |
79| Version Info | "status line version", "output_style" |
80| Context Usage | "used_percentage", "remaining_percentage", "context window usage", "context capacity" |
81
82### Script Examples
83
84| Topic | Keywords |
85| --- | --- |
86| Bash Scripts | "status line bash script", "statusline.sh" |
87| Python Scripts | "status line python", "statusline python example" |
88| Node.js Scripts | "status line nodejs", "statusline javascript" |
89| Helper Functions | "status line helper functions", "statusline helpers" |
90
91### Git Integration
92
93| Topic | Keywords |
94| --- | --- |
95| Git-Aware Status | "git-aware status line", "git branch status line" |
96| Git Branch Display | "status line git branch", "show git branch" |
97
98### Styling and Display
99
100| Topic | Keywords |
101| --- | --- |
102| ANSI Colors | "status line ANSI", "status line colors", "styling status line" |
103| Emojis | "status line emojis", "status line icons" |
104| Concise Display | "status line concise", "fit on one line" |
105
106### Troubleshooting
107
108| Topic | Keywords |
109| --- | --- |
110| Not Appearing | "status line not appearing", "statusline troubleshooting" |
111| Executable Issues | "status line chmod", "script not executable" |
112| Output Issues | "status line stdout", "statusline stderr" |
113| Testing | "test status line script", "mock JSON input" |
114
115## Quick Decision Tree
116
117**What do you want to do?**
118
1191. **Create a status line quickly** -> Query docs-management: "/statusline command", "statusline setup"
1202. **Configure status line in settings** -> Query docs-management: "statusLine setting", "settings.json statusLine"
1213. **Understand JSON input** -> Query docs-management: "status line JSON input", "statusline stdin JSON"
1224. **Show model information** -> Query docs-management: "status line model", "model display_name"
1235. **Show cost/usage** -> Query docs-management: "status line cost", "total_cost_usd"
1246. **Add git branch** -> Query docs-management: "git-aware status line", "git branch status line"
1257. **Write bash script** -> Query docs-management: "status line bash script", "statusline.sh"
1268. **Write Python script** -> Query docs-management: "status line python", "statusline python example"
1279. **Add colors** -> Query docs-management: "status line ANSI", "status line colors"
12810. **Fix status line issues** -> Query docs-management: "statusline troubleshooting", "status line not appearing"
129
130## Topic Coverage
131
132### Status Line Configuration
133
134- /statusline slash command for quick setup
135- statusLine setting in settings.json
136- Command type configuration
137- Padding configuration (edge alignment)
138- Script path specification
139
140### JSON Input Data
141
142- hook_event_name (always "Status")
143- session_id (current session identifier)
144- transcript_path (path to transcript file)
145- cwd (current working directory)
146- model object (id and display_name)
147- workspace object (current_dir and project_dir)
148- version (Claude Code version)
149- output_style object (current style name)
150- cost object (usage metrics)
151
152### Cost Tracking Fields
153
154- total_cost_usd (session cost)
155- total_duration_ms (session duration)
156- total_api_duration_ms (API call time)
157- total_lines_added (lines added)
158- total_lines_removed (lines removed)
159
160### Script Implementation Patterns
161
162- Bash with jq for JSON parsing
163- Python with json module
164- Node.js with JSON.parse
165- Helper function patterns for complex scripts
166- Reading from stdin
167- Outputting to stdout (first line only)
168
169### Git Integration Patterns
170
171- Detecting git repository
172- Reading current branch
173- Branch display formatting
174- Error handling for non-git directories
175
176### Styling Approaches
177
178- ANSI color code support
179- Emoji usage for visual indicators
180- Concise formatting (one line)
181- Information density considerations
182
183### Update Behavior
184
185- Updates on conversation message changes
186- 300ms rate limiting
187- First line of stdout becomes status text
188- ANSI color code preservation
189
190## Delegation Patterns
191
192### Standard Query Pattern
193
194```text
195User asks: "How do I create a custom status line?"
196
1971. Invoke docs-management skill
1982. Use keywords: "/statusline command", "custom status line"
1993. Load official documentation
2004. Provide guidance based EXCLUSIVELY on official docs
201```
202
203### Multi-Topic Query Pattern
204
205```text
206User asks: "I want a status line showing git branch and cost"
207
2081. Invoke docs-management skill with multiple queries:
209 - "git-aware status line", "git branch status line"
210 - "status line cost", "total_cost_usd"
2112. Synthesize guidance from official documentation
212```
213
214### Troubleshooting Pattern
215
216```text
217User reports: "My status line script isn't showing up"
218
2191. Invoke docs-management skill
2202. Use keywords: "statusline troubleshooting", "status line not appearing"
2213. Check official docs for common issues
2224. Guide user through troubleshooting steps
223```
224
225## Troubleshooting Quick Reference
226
227| Issue | Keywords for docs-management |
228| --- | --- |
229| Status line not appearing | "statusline troubleshooting", "status line not appearing" |
230| Script not executable | "status line chmod", "script not executable" |
231| Wrong output | "status line stdout", "first line output" |
232| JSON parsing errors | "status line JSON input", "jq parsing" |
233| Colors not working | "status line ANSI", "terminal colors" |
234| Git branch not showing | "git-aware status line", "git branch display" |
235| Slow updates | "status line update", "rate limiting" |
236| Settings not applied | "statusLine setting", "settings.json" |
237
238## Repository-Specific Notes
239
240This repository does not currently use custom status lines. Status line documentation is relevant for:
241
242- Understanding status line customization options
243- Potential custom status line creation for development workflows
244- Understanding session information available via JSON input
245
246When working with status line topics, always use the docs-management skill to access official documentation.
247
248## Auditing Status Lines
249
250This skill provides the validation criteria used by the `statusline-auditor` agent for formal audits.
251
252### Audit Resources
253
254| Resource | Location | Purpose |
255| --- | --- | --- |
256| Audit Framework | `references/audit-framework.md` | Query guides and scoring criteria |
257
258### Scoring Categories
259
260| Category | Points | Key Criteria |
261| --- | --- | --- |
262| Script Structure | 25 | Valid script, shebang, executable |
263| JSON Handling | 25 | Correct JSON input parsing |
264| Output Format | 25 | Proper terminal formatting, colors |
265| Cross-Platform | 25 | Works on Windows, macOS, Linux |
266
267**Thresholds:** 85+ = PASS, 70-84 = PASS WITH WARNINGS, <70 = FAIL
268
269### Related Agent
270
271The `statusline-auditor` agent (Haiku model) performs formal audits using this skill:
272
273- Auto-loads this skill via `skills: status-line-customization`
274- Uses audit framework and docs-management for rules
275- Generates structured audit reports
276- Invoked by `/audit-statuslines` command
277
278### External Technology Validation
279
280When auditing status line scripts that use external technologies (scripts, packages, runtimes), the auditor MUST validate claims using MCP servers before flagging findings.
281
282**Technologies Requiring MCP Validation:**
283
284- .NET/C# scripts: Validate with microsoft-learn + perplexity
285- Node.js/npm packages: Validate with context7 + perplexity
286- Python scripts/packages: Validate with context7 + perplexity
287- Shell scripts: Validate with perplexity
288- Any version-specific claims: ALWAYS validate with perplexity
289
290**Validation Rule:**
291
292Never flag a technology usage as incorrect without first:
293
2941. Querying appropriate MCP server(s) for current documentation
2952. Verifying with perplexity for recent changes (especially .NET 10+)
2963. Documenting MCP sources in the finding
297
298**Stale Data Warning:**
299
300- microsoft-learn can return cached/outdated documentation
301- ALWAYS pair microsoft-learn with perplexity for version verification
302- Trust perplexity for version numbers and recently-released features
303
304## References
305
306**Official Documentation (via docs-management skill):**
307
308- Primary: "statusline" documentation
309- Related: "settings", "terminal-config", "output-styles"
310
311**Repository-Specific:**
312
313- Status line settings: `.claude/settings.json` (statusLine setting)
314- Custom scripts: `~/.claude/statusline.sh` (user-level)
315
316## Version History
317
318- **v1.1.0** (2026-01-16): Added v2.1.6+ keyword registry entries
319 - Added context usage fields (used_percentage, remaining_percentage)
320
321- **v1.0.0** (2025-11-26): Initial release
322 - Pure delegation architecture
323 - Comprehensive keyword registry
324 - Quick decision tree
325 - Topic coverage for all status line features
326 - Troubleshooting quick reference
327
328---
329
330## Last Updated
331
332**Date:** 2026-01-16
333**Model:** claude-opus-4-5-20251101