with one click
draft-code
// Draft TypeScript-compliant code skeleton with TODO placeholders. Use when starting new implementations, creating code scaffolds, or preparing test structure for TDD.
// Draft TypeScript-compliant code skeleton with TODO placeholders. Use when starting new implementations, creating code scaffolds, or preparing test structure for TDD.
[HINT] Download the complete skill directory including SKILL.md and all related files
| name | draft-code |
| description | Draft TypeScript-compliant code skeleton with TODO placeholders. Use when starting new implementations, creating code scaffolds, or preparing test structure for TDD. |
| model | opus |
| context | fork |
| agent | general-purpose |
| allowed-tools | Bash, Read, Write, MultiEdit, Edit, Glob, Grep, Task |
| argument-hint | <instruction> |
Creates TypeScript-compliant code skeletons with TODO placeholders. Drafts type definitions, function signatures, and test structure while leaving implementation details as TODOs for later completion. Corresponds to Steps 0-1 (Design Discovery + Skeleton Creation) of the TDD lifecycle.
What this command does NOT do:
When to REJECT:
When executing this skill, the following standards apply:
| Standard | Purpose |
|---|---|
documentation/write | JSDoc structure and placeholder comments |
file-structure | Project directory layout and organization |
function/write | Function signatures, parameter types, return types |
naming/write | Naming conventions for files, types, functions |
testing/write | Test file structure, describe/it patterns |
typescript/write | Type definitions, interfaces, generics |
universal/write | General code authoring conventions |
ultrathink: you'd perform the following steps
Resume Pattern: When resuming partial work, pass parameters to the underlying write-code workflow to skip already-completed steps. Example:
Resume From Step: 1
Change Direction: "Use factory pattern for object creation"
Skip Steps: [2, 3, 4, 5] # only draft, no implementation
Parse Instructions
--from-composite)Discover Design Documentation
DESIGN.md in project root using Glob (NEVER use find in bash)**/*.md files that might contain design specificationsDiscover Handover Documentation
CONTEXT.md, NOTES.md, PLAN.md in project root using GlobResearch Context
Plan Structure
Create Type Definitions
Draft Function Signatures
CODE DRAFTING PATTERNS: When drafting incomplete implementations:
describe.todo, it.todo for test placeholders that need implementation// TODO: comments to mark incomplete code sectionsnew Error('IMPLEMENTATION: <description of what is missing>, requiring <parameters required as JSON object>')throw new Error(\IMPLEMENTATION: user authentication logic needed, requiring ${JSON.stringify({ userId, token })}`)`Create Test Files
describe.todo() and it.todo() syntaxConditional stub style: Use describe.todo() / it.todo() only when no interface is provided yet — these mark tests as pending without compile-time coupling. As soon as an interface is provided, write real assertions against it (the suite will fail red until implementation lands, which is the desired TDD signal).
Add Test Utilities
TypeScript Check
Standards Check
Run Scripts
npm run test or equivalentnpm run lint or equivalentOutput Format:
[OK/FAIL] Command: draft-code $ARGUMENTS
## Summary
- Instruction: [parsed instruction]
- Files created: [count]
- Types defined: [count]
- Functions drafted: [count]
- TODOs placed: [count]
## Actions Taken
1. Discovered design context from [sources]
2. Created type definitions at [path]
3. Drafted function signatures at [path]
4. Set up test structure at [path]
5. Verified TypeScript compilation
## Files Created
- [path] - [description]
- [path] - [description]
## TODOs Summary
- Implementation: [count]
- Tests: [count]
- Documentation: [count]
## Next Steps
1. Review type definitions
2. Complete implementations with /coding:complete-code
3. Add test assertions
/draft-code "Create user authentication service with login, logout, and token refresh"
# Creates:
# - src/services/auth/types.ts (interfaces)
# - src/services/auth/auth.service.ts (stubs)
# - src/services/auth/auth.test.ts (test structure)
/draft-code "REST endpoint for product CRUD operations"
# Creates skeleton for controller, service, and tests
/draft-code "Date formatting utilities with timezone support"
# Creates type-safe utility functions with TODOs
/draft-code "thing"
# Error: Instruction too vague
# Suggestion: Provide specific requirements like "Create validation helpers for user input"