A collection of AI instructions for the Rust programming language
๐ฆ Rustic Prompt
A collection of AI instruction files designed specifically for Rust developers. Use these instructions to power intelligent agents in tools like GitHub Copilot, VS Code, or any AI-powered development assistant.- Instruction sets - predefined prompts and role definitions for Rust-related tasks.
- Agent behavior files - configurations for AI agents to act as Rust coding assistants.
Below you'll find ready-to-use instruction packs (openable directly in VS Code) plus a small set of recommended VS Code extensions that pair nicely with these workflows.
| Title | Description | Open in VS Code | | ----- | ----------- | --------------- | | Rust Code Instructions | Agent guidance for handling Rust-specific coding workflows. | | | Cross-Platform Rust | Comprehensive guide for conditional compilation, platform-specific code, imports, and Cargo.toml configurations. |
| | Lint Specialist | Analyze Rust lints, trace code interactions, and resolve false positives. Enhanced with trace analysis. |
| | Pest or PEGs | Instructions and examples for working with the Pest parser in Rust. |
| | RON | Instructions and examples for working with RON (Rusty Object Notation) in Rust. |
|
Rust multi-agent
The multi-agent pack is a self-contained set of path-specific instructions that work together:
- Folder:
.github/instructions/rust/multi-agent
index.instructions.md | Router/index that helps pick the right specialist for the task. | rust-core.instructions.md | Baseline Rust conventions + Cargo hygiene. | linthunter.instructions.md | Rust lint triage and false-positive investigation workflow. | pestmate.instructions.md | Pest grammar specialist for .pest grammars and PEG debugging. | ron-guide.instructions.md | RON (Rusty Object Notation) specialist for .ron and serde workflows. | Recommended Rust Extensions (VS Code)
| Name | Description | Marketplace | | ---- | ----------- | ----------- | | rust-analyzer | Rust language support (LSP): completion, navigation, refactors, inlay hints, diagnostics, formatting, and more. | | | Cargo | Commands to add/remove dependencies via Cargo (planned deprecation once rust-analyzer covers
cargo add/cargo rm). | | | Even Better TOML | TOML language support backed by Taplo (validation, formatting, schema-aware completion). |
| | Search crates.io | Crate name suggestions / completion while editing
Cargo.toml (uses crates.io search API). | | | Pest IDE Tools | IDE support for Pest grammars via LSP (errors, rename, go-to, hover, completion, formatting). |
| | RON | RON (Rusty Object Notation) syntax support for VS Code (TextMate grammar). |
|
General-Purpose Instructions
These instructions are designed for any programming language or workflow and can be used universally in VS Code or other AI-powered tools:| Title | Description | Open in VS Code | | ----- | ----------- | --------------- | | Syntax Error | Diagnose and explain syntax errors in multiple languages. Clear and practical fixes. | | | Debug Helper | Structured debugging guide for agents to systematically resolve application bugs. |
| | Text Hygiene (ASCII only) | Prevent smart punctuation and invisible/problematic characters in docs/config (especially
.md and .github/*). | | | GitHub Security | Prevent leaking secrets (API keys/tokens), handle
.env safely, and harden GitHub Actions and repo settings. | |
General-Purpose Extensions (VS Code)
| Name | Description | Marketplace | | ---- | ----------- | ----------- | | Emoji Eraser | Highlights emojis as diagnostics and helps remove them (per-emoji quick fix + bulk remove command). | | | Gremlins tracker | Reveals invisible / confusable Unicode characters (zero-width spaces, non-breaking spaces, etc.). |
|
Note: Any AI model can be used with these files โ either as instructions or in a chat mode, depending on your setup.
Using in VS Code
You can use these files in three ways inside VS Code:
- As Custom Instructions (persistent behavior)
- As Chat Mode (temporary session guidance)
- As Agents (multi-step workflows)
1. Instructions Mode (Persistent)
This mode makes Copilot always follow the rules from a file. Good for consistent guidance, e.g., enforcing Rust formatting or coding standards.Steps:
- Open VS Code.
- Go to Settings โ GitHub Copilot โ Configure Custom Instructions.
- Copy the content of an instruction file (e.g.,
instructions/rust_refactor.md). - Paste it into the Custom Instructions field.
- Save and restart Copilot.
2. Chat Mode (Session-Based)
This mode applies the file only for one chat session. Good for ad-hoc tasks, e.g., refactoring one module or debugging a function.Steps:
- Open the Copilot Chat panel (
Ctrl+Shift+I/Cmd+Shift+I). - Paste the content of an instruction file as your first message.
- Continue the conversation โ the assistant will follow those rules until the chat resets.
3. Agents (Multi-step workflows)
If you're using an agent-style workflow (where the assistant can plan, edit files, and iterate across multiple steps), these instruction files work especially well as a "role + rules" foundation.
Typical flow:
- Open Copilot Chat.
- Switch to an Agent / Agent Mode experience (if your Copilot version supports it).
- Paste the content of one of the instruction files as your first message (or summarize it and link the file), then describe the goal.
- Ask the agent to:
This is great for tasks like: refactors, migrations, lint triage, parser work (Pest), or tightening docs/CI.
Key Difference
| Mode | When to Use | Scope | |-------------------|-------------------------------------------|------------------------------| | Instructions | Long-term guidance (always on) | Persistent across sessions | | Chat Mode | Short-term, task-specific instructions | Only active in one chat | | Agents | Multi-step tasks (plan โ edit โ verify) | Can span multiple steps/files |
Tip: Combine both โ set general Rust coding rules in Instructions Mode, and use Chat Mode for specific workflows like migrations, refactors, or testing.
Credits
This project draws inspiration from prominent AI prompt collections and experts in the developer community:
| Name | Description | Link | | ------------- | -------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | | burkeholland | Curated AI prompt examples and developer workflows, widely used for improving coding productivity. | Links | | voidfnc | A collection of advanced AI prompts designed to enhance coding assistants and automation. | Links |
Other AI Prompts
Discover these valuable prompt repositories and resources for AI-assisted development:
| Name | Description | Link | | ------------------------------- | ------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | | Beastmode Chatmode by burkeholland | Powerful chat-based AI prompts for enhanced interaction and code generation workflows. | Links | | voidfnc Prompts Repo | Diverse prompt templates aimed at improving AI coding helpers and LLM responses. | Links | | GitHub Awesome Copilot | Community-curated list of tools, prompts, and tips to boost GitHub Copilot usage. | Links | | System Prompts by x1xhlol | Collection of system-level AI prompts and models for customizing AI assistants. | Links | | TaskSync by 4regab | AI-driven task management prompts designed to synchronize workflows and productivity. | Links |
Create Your Own
Master the art of prompt engineering with this comprehensive guide:
| Name | Description | Link | | ----- | ----------- | ---- | | Guide | Official OpenAI guide detailing best practices for crafting effective prompts. | Links |