Scaffold

From drn/dots · View interactive version

Scaffold is an AI agent skill from the GitHub repository drn/dots. Bootstrap new components, files, or modules matching existing repo conventions and patterns. Use for creating new files, components, or modules that follow repo patterns.

How to use this skill

Skill file

Scaffold

Create boilerplate files matching the conventions of the current repository. Analyzes existing patterns before generating anything.

Arguments

Context

Instructions

Step 0: Check for skill redirect

IF $ARGUMENTS mentions "skill", "slash command", or "agent skill", tell the user: "Use /write-skill for creating agent skills — it has specialized knowledge for that." and stop.

Step 1: Parse request

Extract from $ARGUMENTS:

IF the request is unclear, ask the user to clarify before proceeding.

Step 2: Analyze existing patterns

Find 2-3 existing examples of the same type in the codebase:

  1. Use Glob to find files matching the pattern (e.g., for "go command", look at cmd/*/main.go or cli/commands/*.go).
  2. Read the examples to extract:

IF no existing examples are found, ask the user: "I could not find existing examples of <type> in this repo. Can you point me to an example to follow, or describe the convention?"

Step 3: Plan the scaffold

Present the planned file tree before creating anything:

## Scaffold Plan: <name>

Based on existing patterns (analyzed: <example1>, <example2>):

### Files to create
- `<path/to/file1>` — <purpose>
- `<path/to/file2>` — <purpose>
- `<path/to/test>` — <purpose>

### Convention notes
- Naming: <convention observed>
- Structure: <pattern observed>
- Boilerplate: <what will be included>

Wait for user confirmation before creating files.

Step 4: Generate files

Create each file following the conventions extracted in Step 2:

Step 5: Report

List the files created and suggest next steps:

## Created

| File | Purpose |
|------|---------|
| <path> | <brief> |

### Next steps
- [ ] Fill in TODO sections
- [ ] Run tests: `<test command>`
- [ ] <any registration or wiring step needed>
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.