statusline-setup
Configure Claude Code's statusline with a Powerlevel10k-inspired theme showing directory, git branch, lines changed, and context usage progress bar.
What this skill does
# Statusline Configuration Skill
## Overview
This skill configures Claude Code's statusline with a Powerlevel10k-inspired theme that displays:
- **Shortened directory** - Shows `~/currentDir` format
- **Git branch** - Displays branch name with `` icon
- **Lines changed** - Shows additions (green `+N`) and deletions (red `-N`)
- **Context usage** - Progress bar with gradient shading (green/yellow/red)
- **Rate limit usage** - 5-hour quota progress bar with reset countdown (e.g. `[██ ] 23% · 2h 15m left`)
## Pre-Installation Checks
Before installing, you MUST check for existing configurations:
### 1. Check for existing statusline configuration
Read `~/.claude/settings.json` and check if a `statusLine` key already exists.
### 2. Check for existing statusline script
Check if `~/.claude/statusline-command.sh` already exists.
### 3. Handle existing configuration
**If either an existing `statusLine` configuration OR an existing script is found:**
Use the `AskUserQuestion` tool to ask the user:
```
Question: "You already have a statusline configuration. Do you want to replace it with the Powerlevel10k-inspired theme?"
Options:
- "Yes, replace it" - Proceed with installation
- "No, keep my current setup" - Abort installation
```
**If the user chooses to replace AND an existing script file exists at a different path:**
Use the `AskUserQuestion` tool to ask:
```
Question: "Should I delete your old statusline script?"
Options:
- "Yes, delete it" - Delete the old script file
- "No, keep it" - Leave the old script file in place
```
**If the user chooses not to replace:** Stop here and inform the user that the existing configuration has been preserved.
---
## Installation Instructions
Follow these steps to configure the statusline:
### Step 1: Write the statusline script
Write the following bash script to `~/.claude/statusline-command.sh`:
```bash
#!/bin/bash
# Read JSON input from stdin
input=$(cat)
# Extract current working directory
cwd=$(echo "$input" | jq -r '.workspace.current_dir')
# Shortened directory format: ~/currentDir
home="$HOME"
if [[ "$cwd" == "$home" ]]; then
short_dir="~"
elif [[ "$cwd" == "$home"/* ]]; then
short_dir="~/$(basename "$cwd")"
else
short_dir="$(basename "$cwd")"
fi
# Get git branch
cd "$cwd" 2>/dev/null || true
git_branch=$(git symbolic-ref --short HEAD 2>/dev/null || echo '')
git_status_str=""
if [ -n "$git_branch" ]; then
git_status_str=" $git_branch"
fi
# Get Claude's session lines added/removed
lines_added=$(echo "$input" | jq -r '.cost.total_lines_added // 0')
lines_removed=$(echo "$input" | jq -r '.cost.total_lines_removed // 0')
lines_added_str=""
lines_removed_str=""
[ "$lines_added" != "0" ] && lines_added_str="+$lines_added"
[ "$lines_removed" != "0" ] && lines_removed_str="-$lines_removed"
# Extract context used percentage and create progress bar
context_used=$(echo "$input" | jq -r '.context_window.used_percentage // empty')
context_str=""
if [ -n "$context_used" ]; then
used_int=$(printf "%.0f" "$context_used")
if (( $(echo "$context_used < 50" | bc -l) )); then
bar_color=$'\033[32m' # Green for 0-50%
elif (( $(echo "$context_used < 75" | bc -l) )); then
bar_color=$'\033[33m' # Yellow for 50-75%
else
bar_color=$'\033[31m' # Red for 75-100%
fi
bar_length=10
total_blocks=$(echo "$context_used * $bar_length / 100" | bc -l)
full_blocks=$(printf "%.0f" "$(echo "$total_blocks" | bc -l | awk '{print int($1)}')")
fraction=$(echo "$total_blocks - $full_blocks" | bc -l)
shade_char=""
if (( $(echo "$fraction >= 0.875" | bc -l) )); then
shade_char="█"
full_blocks=$((full_blocks + 1))
elif (( $(echo "$fraction >= 0.625" | bc -l) )); then
shade_char="▓"
elif (( $(echo "$fraction >= 0.375" | bc -l) )); then
shade_char="▒"
elif (( $(echo "$fraction >= 0.125" | bc -l) )); then
shade_char="░"
fi
bar=$'\033[0m'"["
bar+="${bar_color}"
for ((i=0; i<full_blocks; i++)); do bar+="█"; done
[ -n "$shade_char" ] && [ "$full_blocks" -lt "$bar_length" ] && bar+="$shade_char"
bar+=$'\033[0m'
current_length=$full_blocks
[ -n "$shade_char" ] && [ "$full_blocks" -lt "$bar_length" ] && current_length=$((current_length + 1))
empty=$((bar_length - current_length))
for ((i=0; i<empty; i++)); do bar+=" "; done
bar+="]"
context_str=" $bar ${used_int}%"
fi
# Extract 5-hour rate limit data
rate_used=$(echo "$input" | jq -r '.rate_limits.five_hour.used_percentage // empty')
rate_resets_at=$(echo "$input" | jq -r '.rate_limits.five_hour.resets_at // empty')
rate_str=""
if [ -n "$rate_used" ]; then
rate_int=$(printf "%.0f" "$rate_used")
if (( $(echo "$rate_used < 50" | bc -l) )); then
rate_color=$'\033[32m' # Green for 0-50%
elif (( $(echo "$rate_used < 75" | bc -l) )); then
rate_color=$'\033[33m' # Yellow for 50-75%
else
rate_color=$'\033[31m' # Red for 75-100%
fi
bar_length=10
total_blocks=$(echo "$rate_used * $bar_length / 100" | bc -l)
full_blocks=$(printf "%.0f" "$(echo "$total_blocks" | bc -l | awk '{print int($1)}')")
fraction=$(echo "$total_blocks - $full_blocks" | bc -l)
shade_char=""
if (( $(echo "$fraction >= 0.875" | bc -l) )); then
shade_char="█"
full_blocks=$((full_blocks + 1))
elif (( $(echo "$fraction >= 0.625" | bc -l) )); then
shade_char="▓"
elif (( $(echo "$fraction >= 0.375" | bc -l) )); then
shade_char="▒"
elif (( $(echo "$fraction >= 0.125" | bc -l) )); then
shade_char="░"
fi
rate_bar=$'\033[0m'"["
rate_bar+="${rate_color}"
for ((i=0; i<full_blocks; i++)); do rate_bar+="█"; done
[ -n "$shade_char" ] && [ "$full_blocks" -lt "$bar_length" ] && rate_bar+="$shade_char"
rate_bar+=$'\033[0m'
current_length=$full_blocks
[ -n "$shade_char" ] && [ "$full_blocks" -lt "$bar_length" ] && current_length=$((current_length + 1))
empty=$((bar_length - current_length))
for ((i=0; i<empty; i++)); do rate_bar+=" "; done
rate_bar+="]"
time_str=""
if [ -n "$rate_resets_at" ]; then
now=$(date +%s)
remaining_secs=$((rate_resets_at - now))
if [ "$remaining_secs" -gt 0 ]; then
hours=$((remaining_secs / 3600))
mins=$(( (remaining_secs % 3600) / 60 ))
if [ "$hours" -gt 0 ]; then
time_str=" · ${hours}h ${mins}m left"
else
time_str=" · ${mins}m left"
fi
fi
fi
rate_str=" $rate_bar ${rate_int}%${time_str}"
fi
# Output
printf "\033[36m%s\033[0m" "$short_dir"
[ -n "$git_status_str" ] && printf "\033[34m%s\033[0m" "$git_status_str"
if [ -n "$lines_added_str" ] || [ -n "$lines_removed_str" ]; then
printf " "
[ -n "$lines_added_str" ] && printf "\033[32m%s\033[0m" "$lines_added_str"
[ -n "$lines_added_str" ] && [ -n "$lines_removed_str" ] && printf " "
[ -n "$lines_removed_str" ] && printf "\033[31m%s\033[0m" "$lines_removed_str"
fi
[ -n "$context_str" ] && printf "\033[33m%s\033[0m" "$context_str"
[ -n "$rate_str" ] && printf "\033[33m%s\033[0m" "$rate_str"
```
### Step 2: Make the script executable
```bash
chmod +x ~/.claude/statusline-command.sh
```
### Step 3: Update settings.json
Add or merge the following configuration into `~/.claude/settings.json`:
```json
{
"statusLine": {
"type": "command",
"command": "~/.claude/statusline-command.sh"
}
}
```
If the file already exists, merge the `statusLine` key into the existing configuration.
## Verification
After installation:
1. Restart Claude Code
2. The statusline should appear at the bottom showing:
- Current directory in cyan
- Git branch with icon in blue (if in a git repo)
- Lines added/removed in green/red (if there are changes)
- Context usage progress bar with percentage
- 5-hour rate limit bar with reset countdown (e.g. `[█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.