Agent SkillsRobdel12/OrbitDock › orbitdock-memory-profiling

orbitdock-memory-profiling

GitHub

用于在macOS上通过CLI工具捕获OrbitDock内存快照,分析内存增长、泄漏及渲染热点,提供可复现的证据以辅助定位和修复内存问题。

.codex/skills/orbitdock-memory-profiling/SKILL.md Robdel12/OrbitDock

触发场景

调查高内存使用 检测内存随时间增长 怀疑存在内存泄漏 需要重现vmmap或xctrace证据

安装

npx skills add Robdel12/OrbitDock --skill orbitdock-memory-profiling -g -y
更多选项

非标准路径

npx skills add https://github.com/Robdel12/OrbitDock/tree/main/.codex/skills/orbitdock-memory-profiling -g -y

不安装直接使用

npx skills use Robdel12/OrbitDock@orbitdock-memory-profiling

指定 Agent (Claude Code)

npx skills add Robdel12/OrbitDock --skill orbitdock-memory-profiling -a claude-code -g -y

安装 repo 全部 skill

npx skills add Robdel12/OrbitDock --all -g -y

预览 repo 内 skill

npx skills add Robdel12/OrbitDock --list

SKILL.md

Frontmatter
{
    "name": "orbitdock-memory-profiling",
    "description": "Profile OrbitDock memory and runtime behavior using macOS CLI tools. Use when investigating high memory usage, memory growth over time, Core Animation or mmap\/vm_allocate-heavy stacks, leak suspicion, or regressions that need reproducible vmmap\/sample\/xctrace evidence."
}

OrbitDock Memory Profiling

Overview

Capture reproducible OrbitDock memory artifacts from the command line, then map hotspots back to likely UI or rendering causes.

Workflow

  1. Identify the target process.
  2. Capture baseline snapshots.
  3. Reproduce the issue.
  4. Capture post-repro snapshots.
  5. Compare outputs and form hypotheses.

Prefer using scripts/capture_memory_profile.sh for consistency.

Run The Script

Run a full capture for the latest OrbitDock process:

scripts/capture_memory_profile.sh

Run a targeted capture:

scripts/capture_memory_profile.sh \
  --pid 9718 \
  --sample-seconds 5 \
  --trace-seconds 10 \
  --out-dir /tmp/orbitdock-profile

Manual Commands

Use these directly when you need finer control:

pgrep -lf OrbitDock
ps -o pid,ppid,rss,vsz,%mem,etime,command -p <PID>
vmmap -summary <PID>
sample <PID> 5 1
xctrace record --template 'Allocations' --attach <PID> --time-limit 10s --output /tmp/orbitdock-alloc.trace
xctrace export --input /tmp/orbitdock-alloc.trace --toc

Permission Handling

If vmmap, sample, leaks, or xctrace fails with permission errors, request elevated execution and rerun the same command.

Interpretation Guide

Read references/interpretation.md for quick heuristics on:

  • CoreAnimation and image-backed growth
  • MALLOC_SMALL and fragmentation signals
  • Peak vs current footprint interpretation
  • Stack patterns that implicate rendering, focus rings, or image decode paths

Output Expectations

The capture script writes:

  • ps.txt
  • vmmap-summary.txt
  • sample.txt
  • allocations.trace and xctrace-toc.xml (if tracing enabled)
  • capture-summary.txt

Use these artifacts to compare before/after repro windows and support fixes with evidence.

版本历史

  • 6926bc3 当前 2026-07-25 08:33

同 Skill 集合

.codex/skills/api-transport-architecture/SKILL.md
.codex/skills/design-system/SKILL.md
.codex/skills/orbitdock-release-notes/SKILL.md
.codex/skills/rust-server-architecture/SKILL.md
.agents/design-system/SKILL.md

元信息

文件数
0
版本
6926bc3
Hash
594b1343
收录时间
2026-07-25 08:33

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-09 21:22
浙ICP备14020137号-1 $访客地图$