Grok-prompts is a repository of system prompts used by the Grok chat assistant and related features across X and grok.com.
The repository makes public the system prompts that guide Grok's behavior across different product contexts. These prompts define how the assistant responds to users, handle safety considerations, and support specific features like code generation and content explanation. The prompts are maintained in Jinja template format and plain text, allowing the team to version control and regularly update the instructions that shape the model's outputs.
Developers working with the xAI API or studying how large language models are prompted in production will find this repository valuable for understanding the actual instructions used to govern Grok's behavior. The collection includes prompts for different model variants—including Grok 4, Grok 3, and specialized versions like code-focused and fast inference models—as well as prompts for specific product features such as the Explain button on X and the Grok bot. This transparency into production prompting strategies offers insight into how instruction design differs across model sizes and use cases.
The repository shows consistent maintenance with regular updates to system prompts across multiple model versions and product features. The team actively refines prompts, as evidenced by versioned files tracking iterations of the Grok 4 system prompt and the introduction of new prompt variants for different model capabilities like thinking and non-thinking modes.