coding-pitfalls

Documents countermeasures for nine LLM coding failure modes and agentic leverage patterns.

Updated Jul 13, 2016
One-click install
npx skills add https://github.com/yang-l/configs --skill coding-pitfalls-yang-l
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: coding-pitfalls
Source: https://github.com/yang-l/configs/tree/main/.claude/skills/coding-pitfalls
Command: npx skills add https://github.com/yang-l/configs --skill coding-pitfalls-yang-l

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? AI-generated code frequently suffers from silent assumptions, overcomplexity, security vulnerabilities, debugging decay, and multi-agent coordination failures. This Skill gives you a structured checklist of nine documented LLM coding failure modes with concrete fixes, so you can catch and correct these issues when writing, reviewing, debugging, or refactoring code. ## Core Features & Use Cases - Nine Failure Modes with Fixes: Covers silent assumptions and anchoring bias, overcomplexity, side-effect edits, self-referential test blindspots, N+1 patterns, security vulnerability amplification, debugging decay, deprecated API hallucination, and multi-agent coordination failure. - Leverage Patterns: Provides agentic engineering strategies including tests-first, naive-then-optimize, declarative goals, plan-before-execute, and context quality over volume. - Quick Reference Table: Maps each failure mode to its observable signal and its fix for fast triage during code review. - Use Case: When a bug fix has failed twice, load this Skill to stop the debugging decay loop, revert to the last known good state, and reason about root cause before editing again. ## Quick Start Review this diff against the coding pitfalls checklist and flag any silent assumptions, side-effect edits, or N+1 patterns before I merge it.

Frequently Asked Questions about coding-pitfalls

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

FAQPage Schema
How do I stop AI coding assistants from making silent assumptions?▼

Require the model to state assumptions explicitly before implementing and to present alternatives when multiple interpretations exist. This counters anchoring bias, where an initial framing persists despite contradictory evidence.

What are the most common LLM coding mistakes to check in code review?▼

The most common are silent assumptions, overcomplexity and abstraction bloat, unscoped side-effect edits, N+1 query patterns, and security vulnerabilities. AI-generated code shows roughly 2.7x higher vulnerability density than human code.

Why does AI debugging get worse after multiple fix attempts?▼

LLM effectiveness drops 60-80% after two or three fix attempts on the same bug, a pattern called debugging decay. The fix is to stop, revert to the last known good state, re-read the error with fresh context, and reason about root cause before editing.

Can I trust AI-generated tests for AI-generated code?▼

Not on their own. Models test what they think the code does rather than what the spec requires, systematically under-testing edge cases. Write acceptance criteria from the specification first, then generate tests against those criteria.

How do I prevent multi-agent pipelines from producing conflicting outputs?▼

Define explicit input/output contracts at every agent boundary and give each subagent a single stated done-condition. Have the orchestrator verify the final output against the original specification rather than trusting the last subagent's output.

When should I not rely on LLM knowledge of an API?▼

Never rely on it unverified for unfamiliar APIs, since models hallucinate deprecated methods and removed parameters from stale training data. Pin to current official documentation and verify method signatures before use.