Agent skill

Powershell

by JanDeDobbeleer in JanDeDobbeleer/oh-my-posh

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

MITAuto-check passedDevelopment

Install Powershell

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

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

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

At a glance

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

  • Development work in your project
  • SKILL.md covers Naming Conventions, Parameter Design, Pipeline and Output and Error Handling and Safety, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Powershell is an agent skill from JanDeDobbeleer/oh-my-posh. PowerShell cmdlet conventions for this project. Apply when writing or reviewing any .ps1 or module file.

Its SKILL.md is about 2.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. It works with PowerShell and 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

  • Development work in your project

Example prompts

  • “/powershell”

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 powershell).

    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

Powershell loads about 2.2k tokens when it runs. Until then it costs about 29 tokens; SKILL.md has 515 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~29
When it runs · the whole SKILL.md, loaded when a task matches
~2.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). 515 words, ~2,236 tokens.

Download SKILL.mdSave it as .claude/skills/powershell/SKILL.md (or your agent's skills folder).
name
powershell
description
PowerShell cmdlet conventions for this project. Apply when writing or reviewing any .ps1 or module file.

PowerShell Cmdlet Development Guidelines

Naming Conventions

  • Verb-Noun Format:

    • Use approved PowerShell verbs (Get-Verb)
    • Use singular nouns
    • PascalCase for both verb and noun
    • Avoid special characters and spaces
  • Parameter Names:

    • Use PascalCase
    • Choose clear, descriptive names
    • Use singular form unless always multiple
    • Follow PowerShell standard names
  • Variable Names:

    • Use PascalCase for public variables
    • Use camelCase for private variables
    • Avoid abbreviations
    • Use descriptive names
  • Alias Avoidance:

    • Use full cmdlet names
    • Avoid using aliases in scripts (e.g., use Get-ChildItem instead of gci)
    • Document any custom aliases
    • Use full parameter names
Example
powershell
function Get-UserProfile {
    [CmdletBinding()]
    param(
        [Parameter(Mandatory)]
        [string]$Username,

        [Parameter()]
        [ValidateSet('Basic', 'Detailed')]
        [string]$ProfileType = 'Basic'
    )

    process {
        # Logic here
    }
}

Parameter Design

  • Standard Parameters:

    • Use common parameter names (Path, Name, Force)
    • Follow built-in cmdlet conventions
    • Use aliases for specialized terms
    • Document parameter purpose
  • Parameter Names:

    • Use singular form unless always multiple
    • Choose clear, descriptive names
    • Follow PowerShell conventions
    • Use PascalCase formatting
  • Type Selection:

    • Use common .NET types
    • Implement proper validation
    • Consider ValidateSet for limited options
    • Enable tab completion where possible
  • Switch Parameters:

    • Use [switch] for boolean flags
    • Avoid $true/$false parameters
    • Default to $false when omitted
    • Use clear action names
Example
powershell
function Set-ResourceConfiguration {
    [CmdletBinding()]
    param(
        [Parameter(Mandatory)]
        [string]$Name,

        [Parameter()]
        [ValidateSet('Dev', 'Test', 'Prod')]
        [string]$Environment = 'Dev',

        [Parameter()]
        [switch]$Force,

        [Parameter()]
        [ValidateNotNullOrEmpty()]
        [string[]]$Tags
    )

    process {
        # Logic here
    }
}

Pipeline and Output

  • Pipeline Input:

    • Use ValueFromPipeline for direct object input
    • Use ValueFromPipelineByPropertyName for property mapping
    • Implement Begin/Process/End blocks for pipeline handling
    • Document pipeline input requirements
  • Output Objects:

    • Return rich objects, not formatted text
    • Use PSCustomObject for structured data
    • Avoid Write-Host for data output
    • Enable downstream cmdlet processing
  • Pipeline Streaming:

    • Output one object at a time
    • Use process block for streaming
    • Avoid collecting large arrays
    • Enable immediate processing
  • PassThru Pattern:

    • Default to no output for action cmdlets
    • Implement -PassThru switch for object return
    • Return modified/created object with -PassThru
    • Use verbose/warning for status updates
Example
powershell
function Update-ResourceStatus {
    [CmdletBinding()]
    param(
        [Parameter(Mandatory, ValueFromPipeline, ValueFromPipelineByPropertyName)]
        [string]$Name,

        [Parameter(Mandatory)]
        [ValidateSet('Active', 'Inactive', 'Maintenance')]
        [string]$Status,

        [Parameter()]
        [switch]$PassThru
    )

    begin {
        Write-Verbose "Starting resource status update process"
        $timestamp = Get-Date
    }

    process {
        # Process each resource individually
        Write-Verbose "Processing resource: $Name"

        $resource = [PSCustomObject]@{
            Name = $Name
            Status = $Status
            LastUpdated = $timestamp
            UpdatedBy = $env:USERNAME
        }

        # Only output if PassThru is specified
        if ($PassThru) {
            Write-Output $resource
        }
    }

    end {
        Write-Verbose "Resource status update process completed"
    }
}
Show full SKILL.md (253 more words)Show less

Error Handling and Safety

  • ShouldProcess Implementation:

    • Use [CmdletBinding(SupportsShouldProcess = $true)]
    • Set appropriate ConfirmImpact level
    • Call $PSCmdlet.ShouldProcess() for system changes
    • Use ShouldContinue() for additional confirmations
  • Message Streams:

    • Write-Verbose for operational details with -Verbose
    • Write-Warning for warning conditions
    • Write-Error for recoverable errors that allow execution to continue
    • throw for fatal errors that stop execution
    • Avoid Write-Host except for user interface text
  • Error Handling Pattern:

    • Use try/catch blocks for error management
    • Set appropriate ErrorAction preferences
    • Return clear, specific error messages
    • Use ErrorVariable when needed
    • Include proper fatal vs recoverable error handling
  • Non-Interactive Design:

    • Accept input via parameters
    • Avoid Read-Host in scripts
    • Support automation scenarios
    • Document all required inputs
Example
powershell
function Remove-UserAccount {
    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = 'High')]
    param(
        [Parameter(Mandatory, ValueFromPipeline)]
        [ValidateNotNullOrEmpty()]
        [string]$Username,

        [Parameter()]
        [switch]$Force
    )

    begin {
        Write-Verbose "Starting user account removal process"
        $ErrorActionPreference = 'Stop'
    }

    process {
        try {
            # Validation
            if (-not (Test-UserExists -Username $Username)) {
                Write-Error "User account '$Username' not found"
                return
            }

            # Confirmation
            $shouldProcessMessage = "Remove user account '$Username'"
            if ($Force -or $PSCmdlet.ShouldProcess($Username, $shouldProcessMessage)) {
                Write-Verbose "Removing user account: $Username"

                # Main operation
                Remove-ADUser -Identity $Username -ErrorAction Stop
                Write-Warning "User account '$Username' has been removed"
            }
        }
        catch [Microsoft.ActiveDirectory.Management.ADException] {
            Write-Error "Active Directory error: $_"
            throw
        }
        catch {
            Write-Error "Unexpected error removing user account: $_"
            throw
        }
    }

    end {
        Write-Verbose "User account removal process completed"
    }
}

