Agent SkillsRobdel12/OrbitDock › orbitdock-memory-profiling

orbitdock-memory-profiling

GitHub

提供 OrbitDock 在 macOS 上的内存与运行时行为分析技能,通过脚本或 CLI 工具捕获快照、对比差异并解读热点,用于排查内存泄漏及性能问题。

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

Trigger Scenarios

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

Install

npx skills add Robdel12/OrbitDock --skill orbitdock-memory-profiling -g -y
More Options

Non-standard path

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

Use without installing

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.

Version History

  • 6926bc3 Current 2026-07-25 08:33

Same Skill Collection

.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

Metadata

Files
0
Version
6926bc3
Hash
594b1343
Indexed
2026-07-25 08:33

Accueil - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-27 05:01
浙ICP备14020137号-1 $Carte des visiteurs$