# tailslayer-dram-hedged-reads

Guides coding assistants in setting up C++ hedged reads across DRAM channels. It helps eliminate memory tail latency caused by periodic DRAM refresh pauses.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 580 installs · ★ 88
- Author: reason-machines
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/reason-machines/trending-skills/tree/HEAD/skills/tailslayer-dram-hedged-reads/SKILL.md
- Updated: 2026-10-09
- HTML: https://affpapa.org/en/nevibecode/skills/tailslayer-dram-hedged-reads

## What it does

This skill teaches coding agents how to integrate the Tailslayer C++ library. Periodic DRAM refresh cycles stall RAM reads and create latency spikes. Tailslayer counters this by storing copies of your data across separate memory channels with out-of-sync refresh timers. Worker threads issue parallel reads to every copy. The earliest channel to reply supplies the value.

Channel routing relies on undocumented scrambling offsets and selection bits. The library works on AMD Zen, Intel architectures, and AWS Graviton servers. Standard configurations use bits 6, 7, or 8, while Graviton targets bit 8. By default, the `HedgedReader` template handles 2 channel replicas. Exceeding two replicas requires using benchmark programs in `discovery/benchmark/`.

Running the included `trefi_probe` and hedged benchmarks requires `sudo` privileges and real-time scheduling via `chrt`. Each background reader thread pins directly to a dedicated CPU core with `tailslayer::pin_to_core`, so thread contention on unpinned cores will break timing guarantees.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill tailslayer-dram-hedged-reads -a claude-code
```

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

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill tailslayer-dram-hedged-reads -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/tailslayer-dram-hedged-reads/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill tailslayer-dram-hedged-reads -a cursor
```

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

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install reason-machines/trending-skills tailslayer-dram-hedged-reads
```

2. **Manually: put the files in place**
- File: `.github/skills/tailslayer-dram-hedged-reads/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill tailslayer-dram-hedged-reads -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/reason-machines/trending-skills --path skills/tailslayer-dram-hedged-reads
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/tailslayer-dram-hedged-reads/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill tailslayer-dram-hedged-reads -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/reason-machines/trending-skills/tree/HEAD/skills/tailslayer-dram-hedged-reads/SKILL.md

## When to use it
- cut DRAM tail latency spikes caused by refresh cycles
- set up hedged memory reads with `tailslayer::HedgedReader`
- pin reader threads to separate CPU cores
- detect optimal memory channel bits across AMD, Intel, or AWS Graviton
- measure tREFI refresh timing using the `trefi_probe` utility

## Example prompts
- Show me how to include `tailslayer/hedged_reader.hpp` and configure a 2-way hedged reader for `uint8_t`.
- Implement `tailslayer::HedgedReader` passing custom arguments to signal and work handlers via `ArgList`.
- How do I run the `hedged_read_cpp` benchmark with `--channel-bit 8` using `chrt`?

## Similar
- [migrate-to-shoehorn](https://affpapa.org/en/nevibecode/skills/migrate-to-shoehorn.md) — skill · 475388 installs
- [write-swift](https://affpapa.org/en/nevibecode/skills/write-swift.md) — skill · 119300 installs
- [megacave](https://affpapa.org/en/nevibecode/skills/megacave.md) — skill · 25400 installs
- [find-docs](https://affpapa.org/en/nevibecode/skills/find-docs.md) — skill · 9400 installs
- [typescript-advanced-types](https://affpapa.org/en/nevibecode/skills/typescript-advanced-types.md) — skill · 92169 installs
- [smart-explore](https://affpapa.org/en/nevibecode/skills/smart-explore.md) — skill · 7300 installs

From the same set: [reason-machines/trending-skills](https://affpapa.org/en/nevibecode/by/reason-machines/trending-skills.md) — 186 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
