segment-docs

segment-docs is a skill for Claude Code, Codex from JanDeDobbeleer/oh-my-posh. It costs 59 tokens per session (1,054 once invoked), scanned A, original, MIT.

A reference guide that maps Oh My Posh's Go source code to its user-facing documentation. Oh My Posh is a tool that customizes terminal prompts, and Go is the programming language used for the referenced source code.

In plain words
What is it for?
Use it when creating, updating, or checking documentation for Oh My Posh prompt segments, their configuration options, and template properties.
Why use it?
It helps documentation writers determine an option's name, type, and default value from the code instead of guessing.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit Use it when creating, updating, or checking documentation for Oh My Posh prompt segments, their configuration options, and template properties.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jandedobbeleer/oh-my-posh/segment-docs
About the project

oh-my-posh is a customizable prompt theme engine that renders command-line prompts across shells and platforms. Developers and terminal users use it to configure primary, secondary, right, and transient prompts in shells such as PowerShell, zsh, Bash, and cmd. The catalogue entries provide skills, instructions, agents, and an MCP integration for working with oh-my-posh.

JanDeDobbeleer/oh-my-posh · 23,433 stars · on GitHub · ohmyposh.dev

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.

Any agent
npx skills add JanDeDobbeleer/oh-my-posh --skill segment-docs
Clone the repo
git clone --depth 1 https://github.com/JanDeDobbeleer/oh-my-posh

Made for: Claude Code, Codex.

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 segment-docs

README.md
[![agentmods](https://agentmods.dev/badge/skills/jandedobbeleer/oh-my-posh/segment-docs.svg)](https://agentmods.dev/skills/jandedobbeleer/oh-my-posh/segment-docs)
Your own site
<a href="https://agentmods.dev/skills/jandedobbeleer/oh-my-posh/segment-docs"><img src="https://agentmods.dev/badge/skills/jandedobbeleer/oh-my-posh/segment-docs.svg" alt="Measured on agentmods" height="20"></a>
Per session 59 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,054 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Snyk pass 7 Sept 2026
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00059 $0.01054
Opus 5 $0.00030 $0.00527
Sonnet 5 $0.00012 $0.00211
Haiku 4.5 $0.00006 $0.00105

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

Security

Grade A, and why

segment-docs scanned grade A with 0 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 8d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/segment-docs/SKILL.md · 116 lines

How it starts

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

Segment Documentation Reference

Go-to-Documentation Type Mapping

When reading a segment's Go source to document its options, determine the type from the Provider method used to read the option value:

Go method call Documentation type
options.Bool(option, default) boolean
options.String(option, default) string
options.StringArray(option, default) []string
options.Int(option, default) int
options.Float64(option, default) float64
options.KeyValueMap(option, default) map[string]string
options.Color(option, default) string
options.Template(option, default, ctx) string
options.Any(option, default) any

Extracting Options from Go Source

Options are declared as options.Option string constants in the segment's const block:

const (
    BranchIcon    options.Option = "branch_icon"    // option name used in config
    NativeStatus  options.Option = "native_status"
)

The option name is the string literal value (e.g., "branch_icon").

The type and default value come from the getter call in Enabled() or init-like methods:

s.icon = s.options.String(BranchIcon, "\uE0A0")
//                  ^^^^^^ → string type, "\uE0A0" → default

Shared options

The following options are defined in src/segments/options/map.go and available to all segments without appearing in a segment-specific const block:

Option name Type Default
always_enabled boolean false
display_default boolean true
display_error boolean true
http_timeout int 20
cache_duration int varies
access_token string ""
refresh_token string ""
version_url_template string ""
files []string varies

Extracting Template Properties from Go Source

Template properties are values available inside the segment's template string.

Read the full file on GitHub · 116 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. 8d ago First seen · 116 lines · 59 tokens per session scan A 10aadc204fd3

Subscribe to this mod's changes

segment-docs is a skill published in the GitHub repository JanDeDobbeleer/oh-my-posh (23,433 stars, last pushed yesterday), licensed MIT. It adds 59 tokens to every session and 1,054 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

golang-style

Go conventions specific to this author. Use before writing or editing any Go (.go) file.

fredrikaverpil/dotfiles · 23 tokens

scaffold-go

Scaffold a complete Go project with CI/CD, release pipeline, Makefile, sr.yaml, .envrc, and standard files. Uses go toolchain and make as the native build system. Loads on top of scaffold-project (run that first for cross-language standard files). Use when creating a new Go CLI, service, or module, or when the user…

urmzd/dotfiles · 116 tokens

golang-testing

Production-ready Golang tests — table-driven tests, testify suites and mocks, parallel tests, fuzzing, fixtures, goroutine leak detection with goleak, snapshot testing, code coverage, integration tests, idiomatic test naming. Use when writing or reviewing Go tests, choosing a testing approach, setting up Go test CI…

samber/cc-skills-golang · 115 tokens

golang-uber-fx

Golang application framework using uber-go/fx — fx.New, fx.Provide, fx.Invoke, fx.Module, fx.Lifecycle hooks, fx.Annotate (name/group/As), fx.Decorate, fx.Supply, fx.Replace, fx.WithLogger, and signal-aware Run(). Apply when using or adopting uber-go/fx, when the codebase imports go.uber.org/fx, or when wiring…

samber/cc-skills-golang · 122 tokens

golang-samber-oops

Structured error handling in Golang with samber/oops — error builders, stack traces, error codes, error context, error wrapping, error attributes, user-facing vs developer messages, panic recovery, and logger integration. Apply when using or adopting samber/oops, or when the codebase already imports…

samber/cc-skills-golang · 74 tokens

ax-go-agent-optimize

Use when writing Go code with github.com/ax-llm/ax/packages/go for agent optimization, verified agent-playbook evolution, evaluators, judges, optimizer artifacts, BootstrapFewShot, and GEPA.

ax-llm/ax · 51 tokens