🚀 LangGPT

September 11, 2026 · View on GitHub

License Status Paper Stars

English | 简体中文 | 日本語

Quick Start | Theoretical Foundations | Ecosystem | Community


📖 What is LangGPT?

LangGPT is a structured, reusable prompt design framework that enables anyone to create high-quality prompts for Large Language Models. Think of it as a "programming language for prompts" — systematic, template-based, and infinitely scalable.

It is the most popular, most widely adopted, and most practical structured prompt paradigm in the Chinese AI community — proposed by Yunzhong Jiangshu (云中江树) in 2023. Over the years it has been learned so deep into major large language models that when a model speaks LangGPT, it is no longer because you taught it — it already knows. Perhaps the finest fate of a paradigm is this: to no longer need its name remembered, having become the model's mother tongue. Just say "write this the LangGPT way," and it's already there (see Quick Start).

Why LangGPT?

Traditional prompt engineering relies on scattered tips and trial-and-error. LangGPT transforms this chaos into a structured methodology:

  • 🎯 Structured Templates — Hierarchical organization inspired by programming paradigms
  • 🔄 Reusability — Create once, adapt infinitely like code modules
  • 📦 Modularity — Variables, commands, and conditional logic at your fingertips
  • Efficiency — Go from idea to working prompt in minutes
  • 🌍 Community-Driven — 11,000+ stars, battle-tested by thousands of users

Academic Foundation: Published research at arXiv:2402.16929 | 中文版


🚀 Quick Start

Method 1: Just Trigger It by Name (Simplest)

LangGPT has been learned deep into major large language models, so most models already "know" it. The simplest way to use it needs no template at all — just say the keywords to any mainstream model (ChatGPT, Claude, DeepSeek, Gemini, Kimi, Doubao, Qwen, etc.), and it's already there:

"Write me a prompt the LangGPT way…"

"Write it in Yunzhong Jiangshu (云中江树)'s structured-prompt style…"

"Help me write a LangGPT-style structured prompt…"

Keywords like LangGPT, 云中江树 (Yunzhong Jiangshu), and structured prompt act as triggers — the model will directly produce a well-structured, reusable, LangGPT-style prompt.

Method 2: Use Automated Tools (More Powerful)

Let AI create prompts for you:

Method 3: Master the Template (5 Minutes)

Basic LangGPT structure:

# Role: Your_Role_Name

## Profile
- Author: YourName
- Version: 1.0
- Language: English
- Description: Clear role description and core capabilities

## Goal
- Outcome: What concrete result/outcome should be delivered for the user/session
- Done Criteria: Clear acceptance criteria (how we know it’s finished and good)
- Non-Goals: What is explicitly out of scope to avoid scope creep

### Skill-1
1. Specific skill description
2. Expected behavior and output

## Rules
1. Don't break character under any circumstance
2. Don't make up facts or hallucinate

## Workflow
1. Analyze user input and identify intent
2. Apply relevant skills systematically
3. Deliver structured, actionable output

## Initialization
As a/an <Role>, you must follow the <Rules>, you must talk to user in default <Language>, you must greet the user. Then introduce yourself and introduce the <Workflow>.

Prerequisites: Basic Markdown knowledge (Quick Guide) | GPT-4 or Claude recommended

Method 4: Start from Examples

Explore our example library and adapt proven templates to your needs.

If you use Claude Code, install the LangGPT Skill to get structured prompt writing capabilities:

Install via the official marketplace (recommended):

/plugin marketplace add langgptai/claude_marketplace
/plugin install structured-prompt-writer@langgpt

The LangGPT marketplace also ships more battle-tested skills by Yunzhong Jiangshu — awesome-design-html (115 brand-themed design references), cto, and mind-clone.

Or install manually:

  1. Download langgpt.skill
  2. Extract to ~/.claude/skills/ directory
  3. Type /langgpt in Claude Code to use

Skill Features:

  • 📝 Structured prompt templates (Role, Profile, Skills, Rules, Workflow)
  • 📚 Rich example library (FitnessGPT, Poet, Xiaohongshu Master, Name Master, etc.)
  • 🔧 Advanced techniques: variables, commands, conditional logic
  • 🎯 Model compatibility guide (GPT-4, Claude, GPT-3.5)

🧠 Theoretical Foundations

