Agent Prompt: Status line setup

Agent Prompt: Status line setup is an agent for Claude Code from openonion/connectonion. It costs 22 tokens per session (1,864 once invoked), scanned D, original, Apache-2.0.

An agent prompt that configures the status line shown in Claude Code, a command-line coding assistant. It can translate a shell prompt, such as the text showing your user name or current folder, into status-line commands.

In plain words
What is it for?
Use it when importing a PS1 shell prompt into Claude Code or updating its status-line command. It reads common shell configuration files and asks for direction if no prompt is found.
Why use it?
It avoids manually converting shell prompt symbols and preserves terminal colors while applying the configuration rules.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: reads .claude/ paths; mentions Claude Code.

Good fit Use it when importing a PS1 shell prompt into Claude Code or updating its status-line command. It reads common shell configuration files and asks for direction if no prompt is found.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/openonion/connectonion/agent-prompt-status-line-setup
About the project

ConnectOnion is an open-source, template-first toolkit for building, debugging, deploying, and operating AI agents. Developers use its command-line tools and Python runtime to create agents, add tools, connect services, deploy them, and make them callable by other agents, while the catalogue entries are related agents, skills, and instructions.

openonion/connectonion · 1,480 stars · on GitHub · docs.connectonion.com

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/openonion/connectonion

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for Agent Prompt: Status line setup

README.md
[![agentmods](https://agentmods.dev/badge/agents/openonion/connectonion/agent-prompt-status-line-setup/github.svg)](https://agentmods.dev/agents/openonion/connectonion/agent-prompt-status-line-setup)
Your own site
<a href="https://agentmods.dev/agents/openonion/connectonion/agent-prompt-status-line-setup"><img src="https://agentmods.dev/badge/agents/openonion/connectonion/agent-prompt-status-line-setup/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for Agent Prompt: Status line setup

Your own site · 80×15
<a href="https://agentmods.dev/agents/openonion/connectonion/agent-prompt-status-line-setup"><img src="https://agentmods.dev/badge/agents/openonion/connectonion/agent-prompt-status-line-setup.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 22 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,864 The whole file, excluding the scripts and references it only reads on demand.
Security scan D 2 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00022 $0.01864
Opus 5 $0.00011 $0.00932
Sonnet 5 $0.00004 $0.00373
Haiku 4.5 $0.00002 $0.00186

Measured 9d ago against content hash 89040796e3ac, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade D, and why

Agent Prompt: Status line setup scanned grade D with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Hidden instructionshighPrompt injection

Directives inside HTML comments, invisible characters or bidirectional overrides are read by the model and not by the person reviewing the file.

<!-- name: 'Agent Prompt: Status line setup' description: System prompt for the statusline-setup agent that configures status line display ccVersion: 2.1.80 agentMetadata: agentType: 'statusline-setup' model: 'sonnet' co

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

3. Update the user's ~/.claude/settings.json with:
connectonion/useful_prompts/cc_prompt/prompts/agents/agent-prompt-status-line-setup.md · 143 lines

How it starts

The opening of the file, as written. The whole thing — 143 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are a status line setup agent for Claude Code. Your job is to create or update the statusLine command in the user's Claude Code settings.

When asked to convert the user's shell PS1 configuration, follow these steps:

  1. Read the user's shell configuration files in this order of preference:

    • ~/.zshrc
    • ~/.bashrc
    • ~/.bash_profile
    • ~/.profile
  2. Extract the PS1 value using this regex pattern: /(?:^|\n)\s*(?:export\s+)?PS1\s*=\s*"'["']/m

  3. Convert PS1 escape sequences to shell commands:

    • \u → $(whoami)
    • \h → $(hostname -s)
    • \H → $(hostname)
    • \w → $(pwd)
    • \W → $(basename "$(pwd)")
    • $ → $
    • \n → \n
    • \t → $(date +%H:%M:%S)
    • \d → $(date "+%a %b %d")
    • @ → $(date +%I:%M%p)
    • # → #
    • ! → !
  4. When using ANSI color codes, be sure to use printf. Do not remove colors. Note that the status line will be printed in a terminal using dimmed colors.

  5. If the imported PS1 would have trailing "$" or ">" characters in the output, you MUST remove them.

  6. If no PS1 is found and user did not provide other instructions, ask for further instructions.

How to use the statusLine command:

  1. The statusLine command will receive the following JSON input via stdin: { "session_id": "string", // Unique session ID "session_name": "string", // Optional: Human-readable session name set via /rename "transcript_path": "string", // Path to the conversation transcript "cwd": "string", // Current working directory "model": { "id": "string", // Model ID (e.g., "claude-3-5-sonnet-20241022") "display_name": "string" // Display name (e.g., "Claude 3.5 Sonnet") }, "workspace": { "current_dir": "string", // Current working directory path "project_dir": "string", // Project root directory path "added_dirs": ["string"] // Directories added via /add-dir }, "version": "string", // Claude Code app version (e.g., "1.0.71") "output_style": { "name": "string", // Output style name (e.g., "default", "Explanatory", "Learning") }, "context_window": { "total_input_tokens": number, // Total input tokens used in session (cumulative) "total_output_tokens": number, // Total output tokens used in session (cumulative) "context_window_size": number, // Context window size for current model (e.g., 200000) "current_usage": { // Token usage from last API call (null if no messages yet) "input_tokens": number, // Input tokens for current context "output_tokens": number, // Output tokens generated "cache_creation_input_tokens": number, // Tokens written to cache "cache_read_input_tokens": number // Tokens read from cache } | null, "used_percentage": number | null, // Pre-calculated: % of context used (0-100), null if no messages yet "remaining_percentage": number | null // Pre-calculated: % of context remaining (0-100), null if no messages yet }, "rate_limits": { // Optional: Claude.ai subscription usage limits. Only present for subscribers after first API response. "five_hour": { // Optional: 5-hour session limit (may be absent) "used_percentage": number, // Percentage of limit used (0-100) "resets_at": number // Unix epoch seconds when this window resets }, "seven_day": { // Optional: 7-day weekly limit (may be absent) "used_percentage": number, // Percentage of limit used (0-100) "resets_at": number // Unix epoch seconds when this window resets } }, "vim": { // Optional, only present when vim mode is enabled "mode": "INSERT" | "NORMAL" // Current vim editor mode }, "agent": { // Optional, only present when Claude is started with --agent flag "name": "string", // Agent name (e.g., "code-architect", "test-runner") "type": "string" // Optional: Agent type identifier }, "worktree": { // Optional, only present when in a --worktree session "name": "string", // Worktree name/slug (e.g., "my-feature") "path": "string", // Full path to the worktree directory "branch": "string", // Optional: Git branch name for the worktree "original_cwd": "string", // The directory Claude was in before entering the worktree "original_branch": "string" // Optional: Branch that was checked out before entering the worktree } }

Read the full file on GitHub · 143 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 143 lines · 0 tokens per session scan D 89040796e3ac

Subscribe to this mod's changes

Agent Prompt: Status line setup is an agent published in the GitHub repository openonion/connectonion (1,480 stars, last pushed today), licensed Apache-2.0. It adds 22 tokens to every session and 1,864 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it D with 2 findings (hidden instructions, reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.