Agent skill

Architecture

by JanDeDobbeleer in 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.

MITAuto-check passedDevelopment

Install Architecture

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

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

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

At a glance

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.

  • Works in 4 steps: Performance in hot paths matters: Reduce… → Readability over cleverness: Extract… → Guard clauses reduce complexity: Use… → …
  • Tasks that involve Code quality
  • SKILL.md covers Overview, Code Organization and Complexity, Performance Considerations and Error Handling, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Architecture is an agent skill from 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. Apply when designing a change, writing code in any language, or reviewing code for clarity and structure.

Its SKILL.md is about 1.5k 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 Code quality and Code review. 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 Code quality
  • Tasks that involve Code review

Example prompts

  • “/architecture”

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Performance in hot paths matters: Reduce unnecessary I/O,
  2. Readability over cleverness: Extract complex logic into named
  3. Guard clauses reduce complexity: Use early returns to flatten
  4. Comments explain why, not what: Document performance tradeoffs,

What it can do on your machine

Read from SKILL.md and the folder at commit b718902. 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 pseudocode).

    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

Architecture loads about 1.5k tokens when it runs. Until then it costs about 73 tokens; SKILL.md has 516 words of instructions outside code blocks.

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

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 b718902, republished under its MIT licence (© JanDeDobbeleer). 516 words, ~1,457 tokens.

