Skip to content
Back to skills

Principle Generalize From Rejection

ASecurity

Apply when a mechanical gate — a lint, validator, blocked-command guard, or CI check — rejects your output for the same reason twice in one session. Fix the generation pattern producing the violation, not just the specific instance.

  • 4 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 19, 2026
ai-agents

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned September 19, 2026

npx -y skills add EdbertChan/catstack --skill principle-generalize-from-rejection --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Principle Generalize From Rejection?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Principle Generalize From Rejection
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/edbertchan-principle-generalize-from-rejection/badge)](https://www.skillsdirectory.com/skills/edbertchan-principle-generalize-from-rejection)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: principle-generalize-from-rejection
description: "Apply when a mechanical gate — a lint, validator, blocked-command guard, or CI check — rejects your output for the same reason twice in one session. Fix the generation pattern producing the violation, not just the specific instance."
disable-model-invocation: true
---

# Generalize from Rejection

When a repo-specific gate rejects you, the lesson is the rule it's enforcing, not the one output that tripped it. Fix the pattern that's generating violations, so the next output doesn't need the same correction.

**Why:** A rejection with an explanation is free information — the gate already told you what's wrong and often why. Treating each rejection as an isolated retry (change one thing, resubmit, hope) burns turns and tokens re-discovering the same rule against new inputs, when the fix generalizes across all of them.

**Pattern:**
- On the first rejection, read the full message, not just the pass/fail. Most validators explain the rule, not just that it failed.
- Before retrying, ask: does this fix apply only to the thing you just submitted, or to how you've been generating this class of output? If the latter, fix the generation step, not just this instance.
- If the same class of rejection fires a second time in the same session, stop and generalize explicitly — don't submit a third variation before checking whether the underlying pattern is still present elsewhere in what you're about to submit.
- Escalating a fix's *parameters* (a longer timeout, a different retry count) without changing *what's actually being checked* is not generalizing — it's the same mistake with a bigger dial.

**Battle-tested:** a corpus retrospective found this three separate ways in one pass. A PR-body/review-unit validator rejected the same "one review unit per PR" violation 8 times outright plus 33 warnings, across at least 4 different branches in one session — the agent kept drafting multi-unit PR bodies instead of internalizing the rule after the first rejection. A blocked-command guard (long-running `sleep` calls) fired on the identical command three separate times at different points in the same session. And a disk-usage probe over SSH was retried five times with an escalating timeout (30s → 60s → 45s → 90s → 100s) before the agent finally diagnosed the real cause — degraded disk I/O — instead of continuing to guess at a bigger number.

Files in this skill

  • SKILL.md2.4 KB
  • tests/fires_example.md1 KB
  • tests/stays_silent_example.md617 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.