# context-layer-consolidation

The context-layer-consolidation Claude Code skill keeps a context wiki coherent by working through a deterministic lint report queue. It handles the queue before dream publisher creates its branch and commit.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 148 installs · ★ 101 repo stars
- Author: PostHog
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/PostHog/ai-plugin/tree/HEAD/skills/context-layer-consolidation/SKILL.md
- Updated: 2026-10-24
- Security check: automated, 2026-11-17 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/context-layer-consolidation

## What it does

The skill runs `scripts/lint --report` and works through the findings in the mounted wiki. It removes claims without supporting sources, marks outdated priorities, and links decisions to their replacements. Similar pages are merged, with a wikilink left on the old subject.

Edits are limited to sourced Markdown under `org/`, `areas/`, `decisions/`, and existing Space pages. Repository instructions, generated indexes, and `scripts/` stay untouched; structural failures go into the run summary for the server to fix. The summary also names every deletion, and dream publisher carries it into the commit message.

After editing, the skill runs `scripts/lint` again. Disagreements are resolved only when evidence supports a decision; otherwise, they remain explicit.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add PostHog/ai-plugin --skill context-layer-consolidation -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/context-layer-consolidation/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/context-layer-consolidation/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add PostHog/ai-plugin --skill context-layer-consolidation -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/context-layer-consolidation/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add PostHog/ai-plugin --skill context-layer-consolidation -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/context-layer-consolidation/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install PostHog/ai-plugin skills/context-layer-consolidation
```

2. **Manually: put the files in place**
- File: `.github/skills/context-layer-consolidation/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add PostHog/ai-plugin --skill context-layer-consolidation -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/PostHog/ai-plugin --path skills/context-layer-consolidation
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/context-layer-consolidation/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add PostHog/ai-plugin --skill context-layer-consolidation -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/PostHog/ai-plugin/tree/HEAD/skills/context-layer-consolidation/SKILL.md

## When to use it
- work through lint findings in a context wiki
- link replaced decisions to their successors
- merge similar pages while preserving a link from the old subject
- split oversized pages and add sources

## Example prompts
- Clean up the context wiki using the `scripts/lint --report` findings.
- Process the lint queue before dream publisher creates its branch.
- Merge similar pages and keep a wikilink from the old subject.

## Similar
- [ktx-data-agent-context-layer](https://affpapa.org/en/nevibecode/skills/ktx-data-agent-context-layer.md) — skill · 158 installs
- [ktx-ai-data-agents-context-layer](https://affpapa.org/en/nevibecode/skills/ktx-ai-data-agents-context-layer.md) — skill · 157 installs
- [ad-campaign-consolidation](https://affpapa.org/en/nevibecode/skills/ad-campaign-consolidation.md) — skill · 25800 installs
- [reviewer-consolidation](https://affpapa.org/en/nevibecode/prompts/reviewer-consolidation.md) — prompt · ★ 336 repo stars
- [curator-consolidation](https://affpapa.org/en/nevibecode/prompts/curator-consolidation.md) — prompt · ★ 336 repo stars
- [layer-pixel-art](https://affpapa.org/en/nevibecode/skills/layer-pixel-art.md) — skill · 5100 installs

From the same set: [posthog/ai-plugin](https://affpapa.org/en/nevibecode/by/posthog/ai-plugin.md) — 82 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