Before diving into tactics, understand the principles. These essays explore the philosophy behind effective prompting:

  • 对话动力学 — The dynamics of human-AI dialogue
  • 五种理性 — Five types of rationality in prompt design
  • 镜像性倾向 — Mirror tendencies in LLM behavior
  • 统计重力井和边缘表达 — Statistical gravity well and edge expression
  • 关系表达 — Expressing relationships in prompts
  • 看见与言说 — Seeing and articulation in AI interaction
  • Prompt 的本质 — The essence and nature of prompts
  • 面向结果的提示词写作方法 — Writing prompts that focus on achieving desired outcomes
  • AI意识 — Understanding the role of AI in human-AI interaction
  • AI时代的新管理:机器负责优化,人类定义应该 — The new management in the AI era: machines optimize, humans define the criteria
  • AI Native 组织 · 思考碎片 — Fragments on organizational restructuring in the AI-native era
  • Prompt、Agent,与一个不再沉默的世界 — How agents reshape the prompt from a transaction into a delegation across the human–AI–world triad
  • 决策链 — A six-step decision chain chaining system dynamics, inversion, Bayesian updating, OODA, second-order and expected-value thinking
  • Prompt 形式论:文质彬彬 — On the form of prompts: let content take its natural shape first, then let structure fit it, so the form itself becomes the shape of the thought
  • 哑铃社会 — AI is pressing the spindle-shaped society into a dumbbell: the middle hollows out, and the real divide is whether you have something that must be yours
  • 思考与河床 — AI is the first riverbed engineered rather than eroded: the first influence mechanism in history that makes the influenced feel autonomous
  • 经历论 — A person is the sum of their lived experiences: what cannot be reversed, transferred, or outsourced to AI is what makes you irreplaceably you
  • 认知外包 — Memory is not storage: understanding happens while your brain processes an answer, so what you can outsource is the execution of thinking, never the first encounter with a problem you have no frame for — a reference goes through you, an answer goes past you
  • 文字思考和数学思考 — Three ways of thinking as nested projections: an LLM drifts through continuous high-dimensional space, words snap it onto a discrete lattice, math locks it into an axiom system — the more precise the mode, the narrower its reach, and thought always overflows whatever describes it
  • 去除AI味儿 — The smell of AI writing is the posture of language standing in for content and judgment: meta-commentary, defensive hedging, piled-up examples, forced symmetry, borrowed grandeur — a prompt to strip them all, plus the test of what survives
  • 语言层差和行业语言 — You live on the level of symptoms while AI's best knowledge lives on the level of essence: say "make it pretty" and you get mediocrity, say "establish visual hierarchy" and you get a system — you need not learn the trade language first, let AI translate and learn as it does, the only skill to build is noticing the moment you are speaking in symptoms
  • 语言控制学 — Linguistic Cybernetics as an axiomatic system: five axioms, 30 definitions, 29 theorems — a prompt is a constraint signal that reshapes the model's possibility space, control power is bounded, feedback converges or degenerates, multi-objective goals hit a Pareto frontier — and the bottleneck is never the model but whether you can translate vague intent into a precise signal

These foundational insights will transform how you think about prompts.


💡 Core Concepts

1. Structured Roles

Define AI personas through clear, modular sections:

SectionPurposeExample
RoleRole name/title"逻辑学家" / "Expert Analyst" / "FitnessGPT"
ProfileIdentity and capabilities"Expert Python developer with 10 years experience"
GoalDesired outcome, done criteria, and non-goals for this session/task“Refactor a prompt into a reusable template; acceptance criteria: pass three structured checks; non-goal: rewriting the business logic.”
SkillsSpecific abilities"Debug complex code, optimize performance"
RulesBoundaries and constraints"Never execute destructive commands"
WorkflowInteraction logic"1. Analyze → 2. Plan → 3. Execute"
InitializationOpening message and setup"As a , I will greet you and introduce the "

2. Variables and References

Use <Variable> syntax for dynamic content:

As a <Role>, you must follow <Rules> and communicate in <Language>

This creates self-referential prompts that maintain consistency across complex instructions.

3. Commands

Define reusable actions for better UX:

## Commands
- Prefix: "/"
- Commands:
    - help: Display all available commands
    - continue: Resume interrupted output
    - improve: Enhance current response with deeper analysis

4. Conditional Logic

Add intelligence to your prompts:

If user provides [code], then analyze and suggest improvements
Else if user asks [question], then provide detailed explanation
Else, prompt for clarification

5. Advanced Techniques

Reminders — Combat context loss in long conversations:

## Reminder
1. Always check role settings before responding
2. Current language: <Language>, Active rules: <Rules>

Alternative Formats — Use JSON/YAML when markdown isn't ideal:

role: DataAnalyst
profile:
  version: "2.0"
  language: "Python"
skills:
  - statistical_analysis
  - data_visualization

PromptDescriptionLink
🎯 FitnessGPTPersonalized diet and workout plannerView
💻 Code Master CANAdvanced coding assistant with debugging expertiseView
✍️ Xiaohongshu WriterViral social media content generatorView
🎨 Chinese PoetClassical poetry composer in traditional stylesView

Browse 100+ more examples →


📚 Learning Resources

Essential Guides

