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
npx skills add jnsahaj/skills --skill pit-of-success -a claude-codeWhat 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-code2Manually: put the files in place
~/.claude/skills/pit-of-success/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/pit-of-success/
1Skills CLI (Vercel)
npx skills add jnsahaj/skills --skill pit-of-success -a codex2Manually: put the files in place
.agents/skills/pit-of-success/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add jnsahaj/skills --skill pit-of-success -a cursor2Manually: put the files in place
.cursor/skills/pit-of-success/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install jnsahaj/skills skills/pit-of-success2Manually: put the files in place
.github/skills/pit-of-success/SKILL.md1Skills CLI (Vercel)
npx skills add jnsahaj/skills --skill pit-of-success -a gemini-cli2Platform CLI
gemini skills install https://github.com/jnsahaj/skills --path skills/pit-of-successManually: put the files in place
.devin/skills/pit-of-success/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add jnsahaj/skills --skill pit-of-success -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
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.