Evidence-Grounded Codebase Changes
Implement complex changes against verified imports, schemas, and APIs, with small patches and explicit validation evidence.
Before & after
Same prompt, same agent — the only difference is the skill.
I can help you build a payment page. You'll need to handle form input for card details, integrate with Stripe's API, and store the transaction details. I'd write code that calls the Stripe API, handles the response, and updates your database. Let me get started on the implementation. I might use a Stripe SDK for the frontend and backend integration. Here's how I'd approach building the page with form handling and API calls.
PHASE 1: VERIFY EXISTING STRUCTURE ✓ Checked database schema: users table, payments table (has stripe_customer_id, stripe_payment_intent_id) ✓ Checked Stripe keys location: process.env.STRIPE_SECRET_KEY exists, STRIPE_PUBLISHABLE_KEY in env.local ✓ Confirmed existing Stripe methods: stripe.customers.create(), stripe.paymentIntents.create() already used in /api/subscribe PHASE 2: MAP REQUIRED PIECES • Frontend: Stripe Elements (CardElement), no custom card field invention • Backend: PaymentIntents workflow (create → confirm → webhook) • Database: Link to existing payments table on success • Error gates: Decline handling, duplicate prevention via idempotency key PHASE 3: DECOMPOSE (YAGNI ladder) Remove: Custom Luhn validation (Stripe does this) Remove: CVV storage (Stripe tokenizes) Remove: PCI compliance code (using hosted Elements) Keep: Error boundary around failed intents Keep: Retry logic for network failures (3 attempts) PHASE 4: EXECUTE /* app/components/PaymentForm.tsx */ Uses Stripe Elements CardElement, handlePayment() calls /api/payment Intents recovery on component unmount, no orphaned intents /* app/api/payment/route.ts */ Validates existing customer_id, creates intent with idempotency_key Confirms intent server-side, writes to payments table only on success Webhook handler at /api/stripe-webhook catches payment_intent.succeeded PHASE 5: VERIFY ✓ Unit test: Duplicate payment intent + idempotency key → same intent returned ✓ Integration test: Payment flow end-to-end with test card ✓ Error case: Network timeout → payment retried, never duplicated ✓ Database check: All payments wrote payment_intent_id for audit
About this skill
“The code looks right, but that method doesn't exist in our version.” Complex changes fail when generated code assumes imports, misses a permission boundary, or passes tests that never exercise the integration. This workflow checks the actual contracts before editing and follows each change through focused verification.
What it does
- Confirms existing imports, function signatures, dependency versions, and schema constraints before relying on them.
- Maps the affected path from entry point through authorization, business logic, persistence, and callers.
- Breaks multi-file work into small changes with explicit behavioral acceptance checks.
- Removes speculative abstractions and unnecessary dependencies before implementation.
- Checks authorization failures, migration compatibility, and partial-write risks when those surfaces are involved.
- Reports which checks passed, failed, or could not run, without turning a drafted patch into a claim of working software.
What you get
A focused implementation or review grounded in the available project evidence, plus the validation results and any unresolved assumptions. Small requests receive a small answer; risky changes receive the additional investigation they need.
Best for
Developers changing existing authentication, database, migration, or multi-file application code, especially after generated code has introduced nonexistent APIs or missed integration behavior.
SKILL.md preview
---
name: evidence-grounded-codebase-changes
description: >-
Implement complex changes in existing projects by confirming real imports, signatures, schemas, and dependency contracts, then applying small patches with behavioral verification. Use when the user says "stop inventing APIs", "make this change safely", "plan before changing the auth flow", "this touches several files", "my generated code keeps importing things that don't exist", "verify this migration", or "check this patch against the actual codebase".
---
# Evidence-Grounded Codebase Changes
… (sign up to view the full skill)More development skills
View all Development skills →Performance Bottleneck Profiling: Node, Python, Go
Classifies a slowdown, gives exact profiler commands, reads the output, and proves the fix with same-conditions p95/p99 numbers.
Feature Scaffolding with Working Tests
Turn a short feature spec into code, runnable tests, and integration wiring that match your existing project.
Feature Flag Rollouts and Kill Switches
Design staged flag rollouts, verify rollback paths, and audit flag debt with explicit defaults, gates, and retirement plans.
Microcontroller Firmware and RTOS Engineering
Build and debug MCU firmware with bounded ISR/RTOS timing, safe DMA ownership, and measured power budgets.