Agent skill

Segment Create

by JanDeDobbeleer in JanDeDobbeleer/oh-my-posh

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

MITAuto-check passedDevelopment

Install Segment Create

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

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

GitHub CLI
$ gh skill install JanDeDobbeleer/oh-my-posh segment-create --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-create .claude/skills/segment-create && 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-create
GitHub stars
24k
Token cost
~1.2k tokens
SKILL.md length
375 words
Files
1
Skills in repo
11
Repo updated
First seen
Licence
MIT

At a glance

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

  • Tasks that involve Project scaffolding
  • Calls go

What it does

Segment Create is an agent skill from JanDeDobbeleer/oh-my-posh. Full scaffolding workflow for creating a new Oh My Posh segment. Invoke when asked to add a new segment: generates the Go source, registers the type, creates documentation, updates the sidebar and JSON schema.

Its SKILL.md is about 1.2k 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 Development, covering Project scaffolding. 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

  • Tasks that involve Project scaffolding

Example prompts

  • “/segment-create”

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

    Shell commands in SKILL.md call:

    • go

    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 Create loads about 1.2k tokens when it runs. Until then it costs about 56 tokens; SKILL.md has 375 words of instructions outside code blocks.

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

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). 375 words, ~1,211 tokens.

Download SKILL.mdSave it as .claude/skills/segment-create/SKILL.md (or your agent's skills folder).
name
segment-create
description
Full scaffolding workflow for creating a new Oh My Posh segment. Invoke when asked to add a new segment: generates the Go source, registers the type, creates documentation, updates the sidebar and JSON schema.

Segment scaffolding instructions

Goal

  • Given user inputs (segment id, Go type name, title, category, description, properties, template), generate all required code and docs to add a new segment end-to-end, following repo conventions.

Inputs

  • id: kebab/slug used as type and docs filename (e.g., new)
  • goType: PascalCase name for the Go struct (e.g., New)
  • title: human readable (e.g., New)
  • category: one of cli|cloud|health|languages|music|scm|system|web
  • description: one-line description
  • properties: list of { key, type, title, description, default }
  • template: default template string (e.g., {{.Text}})

Contract

  • Idempotent: do not duplicate registrations, constants, map entries, sidebar links, or schema entries.
  • Alphabetical insertions where applicable.
  • Compile-ready Go code, formatted.
  • Docs lint clean according to the markdown skill (.agents/skills/markdown/SKILL.md).

Implementation steps

  1. Create Go writer file: src/segments/<id>.go
  • If file exists, skip creation.
  • Use this template; include property consts for each property key.
go
package segments

import (
    "github.com/jandedobbeleer/oh-my-posh/src/segments/options"
    "github.com/jandedobbeleer/oh-my-posh/src/runtime"
)

type {{goType}} struct {
    Base

    // computed fields used in template
    Text string
}

// properties
const (
{{#each properties}}
    // {{this.title}}: {{this.description}}
    {{ pascalCase this.key }} options.Property = "{{this.key}}"
{{/each}})

func (s *{{goType}}) Enabled() bool {
    // set up data for the template, using defaults from properties
    {{#if (propExists properties "text")}}
    s.Text = s.props.GetString({{ pascalCase "text" }}, {{ defaultFor "text" }})
    {{else}}
    s.Text = s.props.GetString({{ pascalCase (firstKey properties) }}, "")
    {{/if}}
    return true
}

func (s *{{goType}}) Template() string {
    return {{ printf "%q" template }}
}
  1. Register in src/config/segment_types.go
  • Ensure in init() there is gob.Register(&segments.{{goType}}{}) exactly once.
  • Add constant: {{ upper id }} SegmentType = "{{id}}" in the alphabetical block.
  • Add to var Segments = map[SegmentType]func() SegmentWriter{} with key {{ upper id }} mapping to &segments.{{goType}}{}.
  • Keep lists alphabetically sorted. If not sorted, insert at correct position.
  1. Documentation file
  • Consult the segment-docs skill (.agents/skills/segment-docs/SKILL.md) for the Go-to-documentation type mapping and rules for extracting options and template properties.
  • Path: website/docs/segments/{{category}}/{{id}}.mdx.
  • If file exists, skip. Else create with this template:
mdx
---
id: {{id}}
title: {{title}}
sidebar_label: {{title}}
---

## What

{{description}}

## Sample Configuration

import Config from '@site/src/components/Config.js';

<Config data={{
  "type": "{{id}}",
  "style": "powerline",
  "powerline_symbol": "\uE0B0",
  "foreground": "#193549",
  "background": "#ffeb3b",
  "options": {
{{#each option}}
    "{{this.key}}": {{ json this.default }},
{{/each}}
  }
}}/>

## Options

| Name | Type | Description | Default |
| ---- | ---- | ----------- | ------- |
{{#each option}}| `{{this.key}}` | `{{this.type}}` | {{this.description}} | `{{ stringify this.default }}` |
{{/each}}
  1. Sidebar
  • Update website/sidebars.js under the correct category array to include "segments/{{category}}/{{id}}".
  • Insert alphabetically; if already present, do nothing.
Show full SKILL.md (146 more words)Show less
  1. JSON Schema
  • File: themes/schema.json.
  • Add "{{id}}" to #/definitions/segment/properties/type/enum if missing.
  • Add an allOf entry for this segment guarded by { properties: { type: { const: "{{id}}" } } } that declares each property as defined by inputs. Use appropriate JSON Schema types and include title, description, default.
  • Keep the allOf array in a stable order by type name if feasible; otherwise append if not present.

Validation

  • After changes, run go build (task: build oh-my-posh). Ensure no compile errors.
  • Check markdown formatting; respect 120-char line length and fenced blocks with language.

Notes

  • Use UTF-32 escapes (e.g., "\uEFF1") for icon defaults in docs and code.
  • Keep code minimal. Complex logic should be added by maintainers after scaffold if needed.

Optional

  1. Tests
  • Create a minimal test file at src/segments/{{id}}_test.go using the table-driven style. Include at least a happy-path test that asserts Enabled() returns true and the template renders expected output with default options.

© 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-create of JanDeDobbeleer/oh-my-posh.

Open the folder on GitHubat commit 1d6bd96

Compare with similar skills

Segment Create 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 Create compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Segment Create this skillJanDeDobbeleer/oh-my-posh24k—~1.2kAutomated safety check: PassMIT
Brain Bootstrapmindmuxai/brain.md564—~1.8kAutomated safety check: PassApache-2.0
Openspec AwareChorus-AIDLC/Chorus1.2k—~7.6kAutomated safety check: PassAGPL-3.0
Chorus Openspec AwareChorus-AIDLC/Chorus1.2k—~6.8kAutomated safety check: PassAGPL-3.0
Openspec AwareChorus-AIDLC/Chorus1.2k—~7.2kAutomated safety check: NotesAGPL-3.0
Openspec AwareChorus-AIDLC/Chorus1.2k—~7.2kAutomated safety check: PassAGPL-3.0

Similar skills

  • Brain Bootstrap

    mindmuxai/brain.md

    Seed a freshly-scaffolded brain with real project knowledge — on an existing (brownfield) project read the code, docs, and git log to draft the six root pages and capture key historical decisions…

    564 GitHub stars~1.8k tokensUpdated 26 days ago
    DevelopmentAuto-check passed
  • Openspec Aware

    Chorus-AIDLC/Chorus

    OpenSpec-mode authoring for Chorus PM workflows on OpenClaw — the default whenever OpenSpec is usable.

    1.2k GitHub stars~7.6k tokensUpdated today
    DevelopmentAuto-check passed
  • Chorus Openspec Aware

    Chorus-AIDLC/Chorus

    OpenSpec-mode authoring for Chorus PM workflows in Kiro CLI.

    1.2k GitHub stars~6.8k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Openspec Aware

    Chorus-AIDLC/Chorus

    OpenSpec-mode authoring for Chorus PM workflows in Hermes. An agent skill from Chorus-AIDLC/Chorus.

    1.2k GitHub stars~7.2k tokensUpdated today
    Agent WorkflowsAuto-check: notes
  • Openspec Aware

    Chorus-AIDLC/Chorus

    OpenSpec-mode authoring for Chorus PM workflows in Pi. An agent skill from Chorus-AIDLC/Chorus.

    1.2k GitHub stars~7.2k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Openspec Aware

    Chorus-AIDLC/Chorus

    OpenSpec-mode authoring for Chorus PM workflows in Codex. An agent skill from Chorus-AIDLC/Chorus.

    1.2k GitHub stars~7.3k tokensUpdated today
    AI & LLM EngineeringAuto-check passed

More from JanDeDobbeleer/oh-my-posh

All 11 skills in this repo
  • Segment Docs

    JanDeDobbeleer/oh-my-posh

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

    24k GitHub stars~1.1k 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

Categories

Questions about Segment Create

What does Segment Create do?

Full scaffolding workflow for creating a new Oh My Posh segment. Segment Create is an agent skill from JanDeDobbeleer/oh-my-posh. Full scaffolding workflow for creating a new Oh My Posh segment.

When should I use Segment Create?

Segment Create fits situations like: tasks that involve Project scaffolding.

How do I install Segment Create in Claude Code?

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

How do I install Segment Create in Codex?

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

Can I use Segment Create 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-create -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-create, .gemini/skills/segment-create, .github/skills/segment-create and .opencode/skills/segment-create in your project.

What does Segment Create need to run?

Going by SKILL.md and its folder, Segment Create needs the command-line tools its instructions call (go).

Does Segment Create 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 Create 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 Create use?

Segment Create 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 Create use?

About 1.2k tokens (SKILL.md is roughly 4.8k 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 Create?

Skills that share tags, products or a category with Segment Create: Brain Bootstrap (mindmuxai/brain.md, 564 stars), Openspec Aware (Chorus-AIDLC/Chorus, 1.2k stars), Chorus Openspec Aware (Chorus-AIDLC/Chorus, 1.2k stars) and Openspec Aware (Chorus-AIDLC/Chorus, 1.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Segment Create?

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.