# pit-of-success

pit-of-success audits interfaces and refactors code so the most intuitive call path remains the safe and correct one.

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

## What it does

The skill inspects public integration seams like exported functions, hook return values, schemas, and component props. It checks whether a developer making the standard call breaks system behavior by omitting undocumented conventions.

Rather than patching a single location, the assistant pushes invariants directly into the shared interface. It narrows types to make invalid states unrepresentable, gives clear names to dangerous endpoints, and deletes temporary wrapper functions. Changes get confirmed through a targeted test and a `grep` sweep across call sites.

Relying on comments like call this helper first is forbidden when the underlying raw interface remains accessible.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add jnsahaj/skills --skill pit-of-success -a claude-code
```

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

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add jnsahaj/skills --skill pit-of-success -a codex
```

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

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add jnsahaj/skills --skill pit-of-success -a cursor
```

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

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install jnsahaj/skills skills/pit-of-success
```

2. **Manually: put the files in place**
- File: `.github/skills/pit-of-success/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add jnsahaj/skills --skill pit-of-success -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/jnsahaj/skills --path skills/pit-of-success
```

### Windsurf (Devin Desktop)

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

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add jnsahaj/skills --skill pit-of-success -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/jnsahaj/skills/tree/HEAD/skills/pit-of-success/SKILL.md

## When to use it
- remove API footguns where intuitive calls break system rules
- narrow schemas and types to reject invalid application states
- eliminate redundant wrapper helpers and warning comments
- refactor public seams so safe paths become default behavior

## Example prompts
- Review this hook for hidden footguns using the pit-of-success approach
- Refactor these component props so invalid combinations cannot be passed

## Similar
- [dx-review](https://affpapa.org/en/nevibecode/skills/dx-review.md) — skill · 1 install
- [public-api-design-review](https://affpapa.org/en/nevibecode/skills/public-api-design-review.md) — skill · 10200 installs
- [swift-api-design-guidelines](https://affpapa.org/en/nevibecode/skills/swift-api-design-guidelines.md) — skill · 3100 installs
- [kotlin-api-design](https://affpapa.org/en/nevibecode/skills/kotlin-api-design.md) — skill · 1300 installs
- [swift-api-design-guidelines-skill](https://affpapa.org/en/nevibecode/skills/swift-api-design-guidelines-skill.md) — skill · 1200 installs
- [api-design](https://affpapa.org/en/nevibecode/skills/margelo-api-design.md) — skill · 1400 installs

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