Skip to content

A collection of AI instructions for the Rust programming language

License

Notifications You must be signed in to change notification settings

Ranrar/rustic-prompt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

18 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ¦€ 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.

They are tailored for building intelligent Rust developer tools and agents, and are ideal for integration with Copilot, LLMs, and AI-enhanced developer workflows.

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. Open in VS Code
Lint Specialist Analyze Rust lints, trace code interactions, and resolve false positives. Enhanced with trace analysis. Open in VS Code
Pest or PEGs Instructions and examples for working with the Pest parser in Rust. Open in VS Code
RON Instructions and examples for working with RON (Rusty Object Notation) in Rust. Open in VS Code

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
File Purpose Open in VS Code
index.instructions.md Router/index that helps pick the right specialist for the task. Open in VS Code
rust-core.instructions.md Baseline Rust conventions + Cargo hygiene. Open in VS Code
linthunter.instructions.md Rust lint triage and false-positive investigation workflow. Open in VS Code
pestmate.instructions.md Pest grammar specialist for .pest grammars and PEG debugging. Open in VS Code
ron-guide.instructions.md RON (Rusty Object Notation) specialist for .ron and serde workflows. Open in VS Code

Recommended Rust Extensions (VS Code)

Name Description Marketplace
rust-analyzer Rust language support (LSP): completion, navigation, refactors, inlay hints, diagnostics, formatting, and more. VS Code Marketplace
Cargo Commands to add/remove dependencies via Cargo (planned deprecation once rust-analyzer covers cargo add/cargo rm). VS Code Marketplace
Even Better TOML TOML language support backed by Taplo (validation, formatting, schema-aware completion). VS Code Marketplace
Search crates.io Crate name suggestions / completion while editing Cargo.toml (uses crates.io search API). VS Code Marketplace
Pest IDE Tools IDE support for Pest grammars via LSP (errors, rename, go-to, hover, completion, formatting). VS Code Marketplace
RON RON (Rusty Object Notation) syntax support for VS Code (TextMate grammar). VS Code Marketplace

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. Open in VS Code
Debug Helper Structured debugging guide for agents to systematically resolve application bugs. Open in VS Code
Text Hygiene (ASCII only) Prevent smart punctuation and invisible/problematic characters in docs/config (especially .md and .github/*). Open in VS Code
GitHub Security Prevent leaking secrets (API keys/tokens), handle .env safely, and harden GitHub Actions and repo settings. Open in VS Code

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). VS Code Marketplace
Gremlins tracker Reveals invisible / confusable Unicode characters (zero-width spaces, non-breaking spaces, etc.). VS Code Marketplace

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:

  1. As Custom Instructions (persistent behavior)
  2. As Chat Mode (temporary session guidance)
  3. 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:

  1. Open VS Code.
  2. Go to Settings β†’ GitHub Copilot β†’ Configure Custom Instructions.
  3. Copy the content of an instruction file (e.g., instructions/rust_refactor.md).
  4. Paste it into the Custom Instructions field.
  5. Save and restart Copilot.

Now, every Copilot suggestion will be shaped by the Rust-specific instructions.

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:

  1. Open the Copilot Chat panel (Ctrl+Shift+I / Cmd+Shift+I).
  2. Paste the content of an instruction file as your first message.
  3. 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:

  1. Open Copilot Chat.
  2. Switch to an Agent / Agent Mode experience (if your Copilot version supports it).
  3. Paste the content of one of the instruction files as your first message (or summarize it and link the file), then describe the goal.
  4. Ask the agent to:
    • propose a short plan,
    • make small incremental edits,
    • and verify results (build/tests) before finishing.

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

About

A collection of AI instructions for the Rust programming language

Topics

Resources

License

Contributing

Stars

Watchers

Forks