Documentation and Style

  • Comment-Based Docs: Include comment-based documentation for any public-facing function or cmdlet. Inside the function, add a <# ... #> block with at least:

    • .SYNOPSIS Brief description
    • .DESCRIPTION Detailed explanation
    • .EXAMPLE sections with practical usage
    • .PARAMETER descriptions
    • .OUTPUTS Type of output returned
    • .NOTES Additional information
  • Consistent Formatting:

    • Follow consistent PowerShell style
    • Use proper indentation (4 spaces recommended)
    • Opening braces on same line as statement
    • Closing braces on new line
    • Use line breaks after pipeline operators
    • PascalCase for function and parameter names
    • Avoid unnecessary whitespace
  • Pipeline Support:

    • Implement Begin/Process/End blocks for pipeline functions
    • Use ValueFromPipeline where appropriate
    • Support pipeline input by property name
    • Return proper objects, not formatted text
  • Avoid Aliases: Use full cmdlet names and parameters

    • Avoid using aliases in scripts (e.g., use Get-ChildItem instead of gci)
    • Use Where-Object instead of ? or where
    • Use ForEach-Object instead of %
    • Use Get-ChildItem instead of ls or dir

Full Example: End-to-End Cmdlet Pattern

powershell
function New-Resource {
    [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = 'Medium')]
    param(
        [Parameter(Mandatory = $true,
                   ValueFromPipeline = $true,
                   ValueFromPipelineByPropertyName = $true)]
        [ValidateNotNullOrEmpty()]
        [string]$Name,

        [Parameter()]
        [ValidateSet('Development', 'Production')]
        [string]$Environment = 'Development'
    )

    begin {
        Write-Verbose "Starting resource creation process"
    }

    process {
        try {
            if ($PSCmdlet.ShouldProcess($Name, "Create new resource")) {
                # Resource creation logic here
                Write-Output ([PSCustomObject]@{
                    Name = $Name
                    Environment = $Environment
                    Created = Get-Date
                })
            }
        }
        catch {
            Write-Error "Failed to create resource: $_"
        }
    }

    end {
        Write-Verbose "Completed resource creation process"
    }
}

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

