forked from Crockan/MercuryToolbox
4.6 KiB
4.6 KiB
name, description
| name | description |
|---|---|
| mercury-toolbox | Use whenever Mercury Toolbox binaries are present and the task is local terminal inspection or triage: code and log reading, structured-data shaping, repo or runtime diagnosis, process, port, or lock troubleshooting, managed assembly or Unity analysis, or when the agent would otherwise reach for Get-Content, cat, tree, grep, findstr, netstat, tasklist, or ad-hoc PowerShell glue. |
Mercury Toolbox
Use this skill immediately when Mercury Toolbox binaries are present and the job is local terminal inspection, shaping, or triage. Read it first, then route through Mercury before falling back to raw dumps, legacy builtins, or ad-hoc shell glue.
First Choice Rules
- Prefer Mercury readers over
Get-Content,cat,tree,tasklist,netstat, or whole-file dumps. - For source and logs, usually start with
fileprobe,outline,snip, orchunkcat, then move tohitsnip,defsnip,refs,codeshape, orctxpackas needed. - Prefer compact text by default, switch to
--jsonwhen the next step parses the result, and switch to--toonor--format toonwhen the next consumer is an AI/model. - Pipe external JSON into
toononly when the producer is not a Mercury tool; TOON auto-detects JSON and emits dense TOON by default. - Prefer stdin and pipelines over reopening the same file repeatedly.
- Pair Mercury with modern CLI companions instead of legacy builtins.
- Treat
msudoas the top-level high-risk toolbox command: start withmsudo status --jsonor--helpbefore considering any privileged launch.
Modern Pairings
- Search and files:
rg,fd, and optionallyfzforPSFzffor interactive narrowing. - Viewing and editing:
bat,hexyl, andnvimfor bounded human reads instead of raw file dumps. - Data and text:
jq,yq, andsdfor structured queries and small safe rewrites. - Git and navigation:
git,lazygit,delta, andzoxidewhen they answer the question faster than shell glue. - Stats and diagnostics:
tokei,eza,procs,dust, andhyperfinefor fast shape or performance checks. - Utilities:
xh,ouch, andtealdeerfor quick HTTP work, archives, and terse help.
Modern Default Replacements
- Use
rgover recursivegrepor broadSelect-String. - Use
fdoverGet-ChildItem -Recursewhen you only need file discovery. - Use
bator Mercury readers over rawGet-Contentfor bounded viewing. - Use
jqoryqover manual JSON or YAML parsing. - Use
sdfor simple regex replacements andxhovercurlfor quick HTTP checks.
Fast Routing
- Code and Context:
fileprobe,outline,codeshape,refs,snip,defsnip,ctxpack,chunkcat,hitsnip,diagpick,gitshape,reposhape,dotnetshape - Data and Config:
cjson,ison,isonl,zon,tonl,jsonlgrep,jsonshape,mhash,toon,csvshape,sqliteshape,sqlshape,config - Logs, Process, and Waiting:
logshape,envdiff,proctree,sysshape,runprobe,await,argv,recent,pathshadow - Network and Locks:
portping,portunlock,msudo,unlock - Managed, Unity, and Binary Inspection:
asmtype,asmmember,asmref,asmapi,asmflow,llvmobjdump,llvmreadobj,llvmnm,peexports,peimports,pecalls,pesig,pestrrefs,drvshape,ioctlscan,unityasset,unityprobe,unitydiag,binmeta,stringscan
Job Routing
- Unknown file: start with
fileprobe <PATH>, then choosebinmeta,stringscan,snip, orchunkcatfrom the detected shape. - Repository map: start with
reposhape . --json, then usecodeshape,gitshape,dotnetshape,sqlshape, orctxpack. - Symbol or source context: start with
defsnip <SYMBOL> .orrefs <SYMBOL> ., then pack evidence withhitsniporctxpack. - Logs and failures: start with
diagpick <LOG>, then uselogshape,snip --match, orrunprobe. - Managed or Unity DLL: start with
asmref diagnose <ASSEMBLY> --resolve-dir <DIR>, then useasmtype,asmmember,asmflow, orasmapi diff. - Windows EXE/DLL: start with
peimports <PATH>; every catalog entry includes guided answer/trust/next actions, and PE deep tools also expose runtimereport_qualityandnext_actionsin--json/--toon. - Windows driver: start with
drvshape <SYS>, then followioctlscan,peimports --category device_io,pecalls --category device_io, orpestrrefs.
Read Next
- Read
references/command-catalog.mdbeside this skill when you need command-by-command routing, usage, and examples. - In packaged installs, the skill lives under
share\\mercury-toolbox\\skills\\mercury-toolboxand the generated prompt lives undershare\\mercury-toolbox\\docs\\ai.