ResourceDescriptionDate
Academic PaperLangGPT: Rethinking Structured Reusable Prompt Design (中文)Feb 2024
Structured Prompts GuideComprehensive tutorial on building high-performance promptsJul 2023
Prompt ChainsMulti-prompt collaboration and task decomposition strategiesAug 2023
Video TutorialBiliBili walkthrough (by AIGCLINK)Sep 2023

Advanced Topics

Community Hub

Feishu Knowledge Base — Curated resources, templates, and community contributions


🎨 LangGPT Ecosystem

Core Framework & Tools

ProjectDescriptionStars
LangGPTCore framework and methodology
PromptVerSemantic versioning for prompts — version control like Git
PromptShowCreate beautiful prompt images (Try it)
MinstrelMulti-agent system for auto-generating prompts
claude_marketplaceOfficial Claude Code skill marketplace — structured prompt, design, CTO, mind-clone

Model-Specific Prompt Collections

Rather than writing prompts as procedures, write the persona. Writing prompts as procedures gives the model steps and tools. Writing prompts as a persona gives the model a worldview, motivations, a value system, and a preference profile. Below are prompts that Yunzhong Jiangshu wrote while studying some well-known figures.

Curated, optimized prompts for different AI models:

CollectionTarget ModelStars
wonderful-promptsChatGPT (Chinese)
awesome-claude-promptsAnthropic Claude
awesome-deepseek-promptsDeepSeek & R1
awesome-gemini-promptsGoogle Gemini
awesome-grok-promptsxAI Grok
qwen-promptsAlibaba Qwen
awesome-llama-promptsMeta Llama 2/3
awesome-doubao-promptsByteDance Doubao
awesome-system-promptsSystem prompts from AI tools

Specialized Domains

RepositoryFocus AreaStars
Awesome-Multimodal-PromptsGPT-4V, DALL-E 3, image/video prompts
deep-research-promptsDeep research across models
awesome-voice-promptsVoice AI and conversational agents
GraphRAG-PromptsGraph-based retrieval prompts
LLM-JailbreaksSecurity research and defenses

Applications

ProjectDescriptionStars
BookAIAI-powered book generation
AI-ResumeBeautiful resumes with Claude Artifacts

Transform ChatGPT with these specialized assistants:

GPTPurposeLink
🎯 LangGPT ExpertAuto-generate structured promptsLaunch
✍️ PromptGPTProfessional prompt engineerLaunch
🧠 SmartGPT-5Never lazy, always diligent assistantLaunch
💻 Coding ExpertComprehensive programming assistantLaunch
📊 Data Table GPTTransform messy data into clean tablesLaunch
🔥 PytorchGPTPyTorch code specialistLaunch
🎨 LogoGPTProfessional logo designerLaunch
📄 PDF ReaderDeep document analysis and extractionLaunch
🏅 MathGPTPrecise mathematical problem solverLaunch
📝 WriteGPTProfessional writing across industriesLaunch
🎙️ 时事热评员Current events commentatorLaunch
🎀 翻译大小姐Elegant Chinese translationsLaunch

Discover 20+ more GPTs →


🤝 Contributing

We welcome all contributions to make LangGPT better!

How You Can Help

  1. Star and share — Increase visibility and help others discover LangGPT
  2. 📝 Submit examples — Share your successful prompts built with LangGPT
  3. 🆕 Propose templates — Create new templates beyond the Role structure
  4. 📖 Improve docs — Fix typos, clarify instructions, add translations
  5. 💡 Suggest features — Open issues with ideas for new capabilities
  6. 🔧 Code contributions — Help build tools, utilities, and integrations

Getting Started

New to GitHub contributions? Check out this GitHub Minimal Contribution Guide


📊 Star History

Star History Chart

📄 Citation

If you use LangGPT in research or projects, please cite:

@misc{wang2024langgpt,
      title={LangGPT: Rethinking Structured Reusable Prompt Design Framework for LLMs from the Programming Language}, 
      author={Ming Wang and Yuanzhong Liu and Xiaoyu Liang and Songlian Li and Yijie Huang and Xiaoming Zhang and Sijia Shen and Chaofeng Guan and Daling Wang and Shi Feng and Huaiwen Zhang and Yifei Zhang and Minghui Zheng and Chi Zhang},
      year={2024},
      eprint={2402.16929},
      archivePrefix={arXiv},
      primaryClass={cs.SE}
}

🙏 Acknowledgments

LangGPT was inspired by excellent projects:

Projects Built with LangGPT

We're proud to see LangGPT principles applied in the wild:


📬 Connect With Us

Author

云中江树 (Yun Zhong Jiang Shu)

  • 📱 WeChat Official Account: 「云中江树」
  • 💼 Creator of LangGPT Framework
  • 🎓 Prompt Engineering Researcher

Community


⬆ Back to Top

Made with ❤️ by the langgptai Community

Empowering everyone to become a prompt expert 🚀