langgptai/LangGPT
LangGPT: Empowering everyone to become a prompt expert! 🚀 📌 结构化提示词(Structured Prompt)提出者 📌 元提示词(Meta-Prompt)发起者 📌 最流行的提示词落地范式 | Language of GPT The pioneering framework for structured & meta-prompt design 10,000+ ⭐ | Battle-tested by thousands of users worldwide Created by 云中江树
LangGPT – A Structured Prompt‑Design Framework
What it is – LangGPT is a methodology and set of tooling that treats prompts for large language models (LLMs) like a tiny programming language. It defines a reusable, hierarchical template syntax (roles, profile, goal, skills, rules, workflow, etc.) and adds features such as variables, commands, and conditional logic. The idea is to let anyone write structured, modular prompts that can be shared, version‑controlled, and instantly understood by many LLMs.
Why it matters – Prompt engineering is often ad‑hoc. LangGPT gives a common “grammar” that works across models (ChatGPT, Claude, Gemini, Qwen, etc.) and across languages (English, Chinese). Because the pattern has been baked into many Chinese‑language models, simply mentioning “LangGPT” can make the model generate a well‑formed prompt without any extra code.
Core concepts
- Structured roles – A prompt is split into clearly named sections (Role, Profile, Goal, Skills, Rules, Workflow, Initialization). This makes the intent explicit and reusable.
- Variables –
<Variable>placeholders let you inject dynamic content and keep consistency throughout a prompt. - Commands – Short “/help”, “/continue”, “/improve” style actions that can be invoked by the model.
- Conditional logic – Simple
if … elseblocks let a single prompt adapt to different user inputs. - Reminders & alternative formats – Built‑in ways to keep long‑running conversations on track (reminders) and to output JSON/YAML when markdown isn’t ideal.
How to use it
- Trigger by name – Ask any mainstream model “write a prompt the LangGPT way” and it will output a ready‑made template.
- Use the hosted GPTs – Pre‑built ChatGPT/Claude assistants (e.g., LangGPT Expert, PromptGPT) that auto‑generate LangGPT‑style prompts.
- Write the template yourself – Follow the 5‑minute starter template shown in the README and fill in your own sections.
- Install the Claude Code skill – Add the
structured-prompt-writer@langgptskill to Claude Code for in‑IDE prompt creation. - Browse examples – The project ships a library of >100 ready‑made prompts (FitnessGPT, Code Master, Chinese Poet, etc.) that can be copied and adapted.
Ecosystem – LangGPT is the hub of a small but active open‑source suite:
- PromptVer – Semantic versioning for prompts, enabling Git‑like change tracking.
- PromptShow – Turns prompts into nice visual cards.
- Minstrel – A multi‑agent system that can automatically generate new prompts.
- Model‑specific prompt collections (awesome‑claude‑prompts, wonderful‑prompts, etc.) that curate the best LangGPT‑style prompts for each LLM.
- Application repos such as BookAI (book generation) and AI‑Resume (resume creation) that demonstrate LangGPT in real products.
Community & learning – The repo links to an arXiv paper (arXiv:2402.16929) that formalises the approach, a multilingual set of theoretical essays, video tutorials, and a Feishu knowledge base where users share templates and discuss best practices.
Who should care – Anyone who writes prompts regularly—product managers building LLM‑powered features, developers integrating chat assistants, educators teaching prompt engineering, or hobbyists who want a repeatable way to get high‑quality outputs.
Bottom line – LangGPT is not a new model; it is a prompt‑engineering framework that gives structure, reusability, and community‑driven best practices to the craft of prompting large language models.
Related
- Project
- Project
- Project
- Project
- Project