statusline
Use when configuring, previewing, troubleshooting, or disabling the Claude Code statusline plugin.
What this skill does
# Statusline
Use this skill to help configure and troubleshoot the statusline plugin.
## Workflow
1. Inspect the existing statusline config and scripts before changing settings.
2. For setup, choose layout, visible sections, context display style, icon theme, and separator.
3. Update the user's Claude settings only when requested or clearly part of setup.
4. Preview the generated statusline command with representative session input.
5. For troubleshooting, check provider detection, rate-limit fields, and empty-section hiding.
## Applying a Template
When the user selects a template (via `/statusline:setup` or `/statusline:config`), apply it by:
1. Read the template JSON from `scripts/templates/<name>.json` within this plugin directory.
2. Write the template contents to `~/.claude/statusline.config.json`.
3. Preview the result with the test command.
**Template apply example** (for "minimal" template):
```bash
# Find the plugin directory
PLUGIN_DIR="$(find ~/.claude -path '*/statusline/scripts/templates' -type d 2>/dev/null | head -1)"
# If not found via plugin install, check the source repo
if [ -z "$PLUGIN_DIR" ]; then
PLUGIN_DIR="$HOME/project/claude-plugins/statusline/scripts/templates"
fi
# Copy template to config
cp "$PLUGIN_DIR/minimal.json" ~/.claude/statusline.config.json
```
Or use the Write tool to copy the template contents directly:
```json
// ~/.claude/statusline.config.json — written from minimal.json template
{
"line_format": "1",
"separator": "dot",
"context_style": "compact",
"icon_style": "minimal",
"show_context": true,
"show_rate_limits": true,
"show_git_branch": true,
"show_tools": false,
"show_agents": false,
"show_cache": false,
"show_session": false,
"show_reasoning": true,
"color_style": "colorful"
}
```
### All Template Contents (inline for reference)
**detailed.json** (default):
```json
{"line_format":"3","separator":"arrow","context_style":"progress_bar","icon_style":"emoji","show_context":true,"show_rate_limits":true,"show_git_branch":true,"show_tools":true,"show_agents":true,"show_cache":true,"show_session":true,"show_reasoning":true,"color_style":"colorful"}
```
**balanced.json**:
```json
{"line_format":"2","separator":"arrow","context_style":"tokens","icon_style":"unicode","show_context":true,"show_rate_limits":true,"show_git_branch":true,"show_tools":true,"show_agents":true,"show_cache":true,"show_session":true,"show_reasoning":true,"color_style":"colorful"}
```
**minimal.json**:
```json
{"line_format":"1","separator":"dot","context_style":"compact","icon_style":"minimal","show_context":true,"show_rate_limits":true,"show_git_branch":true,"show_tools":false,"show_agents":false,"show_cache":false,"show_session":false,"show_reasoning":true,"color_style":"colorful"}
```
**monitor.json**:
```json
{"line_format":"2","separator":"pipe","context_style":"progress_bar","icon_style":"emoji","show_context":true,"show_rate_limits":true,"show_git_branch":true,"show_tools":false,"show_agents":false,"show_cache":true,"show_session":true,"show_reasoning":true,"color_style":"colorful"}
```
**developer.json**:
```json
{"line_format":"2","separator":"arrow","context_style":"tokens","icon_style":"unicode","show_context":true,"show_rate_limits":true,"show_git_branch":true,"show_tools":true,"show_agents":true,"show_cache":true,"show_session":true,"show_reasoning":true,"color_style":"colorful"}
```
**performance.json**:
```json
{"line_format":"3","separator":"arrow","context_style":"progress_bar","icon_style":"emoji","show_context":true,"show_rate_limits":true,"show_git_branch":true,"show_tools":false,"show_agents":false,"show_cache":true,"show_session":true,"show_reasoning":true,"color_style":"colorful"}
```
## Dual-Provider Support
The statusline automatically adapts to two model providers:
| Feature | Anthropic Claude | z.ai GLM |
|---------|-----------------|----------|
| **Model name** | `opus-4.8[200k]` | `glm-5.1[1m]` |
| **Rate limits** | 5h/7d from JSON payload | May be empty (n/a) |
| **Cache stats** | ✅ Real prompt caching data | ❌ Hidden (proxy artifacts) |
| **Context window** | From JSON payload | From JSON payload |
| **Effort level** | low/medium/high/max | low/medium/high/max |
| **Session duration** | File-based tracker | File-based tracker |
| **Tools/agents** | Process detection | Process detection |
## Configuration
Config file: `~/.claude/statusline.config.json`
### Config Fields
| Field | Values | Default | Description |
|-------|--------|---------|-------------|
| `line_format` | `"1"`, `"2"`, `"3"` | `"3"` | Number of output lines |
| `separator` | `"arrow"`, `"pipe"`, `"dot"`, `"slash"` | `"arrow"` | Section separator character |
| `context_style` | `"progress_bar"`, `"tokens"`, `"compact"` | `"progress_bar"` | How context usage is displayed |
| `icon_style` | `"emoji"`, `"unicode"`, `"minimal"` | `"emoji"` | Icon theme for section labels |
| `show_cache` | `true/false` | `true` | Cache hit rate (Anthropic only, hidden for GLM) |
| `show_session` | `true/false` | `true` | Session duration tracker |
| `show_reasoning` | `true/false` | `true` | Effort level next to model name |
| `show_context` | `true/false` | `true` | Token count and percentage |
| `show_rate_limits` | `true/false` | `true` | API usage metrics |
| `show_git_branch` | `true/false` | `true` | Current git branch |
| `show_tools` | `true/false` | `true` | Running MCP servers |
| `show_agents` | `true/false` | `true` | Running agent count |
## Template Presets
Located in `scripts/templates/`:
| Template | Lines | Icon | Context | Best For |
|----------|-------|------|---------|----------|
| **detailed** | 3 | emoji | progress_bar | Full visibility (default) |
| **balanced** | 2 | unicode | tokens | Quick overview |
| **minimal** | 1 | none | compact | Maximum space efficiency |
| **monitor** | 2 | emoji | progress_bar | Rate-limit tracking |
| **developer** | 2 | unicode | tokens | Tools + agents + git |
| **performance** | 3 | emoji | progress_bar | Cache + context optimization |
## Files
- Commands live in `commands/`.
- Hook configuration lives in `hooks/hooks.json`.
- Runtime scripts live in `scripts/`.
- Templates live in `scripts/templates/`.
- Main renderer: `scripts/statusline.py`.
- Live script: `~/.claude/statusline-command.sh`.
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.