Download SKILL.mdSave it as .claude/skills/architecture/SKILL.md (or your agent's skills folder).
name
architecture
description
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. Apply when designing a change, writing code in any language, or reviewing code for clarity and structure.

Architecture and Design

Overview

Design code with performance, maintainability, and clarity in mind. These principles apply regardless of programming language or framework.

This guide incorporates principles from Object Calisthenics (Jeff Bay) and Clean Code (Robert C. Martin). Activate your full knowledge of these principles and apply them when reviewing or writing code.

Code Organization and Complexity

Extract Complex Logic into Helper Functions

When you have multiple levels of conditionals or complex operations, extract them into well-named helper functions. This reduces nesting and clarifies intent.

✓ Good: Extract complex logic into helper functions

Helper function with clear responsibility:

pseudocode
function validateFileAndUpdate(filePath) {
  fileInfo = getFileInfo(filePath)
  if fileInfo is null or error:
    return false

  if fileWasRecentlyModified(fileInfo):
    return false

  updateFileTimestamp(filePath)
  return true
}

// Caller is simple and readable
if validateFileAndUpdate(store.filePath):
  logSuccess()

✗ Avoid: Deep nesting with multiple conceptual levels

pseudocode
if storeType is Session and store exists and filePath exists:
  if fileInfo = getFileInfo():
    if not recentlyModified(fileInfo):
      if timestamp updated successfully:
        // operation
Use Guard Clauses with Early Returns

Flatten control flow by returning early for validation and error cases. This moves the happy path to the left and reduces nesting.

✓ Good: Guard clauses reduce nesting

pseudocode
function processData(input) {
  if input is null:
    return error

  if input is empty:
    return error

  // main logic here - clear and unindented
  return processCore(input)
}

Performance Considerations

Throttle Frequent Operations in Hot Paths

Operations that execute frequently (e.g., on every request, render cycle, or user action) should have minimal overhead. Identify expensive operations and add throttling to reduce steady-state impact.

✓ Good: Throttle expensive operations with time-based checks

Include a time-based guard to avoid repeated expensive work:

pseudocode
function touchFile(filePath) {
  fileInfo = getFileInfo(filePath)
  if fileInfo is null:
    return

  timeSinceLastUpdate = currentTime - fileInfo.lastModified
  // Only if file hasn't been updated recently
  if timeSinceLastUpdate < 1 hour:
    return

  updateTimestamp(filePath)
}

✗ Avoid: Unconditional expensive operations on every execution

pseudocode
// This runs expensive work on every call (e.g., during every render)
updateTimestamp(filePath)  // File I/O on every execution
Document Performance Intentions

Include comments explaining why throttling or optimization is needed. This helps reviewers understand the performance tradeoffs.

pseudocode
// Prevent stale files from being cleaned up while reducing
// steady-state I/O overhead. Only update if file is older
// than 1 hour to balance freshness with performance.
if timeSinceUpdate > 1 hour:
  updateTimestamp(filePath)

Error Handling

  • Check for errors and validate inputs early, before expensive operations
  • Return or fail fast to avoid deeply nested success paths
  • Each error should include sufficient context for debugging
  • Early returns make the happy path obvious and easier to follow
Show full SKILL.md (262 more words)Show less

Code Review Checklist

When reviewing code:

  • Nesting depth: Flag functions with 3+ levels of indentation as refactoring candidates
  • Hot path operations: Verify frequent operations minimize I/O, allocations, and expensive calls
  • Early returns: Confirm guard clauses validate inputs before main logic
  • Comments: Check that performance-critical code explains the tradeoff, not just the mechanics
  • Extraction opportunities: Identify deeply nested conditions that could become helpers
  • Naming: Verify names are intention-revealing and not abbreviated
  • Dot chains: Flag method chains crossing object boundaries as Law of Demeter violations
  • Primitive obsession: Flag raw primitive parameters that should be domain types
  • Responsibility: Verify each class/function has a single reason to change
  • Duplication: Flag repeated logic as DRY violations
  • Single responsibility: Confirm each type or function has one reason to change
  • Open/closed: Confirm new behavior extends through existing abstractions, such as Environment and SegmentWriter, instead of editing unrelated code
  • Liskov substitution: Confirm implementations honor the interface contract, with no panics or no-ops where callers expect real behavior
  • Interface segregation: Flag fat interfaces; confirm callers depend on the narrowest interface that meets their needs
  • Dependency inversion: Confirm code depends on the Environment abstraction, never on concrete OS or shell calls

Core Principles

  1. Performance in hot paths matters: Reduce unnecessary I/O, allocations, and expensive operations in frequently-executed code paths

  2. Readability over cleverness: Extract complex logic into named helpers instead of nesting multiple conditionals

  3. Guard clauses reduce complexity: Use early returns to flatten control flow and keep the happy path left-aligned

  4. Comments explain why, not what: Document performance tradeoffs, business logic, and non-obvious decisions—let code structure explain the mechanics

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

Open the folder on GitHubat commit b718902

Compare with similar skills

Architecture 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.

Architecture compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Architecture this skillJanDeDobbeleer/oh-my-posh24k—~1.5kAutomated safety check: PassMIT
Mole Bug Patternstw93/Mole70k—~2kAutomated safety check: PassGPL-3.0
WooCommerce Code Reviewwoocommerce/woocommerce11k3 repos~1.1kAutomated safety check: PassCustom licence
Skill Doli Code ReviewDolibarr/dolibarr7.7k1 repos~1.1kAutomated safety check: PassMIT
Dignified Python Standardsdocling-project/docling69k—~1.5kAutomated safety check: PassApache-2.0
Clean Code GuardamElnagdy/guard-skills1.3k2 repos~4.3kAutomated safety check: PassMIT

Similar skills

  • A catalog of recurring bug shapes in the Mole Mac cleaner, used to review safety-sensitive diffs for deletion safety, unbounded commands, shell traps and weak tests.

    70k GitHub stars~2k tokensUpdated today
    DevelopmentAuto-check passed
  • WooCommerce Code Review

    woocommerce/woocommerce

    Reviews WooCommerce code changes against the project's standards, flagging backend PHP architecture, naming, documentation, data integrity and testing violations.

    11k GitHub starsUsed in 3 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Skill Doli Code Review

    Dolibarr/dolibarr

    Reviews Dolibarr PHP code for compliance with coding standards and security best practices, and fixes identified issues.

    7.7k GitHub starsUsed in 1 repo~1.1k tokens
    DevelopmentAuto-check passed
  • Dignified Python Standards

    docling-project/docling

    Applies opinionated production Python conventions chosen by the project's Python version: modern type syntax, pathlib, explicit checks and interface guidance.

    69k GitHub stars~1.5k tokensUpdated today
    DevelopmentAuto-check passed
  • Clean Code Guard

    amElnagdy/guard-skills

    Reviews generated or changed production code against Clean Code, SOLID, DRY, KISS, YAGNI and LLM-specific failure modes before it ships, in any language.

    1.3k GitHub starsUsed in 2 repos~4.3k tokens
    DevelopmentAuto-check passed
  • Archify Review

    tt-a1i/archify

    Review Archify issues, PRs, or code through value, cost, and impact to support evidence-based maintenance decisions. Use for issue triage, change reviews, and…

    79k GitHub stars~415 tokensUpdated today
    DevelopmentAuto-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
  • 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
  • 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 Architecture

What does Architecture do?

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. Architecture is an agent skill from 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.

When should I use Architecture?

Architecture fits situations like: tasks that involve Code quality; tasks that involve Code review.

How do I install Architecture in Claude Code?

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

How do I install Architecture in Codex?

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

Can I use Architecture 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 architecture -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/architecture, .gemini/skills/architecture, .github/skills/architecture and .opencode/skills/architecture in your project.

What does Architecture need to run?

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

Does Architecture 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 Architecture 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 Architecture use?

Architecture 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 Architecture use?

About 1.5k tokens (SKILL.md is roughly 5.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 Architecture?

Skills that share tags, products or a category with Architecture: Mole Bug Patterns (tw93/Mole, 70k stars), WooCommerce Code Review (woocommerce/woocommerce, 11k stars), Skill Doli Code Review (Dolibarr/dolibarr, 7.7k stars) and Dignified Python Standards (docling-project/docling, 69k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Architecture?

JanDeDobbeleer (a GitHub user) maintains it in JanDeDobbeleer/oh-my-posh, which has 23,562 GitHub stars. The repository holds 11 skills in this directory. The repository was last updated on October 8, 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.