GitHub上8个系统提示词仓库
从零写好系统提示词很慢。这些GitHub仓库给你现成的。
System Prompt Examples on GitHub: 8 Repos With Production-Ready Prompts
A good system prompt is 80% of an LLM app's behavior, but writing one from scratch takes hours of iteration. These GitHub repositories collect production prompts you can adapt in minutes.
The 8 Repos Worth Your Time
1. f/awesome-chatgpt-prompts - 135,000+ stars. The classic. Hundreds of role prompts ("Act as a Linux terminal", "Act as a career counselor"). Great starting points, but many are generic - customize before shipping.
2. dair-ai/Prompt-Engineering-Guide - 55,000+ stars. More textbook than prompt library, with system-prompt design patterns and techniques. Read it once, and you will write better prompts than any library.
3. PlexPt/awesome-chatgpt-prompts-zh - 60,000+ stars. Chinese-language prompts, including system prompts for Chinese business writing and translation.
4. f/awesome-chatgpt-prompts-zh (fork collection). Community-maintained Chinese translations of the original library.
5. prompt-engineering/system-prompts - curated app-style prompts with variables and instructions for real products (customer support, content moderation).
6. microsoft/promptflow examples - Microsoft's repo includes system prompt templates for RAG and chat apps with evaluation scripts.
7. smol-ai/developer - "developer" role prompt that turns an LLM into a software engineer with file structure awareness.
8. Anthropic's prompt library (docs.anthropic.com) - not GitHub, but Anthropic publishes official system prompts for Claude, including the famous Claude 3/4 system prompts analyzed in the community.
How to Adapt One
- Copy a prompt that matches your task
- Replace the role with YOUR product's role
- Add 2-3 rules specific to your domain (tone, forbidden outputs, format)
- Add 2-3 few-shot examples of ideal output
- Test with 20 real queries, not just happy paths
FAQ
Can I copy prompts from these repos commercially? Most are MIT-licensed or public domain - check each repo's license. Attribution is good practice.
System prompt vs user prompt? System prompt sets persistent behavior (role, rules, format); user prompts are the per-request input. Use the system slot for everything that should not change.
How long should a system prompt be? 200-800 words typically. Too long wastes tokens and dilutes focus; too short misses rules.
