Swift Concurrency
supabitapp/supaterm
Diagnose data races, convert callback-based code to async/await, implement actor isolation patterns, resolve Sendable conformance issues, and guide Swift 6 migration.
Profile memory usage in sidecar using Go pprof, system tools, and heap analysis.
$ npx skills add marcus/sidecar --skill profile-memory -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install marcus/sidecar profile-memory --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/marcus/sidecar.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/profile-memory .claude/skills/profile-memory && 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 "profile-memory" agent skill from https://github.com/marcus/sidecar/tree/main/.claude/skills/profile-memory into .claude/skills/profile-memory/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "profile-memory", 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/marcus/sidecar/tree/main/.claude/skills/profile-memoryType 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 marcus/sidecar --skill profile-memory -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install marcus/sidecar profile-memory --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/marcus/sidecar.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.claude/skills/profile-memory .agents/skills/profile-memory && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "profile-memory" agent skill from https://github.com/marcus/sidecar/tree/main/.claude/skills/profile-memory into .agents/skills/profile-memory/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "profile-memory", 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 marcus/sidecar --skill profile-memory -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install marcus/sidecar profile-memory --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/marcus/sidecar.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.claude/skills/profile-memory .cursor/skills/profile-memory && 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 "profile-memory" agent skill from https://github.com/marcus/sidecar/tree/main/.claude/skills/profile-memory into .cursor/skills/profile-memory/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "profile-memory", 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/marcus/sidecar.git --path .claude/skills/profile-memory--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 marcus/sidecar --skill profile-memory -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install marcus/sidecar profile-memory --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/marcus/sidecar.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.claude/skills/profile-memory .gemini/skills/profile-memory && 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 "profile-memory" agent skill from https://github.com/marcus/sidecar/tree/main/.claude/skills/profile-memory into .gemini/skills/profile-memory/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "profile-memory", 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 marcus/sidecar profile-memoryInstalls 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 marcus/sidecar --skill profile-memory -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/marcus/sidecar.git skills-src && mkdir -p .github/skills && cp -r skills-src/.claude/skills/profile-memory .github/skills/profile-memory && 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 "profile-memory" agent skill from https://github.com/marcus/sidecar/tree/main/.claude/skills/profile-memory into .github/skills/profile-memory/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "profile-memory", 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 marcus/sidecar --skill profile-memory -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install marcus/sidecar profile-memory --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/marcus/sidecar.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.claude/skills/profile-memory .opencode/skills/profile-memory && 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 "profile-memory" agent skill from https://github.com/marcus/sidecar/tree/main/.claude/skills/profile-memory into .opencode/skills/profile-memory/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "profile-memory", 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.
profile-memoryProfile memory usage in sidecar using Go pprof, system tools, and heap analysis.
Profile Memory is an agent skill from marcus/sidecar. Profile memory usage in sidecar using Go pprof, system tools, and heap analysis. Covers identifying memory leaks, goroutine leaks, file descriptor accumulation, and CPU profiling. Use when investigating memory issues, profiling performance, debugging memory leaks, or diagnosing unresponsive plugins.
Its SKILL.md is about 1.9k 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 Async programming and Performance optimization. It works with SQLite. The repository describes itself as: Use sidecar next to CLI agents for diffs, file trees, conversation history, and task management with td. The licence is MIT.
4 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 3792a4e. 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:
curlgobrewaptFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use curl, which can reach the network depending on how they are called.
From 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.
Profile Memory loads about 1.9k tokens when it runs. Until then it costs about 79 tokens; SKILL.md has 540 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 marcus/sidecar at commit 3792a4e, republished under its MIT licence (© marcus). 540 words, ~1,851 tokens.
.claude/skills/profile-memory/SKILL.md (or your agent's skills folder).| Symptom | Tool | Action |
|---|---|---|
| High RSS / memory growth | vmmap, pprof heap | Check system memory, then heap profile |
| Too many open files | lsof | Check FD count and breakdown |
| High CPU | pprof cpu, ps | Capture CPU profile |
| Goroutine leak | pprof goroutines | Check goroutine count and stacks |
| Plugin unresponsive | lsof + goroutines | Check SQLite locks, blocked goroutines |
Triage flow: Is RSS high? -> Check FD count -> Check vmmap -> Check heap profilepgrep -f sidecar
ps aux | grep sidecar# RSS, VSZ, CPU%, thread count
ps -o pid,rss,vsz,%cpu,nlwp -p <PID>
# Human-readable RSS
ps -o pid,rss -p <PID> | awk 'NR>1{printf "%d MB\n", $2/1024}'
# Watch over time
while true; do ps -o rss,%cpu -p <PID> | tail -1; sleep 5; donemacOS (vmmap):
vmmap --summary <PID>Key sections: VM_ALLOCATE (Go heap), MALLOC (C heap/SQLite), Physical footprint, Swapped.
Red flags:
Linux:
cat /proc/<PID>/status | grep -E 'VmRSS|VmSize|Threads'
pmap -x <PID> | tail -5
ls /proc/<PID>/fd | wc -l# Count and breakdown
lsof -p <PID> | wc -l
lsof -p <PID> | awk '{print $5}' | sort | uniq -c | sort -rn
# Find leaked files
lsof -p <PID> | grep REG | awk '{print $9}' | sort | uniq -c | sort -rn | head -20
# Check session file leaks
lsof -p <PID> | grep -c '\.claude/projects'
lsof -p <PID> | grep -c '\.codex/sessions'
# Watch FD count
while true; do echo "$(date): $(lsof -p <PID> 2>/dev/null | wc -l) FDs"; sleep 30; doneHealthy baselines: Total FDs 50-150, REG files 10-30, PIPEs 10-30, DIRs 5-15.
Red flags: 1000+ total FDs, same file opened 4+ times, growing count over time.
# macOS
ps -M -p <PID> | wc -l
# Linux
ls /proc/<PID>/task | wc -l
# Expected: 20-60 threads. 100+ = goroutine leak likelySIDECAR_PPROF=1 sidecar # Default port 6060
SIDECAR_PPROF=6061 sidecar # Custom portcurl http://localhost:6060/debug/pprof/heap > heap.prof
go tool pprof -top heap.prof
go tool pprof heap.prof # Interactive: top20, list <func>, webcurl http://localhost:6060/debug/pprof/allocs > allocs.prof
go tool pprof -top allocs.prof# Count
curl -s http://localhost:6060/debug/pprof/goroutine?debug=1 | head -1
# Full stacks
curl http://localhost:6060/debug/pprof/goroutine?debug=2 > goroutines.txt
# Find stuck goroutines
grep -A5 'runtime.chanrecv' goroutines.txtcurl http://localhost:6060/debug/pprof/heap?debug=1 | head -30curl http://localhost:6060/debug/pprof/heap > heap1.prof
# Wait (1 hour or overnight)
curl http://localhost:6060/debug/pprof/heap > heap2.prof
go tool pprof -base heap1.prof heap2.prof
# Then: top20./scripts/mem-monitor.sh # Default: port 6060, 60s interval
./scripts/mem-monitor.sh 6061 30 # Custom port and intervalOutput: CSV time,heap_alloc_bytes,heap_inuse_bytes,goroutines,rss_mb to mem-YYYYMMDD-HHMMSS.log.
curl http://localhost:6060/debug/pprof/profile?seconds=30 > cpu.prof
go tool pprof -top cpu.prof
go tool pprof cpu.prof # Interactive: top20, list <func>, webgo tool pprof -http=:8080 http://localhost:6060/debug/pprof/heapRequires Graphviz (brew install graphviz / apt install graphviz) for flame graphs.
Goroutine leaks: Count should stabilize at 20-50 after startup. Steady growth = leak. Search for runtime.chanrecv1, runtime.chansend1, time.Sleep.
Heap growth: HeapAlloc should stabilize after loading sessions. Consistent upward trend = leak.
Common pprof signatures: bufio.Scanner (buffer not returned), json.Unmarshal (large objects retained), append in loops (slice growing), channel operations (blocked senders/receivers).
curl -s http://localhost:6060/debug/pprof/goroutine?debug=2 | grep -A10 'monitor\|td'lsof -p <PID> | grep '\.db'curl -s http://localhost:6060/debug/pprof/goroutine?debug=2 | grep -B2 'fetchData\|FetchData'vmmap --summary <PID> | grep -E 'Physical|Swapped'Common causes: SQLite locked by concurrent td CLI, memory pressure causing swap thrashing, goroutine blocked on unread channel, accumulating fetchData() goroutines.
Files: internal/adapter/claudecode/watcher.go etc. Uses fsnotify to watch directories.
Symptoms: RSS grows to 5-15GB overnight, lsof shows 1000+ session files open.
lsof -p <PID> | grep '\.claude/projects' | wc -l
lsof -p <PID> | grep '\.codex/sessions' | wc -lOutputBuffer.Update() uses strings.Split() creating substrings sharing backing array. NOT a leak if Update() keeps being called. Only retains if polling stops.
Entering interactive mode without incrementing generation counter creates parallel poll chains. Doubles CPU but no memory leak. Fix: increment shellPollGeneration or pollGeneration on entry.
Go runtime uses MADV_FREE marking pages reusable without returning to OS. RSS appears high but memory is available. NOT a leak. Use vmmap --summary and compare "Physical footprint (peak)" vs current.
ps -o pid,rss,%cpu -p <PID> -- establish baselinelsof -p <PID> | wc -l -- if >200, focus on FD leaklsof -p <PID> | grep REG | awk '{print $9}' | sort | uniq -c | sort -rn | head -20vmmap --summary <PID> -- RESIDENT vs VIRTUAL, region countSIDECAR_PPROF=1, reproduce the leakSIDECAR_PPROF=1 sidecarcurl .../heap > baseline.profcaffeinate -i on macOS)go tool pprof -base baseline.prof morning.prof© marcus, 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 .claude/skills/profile-memory of marcus/sidecar.
Open the folder on GitHubat commit 3792a4e
Profile Memory 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 |
|---|---|---|---|---|---|---|
| Profile Memory this skillmarcus/sidecar | 1.1k | — | ~1.9k | Automated safety check: Pass | MIT | |
| Swift Concurrencysupabitapp/supaterm | 172 | — | ~3.3k | Automated safety check: Pass | Custom licence | |
| Swift ConcurrencyAFK-surf/OpenBridge | 430 | — | ~2.8k | Automated safety check: Pass | MIT | |
| Golang Prodavila7/claude-code-templates | 32k | 8 repos | ~1.9k | Automated safety check: Pass | MIT | |
| Python Prodavila7/claude-code-templates | 32k | 8 repos | ~1.8k | Automated safety check: Pass | MIT | |
| Python ExpertRightNow-AI/openfang | 18k | — | ~765 | Automated safety check: Pass | Apache-2.0 |
supabitapp/supaterm
Diagnose data races, convert callback-based code to async/await, implement actor isolation patterns, resolve Sendable conformance issues, and guide Swift 6 migration.
AFK-surf/OpenBridge
Expert guidance on Swift Concurrency best practices, patterns, and implementation.
davila7/claude-code-templates
Master Go 1.21+ with modern patterns, advanced concurrency, performance optimization, and production-ready microservices.
davila7/claude-code-templates
Master Python 3.12+ with modern features, async programming, performance optimization, and production-ready practices.
RightNow-AI/openfang
Python expert for stdlib, packaging, type hints, async/await, and performance optimization
ascend-ai-coding/awesome-ascend-skills
面向 Ascend PyTorch Profiler / msprof DB(如 ascendpytorchprofiler.db、msprof.db)的 SQL 分析技能。将自然语言问题(算子耗时、通信、下发、调度、schema/table 查询)转为安全可执行 SQL,并按需从官方文档提取表结构详情。
marcus/sidecar
Create conversation adapters for importing AI chat history from different tools (Claude Code, Cursor, Warp, Codex, etc.).
marcus/sidecar
Create declarative modals using the modal library API. An agent skill from marcus/sidecar.
marcus/sidecar
Create new sidecar plugins implementing the plugin.Plugin interface, rendering views with Bubble Tea, handling keyboard input via keymap contexts, and integrating with the app shell (footer hints…
marcus/sidecar
Project switching implementation in sidecar: project discovery, state management, UI flow, modal rendering, filtering, theme preview, and plugin reinitialization.
marcus/sidecar
Interactive shell/TTY integration with tmux session management, shell command execution, control-mode output capture with polling fallback, native cursor rendering, lazy scrollback, selection, paste…
marcus/sidecar
Writing and maintaining the Sidecar Docusaurus documentation site, including page structure, doc authoring, blog posts, styling, images, and deployment workflow.
Works with
Categories
Profile memory usage in sidecar using Go pprof, system tools, and heap analysis. Profile Memory is an agent skill from marcus/sidecar. Profile memory usage in sidecar using Go pprof, system tools, and heap analysis.
Profile Memory fits situations like: investigating memory issues; profiling performance; debugging memory leaks; diagnosing unresponsive plugins.
Run `npx skills add marcus/sidecar --skill profile-memory -a claude-code`. Or copy the skill folder (.claude/skills/profile-memory in marcus/sidecar) into .claude/skills/profile-memory in your project. Claude Code loads it when a task matches its description.
Run `npx skills add marcus/sidecar --skill profile-memory -a codex`. Or copy the skill folder (.claude/skills/profile-memory in marcus/sidecar) into .agents/skills/profile-memory 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 marcus/sidecar --skill profile-memory -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/profile-memory, .gemini/skills/profile-memory, .github/skills/profile-memory and .opencode/skills/profile-memory in your project.
Going by SKILL.md and its folder, Profile Memory needs the command-line tools its instructions call (curl, go, brew and apt).
SKILL.md contains no URLs. Its commands use curl, which can reach the network depending on how they are called. 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.
Profile Memory 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.9k tokens (SKILL.md is roughly 7.4k 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 Profile Memory: Swift Concurrency (supabitapp/supaterm, 172 stars), Swift Concurrency (AFK-surf/OpenBridge, 430 stars), Golang Pro (davila7/claude-code-templates, 32k stars) and Python Pro (davila7/claude-code-templates, 32k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
marcus (a GitHub user) maintains it in marcus/sidecar, which has 1,085 GitHub stars. The repository holds 19 skills in this directory. The repository was last updated on October 5, 2026.
Source: marcus/sidecar on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.