/ps-bash:ps-bash-objectsfrom ps-bash
Consume and produce ps-bash's typed pipeline objects: LsEntry, PsEntry, GrepMatch, WcResult and friends, the BashText contract, New-BashObject. ps-bash 型別物件管道。 Use when: reading properties from ls/ps/grep/find output in PowerShell, making your own objects flow through grep/sort/head and print as bash text, a pipeline prints strings instead of objects.
Ships in ps-bash. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Every mapped bash command is an Invoke-Bash* cmdlet that emits a PSObject with a PsBash.*
type name and a BashText note property holding the exact bash line. Text consumers (grep, sort,
head, uniq, > and the screen) read BashText; the object itself travels on, so the result of
ls -la | grep .ps1 | sort -k5 -h is still LsEntry rows.
Import-Module PsBash # PowerShell 7.4+
$top = ps aux | sort -k3 -rn | head -5 # PsEntry: PID, PPID, User, CPU, MemoryMB, RSS, Command, CommandLine, ProcessName
$top | Where-Object CPU -gt 5 | ForEach-Object { Stop-Process $_.PID -WhatIf }
(ls -la src | grep -v '/$').SizeBytes | Measure-Object -Sum # LsEntry: Name, FullPath, IsDirectory, SizeBytes, Permissions, Owner, LastModified
Types: LsEntry FindEntry StatEntry DuEntry TreeEntry CatLine GrepMatch RgMatch WcResult PsEntry EnvEntry DateOutput SeqOutput ExprOutput TimeOutput WhichOutput TypeOutput AliasOutput ReadlinkOutput MktempOutput TarListOutput GzipListOutput TrapOutput PingReply TraceHop BrowseRow MediaArtifact TextOutput, plus TranspileFailed/RuntimeFailed errors. Plain-text lines (PsBash.TextOutput)
come through as bare strings, not objects. Inspect with $x.PSObject.TypeNames and $x | Get-Member.
Give your object a PsBash.-style type name and a BashText; ps-bash's text commands then treat it
like their own:
function Get-Deploys {
foreach ($d in (Invoke-RestMethod $url)) {
[PSCustomObject]@{
PSTypeName = 'MyApp.Deploy'; Name = $d.name; Status = $d.status; Started = [datetime]$d.started
BashText = '{0,-20} {1,-8} {2:u}' -f $d.name, $d.status, [datetime]$d.started
}
}
}
Get-Deploys | grep failed | sort -k3 # objects survive; prints the BashText lines
New-BashObject -BashText $line -TypeName 'MyApp.Thing' (module function; C#:
[PsBash.Cmdlets.BashRuntime]::NewBashObject(text, typeName)) builds one with ps-bash's newline
rules; with the default PsBash.TextOutput type it returns a plain string.Get-BashText $obj is the text any consumer sees: BashText if present, else the object's string form.BashText (Get-ChildItem, Invoke-SqlCmd) is stringified by ToString() for
grep, and flattened to a table when the out-of-process host prints it.ls | Select-Object -First 3 transpiles to … | ForEach-Object { Get-BashText $_ } | Select-Object,
which gives strings. Object cmdlets want the objects: call them from PowerShell, or strip that
flattening the way BeagleTerm's KeepObjectsForObjectCmdlets does (see ps-bash-embed).ps-bash -c crosses a process boundary and returns text. Objects exist only where the module runs
in your own PowerShell (module mode or an embedding).gci, iex are 127); use full cmdlet names.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub standardbeagle/standardbeagle-tools --plugin ps-bash7 skills in this plugin
/ps-bash-browseBuild object workbenches on ps-bash's browse: adapters keyed by type name, display columns, actions with a destructive-preview gate, scripted -List/-Select/-Action/-Exec. ps-bash browse 物件工作台。 Use when: an interactive picker or TUI over objects from a .psm1, adding actions for a PSTypeName, scripting browse non-interactively from an agent./ps-bash-embedHost ps-bash in your own .NET app: PsBash.Core NuGet, BashTranspiler.Transpile, importing the embedded version-matched module, keeping objects for object cmdlets, IHostTerminal. ps-bash 嵌入 .NET 應用。 Use when: a GUI, daemon or agent tool runs bash in-process, transpiling bash to PowerShell, vim/less hang or say TERM not set in an embedding./ps-bash-hooksExtend the ps-bash shell: prompt and on-cd hooks (direnv/fnm style), ~/.psbashrc, custom ls providers for synthetic paths, complete -W word lists and flag completers. ps-bash 鉤子與擴展。 Use when: running code on every prompt or directory change, making ls list a virtual path (myfs:, an API), adding tab completion to a command, writing a .psbashrc./ps-bash-recommenderRoutes ps-bash intent to the one right manual skill — the plugin's only auto-invoked gateway. ps-bash 唯一自動網關。 Use when: writing a script, module, app or agent tool on ps-bash or PsBash; typed objects from bash commands (LsEntry, PsEntry, BashText); browse workbench; prompt/cd hooks; Format-Styled; embedding PsBash.Core; PSBASH_SESSION or named sessions./ps-bash-sessionsDrive ps-bash from agents and front ends: named sessions keeping state between ps-bash -c calls, the terminal-broker client contract, compact agent output. ps-bash 命名會話與代理。 Use when: shell state must survive between commands, one shell per agent, attaching a front end to a running shell, cutting log tokens, setting ps-bash as Claude Code's or OpenCode's shell./ps-bash-styled-outputStyle ps-bash object output with CSS through Strata: Format-Styled (static ANSI), Show-Styled (interactive viewer with buttons and expandable rows), theme files, PSBASH_DEFAULT_FORMAT. ps-bash CSS 樣式輸出。 Use when: coloring or theming objects by kind/class, a custom .css/.pcss theme, making styled output the default, Format-Styled is not found.