# 安装 heap-snapshot-analysis

- 类型: Skill 技能
- 说明: Analyze V8 heap snapshots to investigate memory leaks and retention issues. Use when given .heapsnapshot files, asked to compare before/after snapshots, asked to find what retains objects, or investigating why objects survive GC. Provides snapshot parsing, comparison, retainer-path helpers, and scratchpad scripts.
- 仓库: https://github.com/microsoft/vscode

## 方式一 · 一键代装（复制提示词让 AI 代劳）

### Claude Code
```
请帮我安装 askskill 上的 "heap-snapshot-analysis" 技能：
1. 下载 https://raw.githubusercontent.com/microsoft/vscode/main/.github/skills/heap-snapshot-analysis/SKILL.md
2. 保存为 ~/.claude/skills/heap-snapshot-analysis/SKILL.md
3. 装好后重载技能，告诉我可以用了
```

### Codex
```
请帮我安装 askskill 上的 "heap-snapshot-analysis" 技能：
1. 下载 https://raw.githubusercontent.com/microsoft/vscode/main/.github/skills/heap-snapshot-analysis/SKILL.md
2. 保存为 ~/.codex/skills/heap-snapshot-analysis/SKILL.md
3. 装好后重载技能，告诉我可以用了
```

### Cursor
```
请帮我安装 askskill 上的 "heap-snapshot-analysis" 技能：
1. 下载 https://raw.githubusercontent.com/microsoft/vscode/main/.github/skills/heap-snapshot-analysis/SKILL.md
2. 保存为 ~/.cursor/skills/heap-snapshot-analysis/SKILL.md
3. 装好后重载技能，告诉我可以用了
```

## 方式二 · 命令行安装（原生命令与配置）

### Claude Code
```bash
mkdir -p '~/.claude/skills/heap-snapshot-analysis' && curl -fsSL 'https://raw.githubusercontent.com/microsoft/vscode/main/.github/skills/heap-snapshot-analysis/SKILL.md' -o '~/.claude/skills/heap-snapshot-analysis/SKILL.md'
```

### Codex
```bash
mkdir -p '~/.codex/skills/heap-snapshot-analysis' && curl -fsSL 'https://raw.githubusercontent.com/microsoft/vscode/main/.github/skills/heap-snapshot-analysis/SKILL.md' -o '~/.codex/skills/heap-snapshot-analysis/SKILL.md'
```

### Cursor
```bash
mkdir -p '~/.cursor/skills/heap-snapshot-analysis' && curl -fsSL 'https://raw.githubusercontent.com/microsoft/vscode/main/.github/skills/heap-snapshot-analysis/SKILL.md' -o '~/.cursor/skills/heap-snapshot-analysis/SKILL.md'
```