Open the folder on GitHubat commit 1d6bd96

Compare with similar skills

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

Powershell compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Powershell this skillJanDeDobbeleer/oh-my-posh24k—~2.2kAutomated safety check: PassMIT
Niubashunixwin/niubash146—~2.1kAutomated safety check: PassMIT
Speckit Git Initializekunstmusik/blue1545 repos~438Automated safety check: PassGPL-3.0
Environment AwarenessNoobyGains/godmode107—~3.3kAutomated safety check: PassMIT
Tapd Iteration InitTencentBlueKing/bk-bcs840—~1.3kAutomated safety check: PassCustom licence
Rtk Skillsopaco/deepwiki-rs3.1k—~1.4kAutomated safety check: PassMIT

Similar skills

  • Niubash

    unixwin/niubash

    Run Windows tasks in Niubash, the GNU Bash-compatible Windows-native shell.

    146 GitHub stars~2.1k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Speckit Git Initialize

    kunstmusik/blue

    Initialize a Git repository with an initial commit. An agent skill from kunstmusik/blue.

    154 GitHub starsUsed in 5 repos~438 tokens
    DevelopmentAuto-check passed
  • Environment Awareness

    NoobyGains/godmode

    A skill your agent uses when starting a session, running shell commands, installing packages, or diagnosing platform-specific failures - detects OS, shell, runtime, package manager, and toolchain…

    107 GitHub stars~3.3k tokensUpdated 7 mo ago
    DevelopmentAuto-check passed
  • Tapd Iteration Init

    TencentBlueKing/bk-bcs

    迭代执行流水线启动器。分三个阶段执行:信息检查(验证 git 环境、获取迭代信息、 解析迭代分支)→ 恢复检测(已有状态文件时判定恢复策略)→ 新流程初始化(创建分支、 迭代目录和 iteration-state.json)。

    840 GitHub stars~1.3k tokensUpdated 13 days ago
    DevelopmentAuto-check passed
  • Rtk Skill

    sopaco/deepwiki-rs

    A skill your agent uses when running shell commands that produce verbose output (git, test, build, lint, package managers, docker).

    3.1k GitHub stars~1.4k tokensUpdated 23 days ago
    DevOps & CloudAuto-check passed
  • Hf Cloud Sagemaker Iam Preflight

    waybarrios/opencode-power-pack

    Verify or select a SageMaker execution role before creating models, endpoints, or training jobs.

    533 GitHub stars~1.6k tokensUpdated yesterday
    SecurityAuto-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
  • 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

Works with

Categories

Questions about Powershell

What does Powershell do?

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

When should I use Powershell?

Powershell fits situations like: development work in your project.

How do I install Powershell in Claude Code?

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

How do I install Powershell in Codex?

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

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

What does Powershell need to run?

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

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

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

About 2.2k tokens (SKILL.md is roughly 8.9k 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 Powershell?

Skills that share tags, products or a category with Powershell: Niubash (unixwin/niubash, 146 stars), Speckit Git Initialize (kunstmusik/blue, 154 stars), Environment Awareness (NoobyGains/godmode, 107 stars) and Tapd Iteration Init (TencentBlueKing/bk-bcs, 840 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Powershell?

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.