Skip to main content
skill CX Codex

pit-of-success — Claude Code skill: what it does, how to install

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

no license 137 installs ★ 107 updated 2026-10-05

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add jnsahaj/skills --skill pit-of-success -a claude-code
Open on GitHub

What pit-of-success 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.

What it helps with

  • 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 for the agent

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

How to install pit-of-success

1Skills CLI (Vercel)

npx skills add jnsahaj/skills --skill pit-of-success -a claude-code

2Manually: put the files in place

~/.claude/skills/pit-of-success/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/pit-of-success/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about pit-of-success

How to install pit-of-success in Claude Code?

Run npx skills add jnsahaj/skills --skill pit-of-success -a claude-code in your terminal.

What does the pit-of-success skill do?

It guides code review and refactoring to make erroneous method calls fail early or become impossible to express.

Does this skill only patch the broken call site?

It explicitly forbids fixing just the caller, requiring changes directly at the seam so every caller stays safe.

Similar skills

All skills for Code review and refactoring →

From the same set6

Project sponsors

Companies that keep this analytics open