Agent skill

Segment Docs

by JanDeDobbeleer in JanDeDobbeleer/oh-my-posh

Reference mapping between Oh My Posh Go segment source code and MDX documentation.

MITAuto-check passedDocuments & Office

Install Segment Docs

skills CLI
$ npx skills add JanDeDobbeleer/oh-my-posh --skill segment-docs -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install JanDeDobbeleer/oh-my-posh segment-docs --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/JanDeDobbeleer/oh-my-posh.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/segment-docs .claude/skills/segment-docs && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
segment-docs
GitHub stars
24k
Token cost
~1.1k tokens
SKILL.md length
343 words
Files
1
Skills in repo
11
Repo updated
First seen
Licence
MIT

At a glance

Reference mapping between Oh My Posh Go segment source code and MDX documentation.

  • Auditing segment documentation
  • SKILL.md covers Go-to-Documentation Type Mapping, Extracting Options from Go…, Extracting Template Properties… and Key Source Files for Inherited…
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Reading segment Go code and needing to understand how code constructs map to user-facing options

What it does

Segment Docs is an agent skill from JanDeDobbeleer/oh-my-posh. Reference mapping between Oh My Posh Go segment source code and MDX documentation. Use when creating, updating, or auditing segment documentation, or when reading segment Go code and needing to understand how code constructs map to user-facing options, template properties, and type representations in docs.

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Documents & Office, covering Markdown. It works with Bash. The repository describes itself as: The most customisable and low-latency cross platform/shell prompt renderer. The licence is MIT.

When your agent uses it

  • Auditing segment documentation
  • Reading segment Go code and needing to understand how code constructs map to user-facing options
  • Template properties
  • Type representations in docs

Example prompts

  • “/segment-docs”

What it can do on your machine

Read from SKILL.md and the folder at commit 1d6bd96. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are go and mdx).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Segment Docs loads about 1.1k tokens when it runs. Until then it costs about 80 tokens; SKILL.md has 343 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~80
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from JanDeDobbeleer/oh-my-posh at commit 1d6bd96, republished under its MIT licence (© JanDeDobbeleer). 343 words, ~1,066 tokens.

