Recording
codewhale-hq/Codewhale
Capture screenshots on registered computers, record on macOS or HarmonyOS, and manage saved captures.
Profile-guided optimization (PGO) for the pi binary. An agent skill from dimetron/pi-go.
$ npx skills add dimetron/pi-go --skill pgo -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install dimetron/pi-go pgo --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/dimetron/pi-go.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.pi-go/skills/pgo .claude/skills/pgo && rm -rf skills-srcUse ~/.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/
Install the "pgo" agent skill from https://github.com/dimetron/pi-go/tree/main/.pi-go/skills/pgo into .claude/skills/pgo/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "pgo", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/dimetron/pi-go/tree/main/.pi-go/skills/pgoType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add dimetron/pi-go --skill pgo -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install dimetron/pi-go pgo --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/dimetron/pi-go.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.pi-go/skills/pgo .agents/skills/pgo && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "pgo" agent skill from https://github.com/dimetron/pi-go/tree/main/.pi-go/skills/pgo into .agents/skills/pgo/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "pgo", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add dimetron/pi-go --skill pgo -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install dimetron/pi-go pgo --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/dimetron/pi-go.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.pi-go/skills/pgo .cursor/skills/pgo && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "pgo" agent skill from https://github.com/dimetron/pi-go/tree/main/.pi-go/skills/pgo into .cursor/skills/pgo/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "pgo", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/dimetron/pi-go.git --path .pi-go/skills/pgo--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add dimetron/pi-go --skill pgo -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install dimetron/pi-go pgo --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/dimetron/pi-go.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.pi-go/skills/pgo .gemini/skills/pgo && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "pgo" agent skill from https://github.com/dimetron/pi-go/tree/main/.pi-go/skills/pgo into .gemini/skills/pgo/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "pgo", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install dimetron/pi-go pgoInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add dimetron/pi-go --skill pgo -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/dimetron/pi-go.git skills-src && mkdir -p .github/skills && cp -r skills-src/.pi-go/skills/pgo .github/skills/pgo && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "pgo" agent skill from https://github.com/dimetron/pi-go/tree/main/.pi-go/skills/pgo into .github/skills/pgo/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "pgo", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add dimetron/pi-go --skill pgo -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install dimetron/pi-go pgo --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/dimetron/pi-go.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.pi-go/skills/pgo .opencode/skills/pgo && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "pgo" agent skill from https://github.com/dimetron/pi-go/tree/main/.pi-go/skills/pgo into .opencode/skills/pgo/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "pgo", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
pgoProfile-guided optimization (PGO) for the pi binary. An agent skill from dimetron/pi-go.
Pgo is an agent skill from dimetron/pi-go. Profile-guided optimization (PGO) for the pi binary. Use when recording a new PGO profile (make record-pgo), when a build behaves differently after a profile is added or removed, when default.pgo is missing or stale, or when asked to optimize the pi binary with a CPU profile. Covers the go.dev/doc/pgo workflow: collecting a representative CPU profile, merging profiles, and building with PGO via default.pgo in the main package directory.
Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
The repository describes itself as: Go implementation of AI coding agent. The licence is MIT.
5 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 24d1f2b. It shows what the files ask for, not the result of running them.
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.
Shell commands in SKILL.md call:
gomakeFrom the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
go.devFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Pgo loads about 1.4k tokens when it runs. Until then it costs about 113 tokens; SKILL.md has 711 words of instructions outside code blocks.
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.
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.
The full file from dimetron/pi-go at commit 24d1f2b, republished under its MIT licence (© dimetron). 711 words, ~1,392 tokens.
.claude/skills/pgo/SKILL.md (or your agent's skills folder).Source: go.dev/doc/pgo (authoritative).
PGO feeds a CPU pprof profile from representative runs of the application
back into the compiler for the next build, which uses it to make more informed
optimization decisions (e.g. more aggressive inlining of hot functions). As of
Go 1.22, representative programs improve ~2–14%. The compiler expects a CPU
pprof profile — exactly what runtime/pprof and net/http/pprof produce.
A profile that is not representative of real behavior yields little or no gain. Microbenchmarks are bad PGO candidates — they exercise a small part of the program. Collect from a representative workload instead. For pi-go that means both of the binary's hot paths, not one:
pi --mode print scenario per tool family.RenderMessages, collapseBlankLines, and
matchLexer. A live profile attributed ~24% of CPU to the ansi.Strip call
blankFast replaces; bubbletea calls View() once per token during
streaming, so this is a first-class hot path. It is exercised by the render
benchmarks, not by --mode print.A profile from only one workload optimizes only one half of the program.
make record-pgo does the whole loop:
make build).PI_EVAL_CPU_PROFILE=tmp/pgo, so every
scenario's pi --mode print writes a per-scenario CPU profile via the
--cpuprofile flag.-cpuprofile tmp/pgo/render.pprof.cmd/pi/default.pgo with
go tool pprof -proto.go build auto-detects default.pgo in the main package directory
(cmd/pi/) and enables PGO — no -pgo flag needed. So make build after a
record-pgo is a PGO build.
For a one-off profile of a specific workload:
pi --cpuprofile /tmp/pi.pprof --mode print "some representative prompt"The --cpuprofile flag writes a runtime CPU profile for the process lifetime
and flushes it on exit. It is a persistent flag, so it works on subcommands too
(pi memory mine . --cpuprofile /tmp/mine.pprof).
go build detects cmd/pi/default.pgo and enables PGO
(-pgo=auto).go build -pgo=off.go build -pgo=/tmp/foo.pprof ./cmd/pi. A path applies to
all main packages in the invocation, so keep one profile per binary.go tool pprof -proto a.pprof b.pprof > merged.pprofThe merge is a straight sum of samples regardless of wall duration, so when profiling a long-running server, keep all slices the same duration or longer slices dominate. For pi-go's per-scenario profiles this is not a concern — each scenario is a short, bounded run.
Go PGO is robust to skew between the profiled version and the version being built:
Consequence: collect a fresh profile regularly. Degradation accumulates slowly as code drifts from the profile, and new code paths get no PGO benefit until a new profile reflects them. After a large refactor that renames or moves many functions, re-record.
make record-pgo is the one-step refresh.default.pgo — the docs recommend committing the profile so builds
are reproducible and performant from a fresh clone. It is a build input, not
scratch.make clean removes cmd/pi/default.pgo — re-run make record-pgo
after a clean if you want PGO back.go build -x ./cmd/pi 2>&1 | grep -i pgo shows the
-pgo flag the toolchain passes. Or check the binary size / go version -m
for the profile./pgo — explain the PGO workflow and check whether default.pgo is current.make record-pgo — record a fresh profile from the eval suite.pi --cpuprofile /tmp/pi.pprof --mode print "..." — one-off manual profile.go build -pgo=off ./cmd/pi — build without PGO to compare.© dimetron, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .pi-go/skills/pgo of dimetron/pi-go.
Open the folder on GitHubat commit 24d1f2b
Pgo 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Pgo this skilldimetron/pi-go | 207 | — | ~1.4k | Automated safety check: Pass | MIT | |
| Recordingcodewhale-hq/Codewhale | 41k | — | ~540 | Automated safety check: Pass | MIT | |
| Profileccusage/ccusage | 19k | — | ~430 | Automated safety check: Pass | Custom licence | |
| Write Guidevercel/next.js | 143k | — | ~1.6k | Automated safety check: Pass | MIT | |
| Cpu ProfileClickHouse/ClickHouse | 50k | — | ~1.9k | Automated safety check: Notes | Apache-2.0 | |
| Architecture Decision Recordsaffaan-m/ECC | 275k | 4 repos | ~1.8k | Automated safety check: Pass | MIT |
codewhale-hq/Codewhale
Capture screenshots on registered computers, record on macOS or HarmonyOS, and manage saved captures.
ccusage/ccusage
Profiles ccusage performance. An agent skill from ccusage/ccusage.
vercel/next.js
Generates technical guides that teach real-world use cases through progressive examples.
ClickHouse/ClickHouse
Profile a ClickHouse query using the sampling query profiler and system.tracelog.
affaan-m/ECC
Capture architectural decisions as numbered ADR markdown files in docs/adr/ with context, alternatives considered, consequences, and an index README.
affaan-m/ECC
在Claude Code会话期间,将做出的架构决策捕获为结构化的架构决策记录(ADR)。自动检测决策时刻,记录上下文、考虑的替代方案和理由。维护一个ADR日志,以便未来的开发人员理解代码库为何以当前方式构建。
dimetron/pi-go
Record a test run, a TUI session, or any terminal command as a GIF with VHS and attach it to a GitHub PR as a release-hosted asset, never a repo commit.
dimetron/pi-go
Generate AGENTS.md files for Go, Rust, TypeScript, and Java projects.
dimetron/pi-go
A skill your agent uses whenever writing tests for Bubble Tea (charmbracelet/bubbletea) TUI applications in Go.
dimetron/pi-go
Index a folder's contents into the MemPalace semantic memory for search and retrieval.
dimetron/pi-go
Nightly sweep of the last 24h of pi-go sessions — anomalous runs, loop aborts, tool error rates, token waste, real prompt-token spend, and whether the observation and palace pipelines are still…
dimetron/pi-go
Tune macOS resource limits and sysctls for best performance with Go development, Docker/OrbStack, and Linux VMs.
Profile-guided optimization (PGO) for the pi binary. An agent skill from dimetron/pi-go. Pgo is an agent skill from dimetron/pi-go. Profile-guided optimization (PGO) for the pi binary.
Pgo fits situations like: recording a new PGO profile (make record-pgo); A build behaves differently after a profile is added; default.pgo is missing; asked to optimize the pi binary with a CPU profile.
Run `npx skills add dimetron/pi-go --skill pgo -a claude-code`. Or copy the skill folder (.pi-go/skills/pgo in dimetron/pi-go) into .claude/skills/pgo in your project. Claude Code loads it when a task matches its description.
Run `npx skills add dimetron/pi-go --skill pgo -a codex`. Or copy the skill folder (.pi-go/skills/pgo in dimetron/pi-go) into .agents/skills/pgo in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add dimetron/pi-go --skill pgo -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/pgo, .gemini/skills/pgo, .github/skills/pgo and .opencode/skills/pgo in your project.
Going by SKILL.md and its folder, Pgo needs the command-line tools its instructions call (go and make).
SKILL.md names 1 domain. As links in the text: go.dev. This is read from the text; nothing was executed.
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.
Pgo is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.4k tokens (SKILL.md is roughly 5.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Pgo: Recording (codewhale-hq/Codewhale, 41k stars), Profile (ccusage/ccusage, 19k stars), Write Guide (vercel/next.js, 143k stars) and Cpu Profile (ClickHouse/ClickHouse, 50k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
dimetron (a GitHub user) maintains it in dimetron/pi-go, which has 207 GitHub stars. The repository holds 21 skills in this directory. The repository was last updated on October 1, 2026.
Source: dimetron/pi-go on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.