pitfall

Capture session trial-and-error mistakes as five-field pitfall records.

8|2|Updated May 3, 2026
One-click install
npx skills add https://github.com/ejoongseok/claude-settings --skill pitfall
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pitfall
Source: https://github.com/ejoongseok/claude-settings/tree/main/claude-code/skills/pitfall
Command: npx skills add https://github.com/ejoongseok/claude-settings --skill pitfall

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you stop repeating the same session mistakes by capturing each “trial-and-error” as a structured 5-part record and storing it to the right place (memory or project documentation).

Core Features & Use Cases

  • 5-Element Pitfall Capture: Extracts and stores Tried, Failed, Cause, Fix, and Trigger as a single, consistent record.
  • Intelligent Medium Routing: Automatically decides whether the pitfall belongs in memory, documentation, or both based on whether it’s generally applicable or project-specific.
  • Duplicate Prevention (Idempotent SKIP): Runs a Grep check against likely sink locations and skips saving if the same trigger is already recorded.
  • Guardrails for Incomplete Data: If any of the five elements are missing, it pauses to ask the user for the missing parts and avoids saving incomplete entries.

Quick Start

Use the pitfall skill to capture the latest session mistake by asking the assistant to run: pitfall --target both --note "Briefly describe what went wrong and what you changed to fix it".

Frequently Asked Questions about pitfall

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I capture session mistakes to prevent repeating the same trial-and-error errors?

To capture session mistakes, you record each trial-and-error event as a structured five-field entry—Tried, Failed, Cause, Fix, and Trigger—storing it in memory or project documentation to prevent repeat failures.

What's the best way to deduplicate knowledge capture records across memory and project documentation?

The best way to deduplicate knowledge capture records is running a Grep-based idempotency check against likely sink locations before writing, skipping the save operation if the same trigger is already recorded.

How does structured pitfall routing decide whether to save to memory or project documentation?

Structured pitfall routing decides where to save by evaluating whether the captured mistake is generally applicable or project-specific, directing the five-field record to memory, documentation, or both accordingly.

What happens if I try to save incomplete pitfall data that is missing the cause or fix details?

When saving incomplete pitfall data missing any of the five required fields, the process pauses to ask you for the missing parts and avoids writing incomplete entries until all fields are present.

Do I need YAML frontmatter metadata to store trial-and-error mistakes with duplicate detection?

Yes, you need frontmatter-defined YAML metadata to store trial-and-error mistakes, as it is required for medium routing, target overrides, and hard validation of the five fields before writing or updating records.