Download SKILL.mdSave it as .claude/skills/segment-docs/SKILL.md (or your agent's skills folder).
name
segment-docs
description
Reference mapping between Oh My Posh Go segment source code and MDX documentation. Use when creating, updating, or auditing segment documentation, or when reading segment Go code and needing to understand how code constructs map to user-facing options, template properties, and type representations in docs.

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 callDocumentation 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:

go
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:

go
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 nameTypeDefault
always_enabledbooleanfalse
display_defaultbooleantrue
display_errorbooleantrue
http_timeoutint20
cache_durationintvaries
access_tokenstring""
refresh_tokenstring""
version_url_templatestring""
files[]stringvaries

Extracting Template Properties from Go Source

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

Rules for what becomes a template property:

  • Exported struct fields (capitalized) on the segment struct → .FieldName
  • Unexported fields are not accessible in templates
  • Nested struct fields use dot notation: a field Working ScmStatus exposes .Working.Modified, .Working.Added, etc.
  • Zero-argument methods with a single return value → .MethodName
  • Document fields that are assigned in Enabled() or its callees, not every inherited field from embedded structs is populated by every segment

The default template comes from the Template() method:

go
func (s *MySegment) Template() string {
    return " {{ .FieldName }} "
}
Nested struct subsection convention

When a property's type is itself a struct, add an #### TypeName subsection within the Properties table section listing its exported fields. Example:

mdx
#### Status

| Name | Type | Description |
| ---- | ---- | ----------- |
| `.Modified` | `int` | Number of modified files |
| `.Added` | `int` | Number of added files |
| `.Deleted` | `int` | Number of deleted files |
| `.Untracked` | `int` | Number of untracked files |
| `.Changed` | `boolean` | Whether any changes exist |

Key Source Files for Inherited Fields

When a segment embeds a base struct, its inherited fields may also be template properties. Check these files to discover what fields are available:

FileWhat it defines
src/segments/options/map.goProvider interface method signatures; shared Option constants
src/segments/base.goBase struct embedded by all segments; provides options, env
src/segments/scm.goScmStatus type with working/staging status fields (git, mercurial, etc.)
src/segments/language.goVersion type and language base fields (Python, Node, Go, etc.)

© JanDeDobbeleer, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/segment-docs of JanDeDobbeleer/oh-my-posh.

Open the folder on GitHubat commit 1d6bd96

Compare with similar skills

Segment Docs next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Segment Docs compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Segment Docs this skillJanDeDobbeleer/oh-my-posh24k—~1.1kAutomated safety check: PassMIT
Piclist Uploadcat-xierluo/legal-skills713—~701Automated safety check: PassMIT
Markdown Exporterbowenliang123/markdown-exporter2711 repos~5.3kAutomated safety check: PassApache-2.0
Markdown Article FormatterJimLiu/baoyu-skills26k6 repos~3.5kAutomated safety check: PassMIT
MarkitdownImCa0/just-laws78114 repos~3.2kAutomated safety check: NotesMIT
Obsidian MarkdownAtmosphere/atmosphere3.8k20 repos~1.3kAutomated safety check: PassApache-2.0

Similar skills

  • Piclist Upload

    cat-xierluo/legal-skills

    通过 PicList HTTP Server 将 Markdown 文件中的本地图片上传到图床,并替换为云端链接。本技能应在用户需要上传 Markdown 中的图片、处理包含本地图片引用的 Markdown、批量处理多个 Markdown 文件或目录、或替换本地路径为云端链接以实现跨设备访问时使用。

    713 GitHub stars~701 tokensUpdated today
    Documents & OfficeAuto-check passed
  • Markdown Exporter

    bowenliang123/markdown-exporter

    Convert Markdown text to DOCX, PPTX, XLSX, PDF, PNG, SVG, HTML, IPYNB, MD, CSV, JSON, JSONL, XML files, and extract code blocks in Markdown to Python, Bash,JS and etc files.

    271 GitHub starsUsed in 1 repo~5.3k tokens
    Documents & OfficeAuto-check passed
  • Markdown Article Formatter

    JimLiu/baoyu-skills

    Reformats plain text or Markdown articles with frontmatter, a title, a summary, headings, bold, lists and code blocks, and saves a separate formatted copy.

    26k GitHub starsUsed in 6 repos~3.5k tokens
    Documents & OfficeAuto-check passed
  • Markitdown

    ImCa0/just-laws

    Convert files and office documents to Markdown. An agent skill from ImCa0/just-laws.

    781 GitHub starsUsed in 14 repos~3.2k tokens
    Documents & OfficeAuto-check: notes
  • Obsidian Markdown

    Atmosphere/atmosphere

    Create and edit Obsidian Flavored Markdown with wikilinks, embeds, callouts, properties, and other Obsidian-specific syntax.

    3.8k GitHub starsUsed in 20 repos~1.3k tokens
    Documents & OfficeAuto-check passed
  • Gzh Design

    isjiamu/gzh-design-skill

    微信公众号文章排版引擎,将 Markdown 转换为可直接粘贴到公众号编辑器的 HTML。主题风格从 references/theme-index.md 注册的自定义主题库中选取,自动章节编号、关键词下划线标记、引言卡片、目录导航、代码块、图片/GIF、作者签名。支持 Markdown / Word(.docx) / PDF / 纯文本输入(非 Markdown…

    3.9k GitHub starsUsed in 1 repo~2.2k tokens
    Documents & OfficeAuto-check passed

More from JanDeDobbeleer/oh-my-posh

All 11 skills in this repo
  • Segment Create

    JanDeDobbeleer/oh-my-posh

    Full scaffolding workflow for creating a new Oh My Posh segment.

    24k GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Architecture

    JanDeDobbeleer/oh-my-posh

    Cross-language architecture and clean-code principles for this project: Clean Code, Object Calisthenics, SOLID, guard clauses, hot-path cost, and the code review checklist.

    24k GitHub stars~1.5k tokensUpdated today
    Auto-check passed
  • Conventional Commit

    JanDeDobbeleer/oh-my-posh

    Workflow for generating conventional commit messages following the Conventional Commits specification.

    24k GitHub stars~1.2k tokensUpdated today
    Auto-check: notes
  • Golang

    JanDeDobbeleer/oh-my-posh

    Go coding standards and conventions for this project. An agent skill from JanDeDobbeleer/oh-my-posh.

    24k GitHub stars~4.3k tokensUpdated today
    Auto-check passed
  • Markdown

    JanDeDobbeleer/oh-my-posh

    Markdown formatting rules for this project. An agent skill from JanDeDobbeleer/oh-my-posh.

    24k GitHub stars~754 tokensUpdated today
    Auto-check passed
  • Powershell

    JanDeDobbeleer/oh-my-posh

    PowerShell cmdlet conventions for this project. An agent skill from JanDeDobbeleer/oh-my-posh.

    24k GitHub stars~2.2k tokensUpdated today
    Auto-check passed

Works with

Questions about Segment Docs

What does Segment Docs do?

Reference mapping between Oh My Posh Go segment source code and MDX documentation. Segment Docs is an agent skill from JanDeDobbeleer/oh-my-posh. Reference mapping between Oh My Posh Go segment source code and MDX documentation.

When should I use Segment Docs?

Segment Docs fits situations like: auditing segment documentation; reading segment Go code and needing to understand how code constructs map to user-facing options; template properties; type representations in docs.

How do I install Segment Docs in Claude Code?

Run `npx skills add JanDeDobbeleer/oh-my-posh --skill segment-docs -a claude-code`. Or copy the skill folder (.agents/skills/segment-docs in JanDeDobbeleer/oh-my-posh) into .claude/skills/segment-docs in your project. Claude Code loads it when a task matches its description.

How do I install Segment Docs in Codex?

Run `npx skills add JanDeDobbeleer/oh-my-posh --skill segment-docs -a codex`. Or copy the skill folder (.agents/skills/segment-docs in JanDeDobbeleer/oh-my-posh) into .agents/skills/segment-docs in your project. Codex loads it when a task matches its description.

Can I use Segment Docs in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add JanDeDobbeleer/oh-my-posh --skill segment-docs -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/segment-docs, .gemini/skills/segment-docs, .github/skills/segment-docs and .opencode/skills/segment-docs in your project.

What does Segment Docs need to run?

SKILL.md names no scripts, command-line tools or credentials: Segment Docs is instructions for the agent only.

Does Segment Docs access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Segment Docs safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Segment Docs use?

Segment Docs is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Segment Docs use?

About 1.1k tokens (SKILL.md is roughly 4.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Segment Docs?

Skills that share tags, products or a category with Segment Docs: Piclist Upload (cat-xierluo/legal-skills, 713 stars), Markdown Exporter (bowenliang123/markdown-exporter, 271 stars), Markdown Article Formatter (JimLiu/baoyu-skills, 26k stars) and Markitdown (ImCa0/just-laws, 781 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Segment Docs?

JanDeDobbeleer (a GitHub user) maintains it in JanDeDobbeleer/oh-my-posh, which has 23,555 GitHub stars. The repository holds 11 skills in this directory. The repository was last updated on October 7, 2026.

Source: JanDeDobbeleer/oh-my-posh on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.