structural-implementing

Implements code paths with input parsing, idempotency, resource bounds, and failure visibility checks.

Updated May 27, 2026
One-click install
npx skills add https://github.com/ybaspinar/agent-work-skills --skill structural-implementing-ybaspinar
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: structural-implementing
Source: https://github.com/ybaspinar/agent-work-skills/tree/main/skills/structural-implementing
Command: npx skills add https://github.com/ybaspinar/agent-work-skills --skill structural-implementing-ybaspinar

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Non-trivial code changes often ship with unvalidated inputs, swallowed errors, unbounded retries, and hidden dependencies that only surface as production incidents. This Skill turns an implementation plan into code where the safe path is the natural path, catching structural defects while the code is being written rather than in review or on-call. ## Core Features & Use Cases - Boundary enforcement: Parse and validate input at the door into narrower types, bound caller-controlled growth, and keep raw DTOs out of core logic. - Runtime safety checks: Enforce deadlines on cross-boundary waits, atomic or serialized shared-state mutation, idempotent retries, and resource release on every exit path. - Operability while building: Make failures visible in the language idiom, emit signals alongside the code, and test contracts, parsers, failures, and replay as you go. - Use Case: While implementing a new endpoint handler that writes to a queue, use this Skill to verify the input is schema-parsed, the mutation is idempotent against duplicate clicks, the queue client is behind a testable seam, and errors are never silently caught. ## Quick Start Ask the AI to apply structural implementation checks while writing a new endpoint handler, background job, or migration so parsing, idempotency, deadlines, and failure visibility are built in from the start.

Frequently Asked Questions about structural-implementing

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

FAQPage Schema
How do I make code changes safe against duplicate requests and retries?

Make retried operations idempotent and shared-state mutations atomic or serialized. Avoid patterns like SELECT-then-INSERT or processing flags that break under duplicate clicks, and test replay behavior while building.

How to structure input validation in endpoint handlers?

Parse at the door into a narrower type or schema-checked value, then carry the parsed form inward. Raw DTOs or unvalidated strings reaching core logic are a red flag that validation happened too late or not at all.

What is a testable seam for dependencies like clock or HTTP clients?

A seam gives every ambient dependency one injectable point: clock, randomness, environment, HTTP client, filesystem, or queue. Burying Date.now() or clients deep in logic makes them impossible to override in tests.

When should I not use structural implementation checks?

The checks target non-trivial code paths such as handlers, jobs, migrations, and parsers. Trivial scripts or prototypes with no shared state, external calls, or failure consequences gain little from the full checklist.

Why do unbounded retries and buffers cause production incidents?

Unbounded retries, queues, buffers, recursion, or fan-out let caller-controlled load grow without limit, exhausting memory or downstream capacity. Bound every caller-controlled growth dimension and put deadlines on cross-boundary waits.