init

Generate architecture diagrams and context files for brownfield codebases.

39|6|Updated Jan 21, 2026
One-click install
npx skills add https://github.com/mayurpise/draft --skill init-mayurpise
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: init
Source: https://github.com/mayurpise/draft/tree/main/skills/init
Command: npx skills add https://github.com/mayurpise/draft --skill init-mayurpise

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Draft projects often lack a shared context map, causing AI guidance to drift and misalign with existing architecture. This skill bootstraps a consistent project context by generating initial context documents and architecture diagrams for brownfield repositories.

Core Features & Use Cases

  • Brownfield context generation: Scans existing codebases to produce architecture diagrams and context files (draft/architecture.md, draft/tech-stack.md, etc.).
  • One-time initialization with optional refresh: Creates initial context only once per project, with support for subsequent refresh via /draft:init refresh (as described in the operation).
  • Mermaid-driven visualizations: Generates mermaid diagrams to visualize system structure and dependencies for onboarding and planning.

Quick Start

Run /draft:init to bootstrap the initial Draft context files in your repository. You can then review and adjust the generated docs as needed, and use /draft:init refresh to update context when your codebase changes.

Frequently Asked Questions about init

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

FAQPage Schema
How do I generate architecture diagrams for an existing codebase to provide AI context?

To generate architecture diagrams for an existing codebase, this skill analyzes your repository structure and produces mermaid visualizations alongside context files like draft/architecture.md. It scans existing tracks to bootstrap a shared project context map for AI-driven work.

What is the best way to document tech stack and workflows in a brownfield repository?

Documenting tech stack and workflows in a brownfield repository is done by running a deep codebase analysis to automatically generate draft/tech-stack.md and draft/workflow.md. This preserves existing tracks while creating consistent context documentation for AI guidance.

Can I refresh context files after my codebase changes without losing existing draft tracks?

Yes, you can refresh context files after codebase changes by running the refresh operation. This updates your generated architecture diagrams and tech stack documentation while preserving existing tracks and previously generated context files.

Why does AI guidance drift when working with brownfield codebases?

AI guidance drifts in brownfield codebases because projects often lack a shared context map aligning with existing architecture. Generating initial context documents and architecture diagrams bootstraps consistent context, preventing misalignment during AI-driven development.

Does the initialization process work on any brownfield codebase regardless of tech stack?

The initialization process works on brownfield codebases by analyzing the repository to produce context files and mermaid diagrams. It performs deep codebase analysis to generate architecture and tech stack documentation tailored to the specific structure of your existing tracks.