VittalAB

Prompt2tree — AI skill for Claude Code

AI community

When using AI coding assistants (ChatGPT, Claude, Cursor, DeepSeek), asking agents to create individual folders and files burns thousands of context tokens and introduces latency or rate-limit delays.

How to install Prompt2tree

This entry records only its repository, not the path inside it, so there is no exact command to give. Open VittalAB/prompt2tree and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Prompt2tree does

When using AI coding assistants (ChatGPT, Claude, Cursor, DeepSeek), asking agents to create individual folders and files burns thousands of context tokens and introduces latency or rate-limit delays. `promp2tree` solves this

Alternatives in AI

  • Repomix — 📦 Repomix is a powerful tool that packs your entire repository into a single, AI-friendly file 22.7k ★
  • Context Engineering Intro — GitHub Repo stars Context engineering - the new way of AI coding assistants Context engineering guide 12.8k ★
  • OpenContext — A personal context store for AI agents and assistants—reuse your existing coding agent CLI (Codex/Claude/OpenC 1.1k ★

README

🌲 prompt2tree (`pt`)

[![PyPI version](https://img.shields.io/pypi/v/prompt2tree.svg)](https://pypi.org/project/prompt2tree/) [![Python Versions](https://img.shields.io/pypi/pyversions/prompt2tree.svg)](https://pypi.org/project/prompt2tree/) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

**The AI-native project scaffolder.** Convert raw LLM text trees into physical directory structures and initial boilerplate files in milliseconds.


💡 Why prompt2tree?

When using AI coding assistants (ChatGPT, Claude, Cursor, DeepSeek), asking agents to create individual folders and files burns thousands of context tokens and introduces latency or rate-limit delays.

**`prompt2tree` solves this.** Request a visual folder tree from your LLM, copy the string, and run `pt -c` (or `pt structure.txt`). Your entire project architecture is scaffolded instantly on your local machine for zero token cost.


⚡ Quick Start

1. Installation

pip install prompt2tree

*To enable direct OS clipboard reading, install with the `clip` extra:*

pip install "prompt2tree[clip]"

2. Usage Workflows

Option A: Directly from Clipboard (Fastest)

Copy any tree output from ChatGPT or Claude, then run:

pt -c
# or
prompt2tree --clip

Option B: From a Text File

pt structure.txt

*If no arguments are passed, `pt` automatically looks for `structure.txt` in the working directory.*

Option C: Piping via Stdin

cat structure.txt | pt

✨ Key Features

  • 🧹 LLM Output Sanitization: Automatically strips Markdown backticks (```), conversational chatter, and inline explanatory comments (main.py # application entrypoint).
  • 🌲 Universal Tree Support: Parses Unicode box-drawing trees (├──, └──), ASCII pipe/hyphen variants (|--, \--), and plain tab/space-indented hierarchies.
  • 📄 Smart Boilerplate Auto-Fill: Automatically populate