AGENTS.md · JanDeDobbeleer/oh-my-posh
AGENTS.md from JanDeDobbeleer/oh-my-posh: 74 lines covering Non-negotiables, Repository map, Commands, Docs and more.
Template by JanDeDobbeleer
Chalk Labs
Need help deploying AGENTS.md · JanDeDobbeleer/oh-my-posh?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Claude Code. Read the repository before you give any tool access to your data.
curl -fsSL https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/AGENTS.md -o AGENTS.md
Read it and adapt it to your project before use.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: code-generation
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
What's in it
An AGENTS.md file: instructions coding agents (Codex, Cursor, Copilot, Gemini CLI and others) read before working in a repo.
- For
- Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Claude Code
- Length
- 74 lines
- File
AGENTS.md
Sections
- Non-negotiables
- Repository map
- Commands
- Docs
- Project knowledge
- Pull request reviews
First lines (shown under the repo's MIT license)
# Agent Instructions Oh My Posh is a cross-shell prompt theme engine written in Go, with the module root in `src/`. Rendering runs on every shell prompt, so it is a hot path: no extra process spawns, network calls, or file reads per render without `src/cache`. ## Non-negotiables Corrections in past sessions keep landing on these. Check each one before you report a change as done. 1. **Reuse before building.** Find how the codebase already solves the problem before designing anything: a similar segment, an `Environment` method, `src/cache`, or a CLI call behind an option like other segments use. Never add a dependency without asking. Remove deprecated logic instead of maintaining it. 2. **Go through `runtime.Environment`** (`s.env` in segments) for every OS, shell, file, and command call, so tests can mock it. Check its methods before reaching for `os`, `os/exec`, or `path/filepath`. 3. **Tests prove behavior, not the patch.** A test must fail when the behavior breaks and survive a correct refactor. Write them table-driven; the `golang` skill has the rules. 4. **No `else`.** Use guard clauses, early returns, or a `switch`. The Stop hook blocks new `else` branches. 5. **Comments explain a why the code cannot.** Never restate a name or signature, exported symbols included, in any language. Default to no comment. 6. **Log with `src/log`:** `log.Error(err)` where the error occurs, and `defer log.Trace(time.Now(), args...)` in functions worth tracing. Do not format errors yourself. 7. **Commit only when asked, push only when asked.** Fold every fix to a commit that is not on `main` into that commit with `git commit --fixup <sha>` and `git rebase --autosquash`, lint and CI fallout included. Never rewrite `main`. ## Repository map | Path | Purpose | | ----------------------------- | ---------------------------------------------------------------------------- | | `src/segments/` | One `.go` and one `_test.go` per segment | | `src/config/` | Segment registry; an unregistered segment fails silently at runtime | | `src/prompt/` | Rendering engine | | `src/runtime/` | `Environment` abstraction and its mock | | `src/cache/` | TTL, file, and command-path caching; do not build another cache | | `src/cli/` | CLI commands on `src/cmdtree`, registered in `root.go` | | `src/shell/` | `oh-my-posh init <shell>`; `scripts/` are embedded, so rebuild after editing | | `themes/` | Bundled themes, validated against `themes/schema.json` | | `website/` | Docusaurus docs; segment pages live in `website/docs/segments/<category>/` | A shell integration change usually spans `src/shell/<shell>.go` and its script in `src/shell/scripts/`. ## Commands ```bash # from src/ go test ./... golangci-lint run # from website/ npm run build # before a docs pull request ``` The Stop hook (`.agents/hooks/main.go`) formats the changed files, runs `modernize`, `fieldalignment`, `golangci-lint`, `go test`, `markdownlint`, and the `else` check, and builds, lints, and analyzes platform-specific code for the other operating systems. Fix what it reports; never run `fieldalignment -fix`. `.claude/settings.json` and `.github/hooks/quality.json` both wire it, so change them together. ## Docs Docs pages have no H1, because the front-matter `title` renders as the heading; use only H2 and H3. Wrap lines at 120 characters. Use the `segment-create` skill for a new segment and `segment-docs` for its documentation. ## Project knowledge Before touching shell scripts, terminal or pty behavior, WSL-based testing, engine internals, or release and CI work, read the matching file in the `project-knowledge` skill. When a session uncovers a verified, actionable gotcha, append it to that file and commit it with the related change. ## Pull request reviews Validate every comment against the code. Fold each fix into the commit that introduced the code with a fixup and `git rebase --autosquash`, then force-push the pull request branch with `--force-with-lease`. Reply to every thread with the conclusion and the commit, then resolve it.
Signals
- Stars
- 23,644
- Forks
- 2,799
- Open issues
- 0
- Contributors
- 538
- Last commit (this folder)
- Oct 20, 2026 (10 days ago)
- Last release
- Oct 20, 2026 (10 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/JanDeDobbeleer/oh-my-posh
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from JanDeDobbeleer
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get AGENTS.md · JanDeDobbeleer/oh-my-posh running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
AGENTS.md · JanDeDobbeleer/oh-my-posh. Agent Mart. https://agentmart.dev/templates/jandedobbeleer-oh-my-posh-agents-md (last updated 2026-10-24)