design-to-code

Generates code skeletons with contract-level comments from design documents.

2|Updated Jun 8, 2026
One-click install
npx skills add https://github.com/HACK-WU/skills --skill design-to-code-hack-wu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: design-to-code
Source: https://github.com/HACK-WU/skills/tree/main/skills/design-to-code
Command: npx skills add https://github.com/HACK-WU/skills --skill design-to-code-hack-wu

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When AI coding agents work from design documents, they repeatedly re-read external docs, burning tokens and drifting from the intended design. This Skill converts design documents into code skeletons (files, classes, methods) with contract-level comments embedded in place, so the code itself becomes the implementation guide. ## Core Features & Use Cases - Skeleton Generation with Contract Comments: Creates files, classes, method signatures, and fields directly from design docs, embedding parameters, return values, exceptions, and expected behavior as comments with design-doc anchors. - Batched Parallel Generation: Sorts sub-requirements by dependency DAG, splits large projects into batches, and dispatches order-independent batches in parallel via task-dispatch. - Architecture & Pattern Evaluation: Before generating, evaluates whether design patterns (strategy, factory, layered architecture) fit the design and confirms the approach with the user. - Safe Modification of Existing Code: Marks change points with TODO annotations (add/modify/delete/refactor) while preserving existing implementations. - Use Case: After finishing a design document for a user system with 5 sub-requirements, run this Skill to produce a full Python skeleton where every method carries its contract, then hand off to code-implement for filling in logic. ## Quick Start Generate a code skeleton from the design documents in my .requirements directory, embedding contract comments into each method.

Frequently Asked Questions about design-to-code

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

FAQPage Schema
How do I generate a code skeleton from a design document?

Point the Skill at your design document directory (default .requirements/{date}-{feature}/design/). It extracts files, classes, methods, and fields, sorts them by dependency DAG, then generates skeletons with contract-level comments and language-native placeholders.

How to keep AI coding aligned with a design document?

Embed the design contract directly into code comments. This Skill writes method-level annotations covering parameters, return values, exceptions, and expected behavior with design-doc anchors, so the AI never needs to re-read external documents while coding.

Does it support modifying existing code instead of creating new files?

Yes. For existing files it inserts TODO markers above each change point describing the change type (add/modify/delete/refactor), impact scope, and compatibility notes, while preserving the original implementation untouched.

Which programming languages are supported for skeleton generation?

It uses language-native placeholders for Python (...), Java (UnsupportedOperationException), Go (panic), TypeScript (throw new Error), and Rust (todo!()), ensuring skeletons parse cleanly in each language's IDE.

What happens when the design document changes after skeleton generation?

The Skill detects design changes and asks whether to update the skeleton. It regenerates only affected batches, updates contract comments and signatures, and preserves any implementation logic already filled in.

When should I not use design-to-code skeleton generation?

Skip it for trivial single-file changes or when no design document exists, since the extraction and batching workflow adds overhead. It is designed for structured design docs, ideally produced by the design-craft skill.