ProPrompt β Fundamentals of Effective Prompting
Target Audience: Anyone who wants to use GitHub Copilot, Copilot Studio Agents, or AI-powered toolchains productively β no prior AI experience required.
Job-Specific Guides: Analysts Β· Legal Β· Developers Β· Office Work
Table of Contents
- Markdown Quick Start
- Prompting Fundamentals
- Dos & Donβts β Overview
- Copilot Chat & Context Variables
- Agent Mode β Overview
- Copilot Studio Agents β Overview
- Instruction Files & Custom Instructions
- Cheat Sheet
1 Markdown Quick Start
Markdown is the standard format for documentation and AI context files. Here are the essentials:
Text Formatting
# Heading 1
## Heading 2
### Heading 3
**Bold**
*Italic*
~~Strikethrough~~
`Inline Code`
Lists
- Bullet point 1
- Bullet point 2
- Sub-item
1. Numbered list
2. Second item
Code Blocks
```python
def hello():
print("Hello World")
```
Links & Images
[Link text](https://example.com)

Tables
| Column A | Column B |
|----------|----------|
| Value 1 | Value 2 |
Why Markdown for AI?
- LLMs understand Markdown structure natively
- Headings create clear hierarchy β better context
- Code blocks are recognized as code (syntax highlighting)
- Tables convey structured data compactly
2 Prompting Fundamentals
What Is a Prompt?
A prompt is the instruction you send to an AI model. The clearer and more structured your prompt, the better the output.
The 4 Pillars of a Good Prompt
| Pillar | Description | Example |
|---|---|---|
| Role | Who should the AI be? | βYou are an experienced C# developer.β |
| Context | What background does the AI need? | βWeβre building a .NET 8 Web API.β |
| Task | What exactly should be done? | βCreate a controller for User CRUD.β |
| Format | How should the output look? | βOutput the code with XML comments.β |
The RICE Framework
Role β Instruction β Context β Expected Output
Role: You are a Senior DevOps Engineer.
Instruction: Create a Dockerfile for a Node.js 20 app.
Context: The app uses pnpm, has a /src directory, and needs port 3000.
Expected: Multi-stage Dockerfile with comments.
3 Dos & Donβts β Overview
β DOs
| # | Do | Why |
|---|---|---|
| 1 | Be specific | βWrite a TypeScript function that sorts an arrayβ > βwrite me codeβ |
| 2 | Provide context | Include language, framework, version, architecture |
| 3 | Define output format | βReturn JSONβ, βUse bullet pointsβ, βCreate a tableβ |
| 4 | Work iteratively | Start with skeleton, then refine in follow-up prompts |
| 5 | Use examples (Few-Shot) | Show 1β2 examples of desired output |
| 6 | Limit the scope | One prompt = one clear task |
| 7 | Use Markdown in prompts | Headings, lists, and code blocks for structure |
| 8 | Reference files | Use #file:src/service.ts in Copilot Chat |
| 9 | Review the output | Always review AI output, never blindly accept |
| 10 | Use Custom Instructions | .github/copilot-instructions.md for project-wide rules |
β DONβTs
| # | Donβt | Why |
|---|---|---|
| 1 | Vague prompts | βMake it betterβ β No clear goal |
| 2 | Too much at once | βBuild me a complete appβ β Overwhelming |
| 3 | Forget context | Without language/framework, the AI guesses |
| 4 | Blind copy-paste | Always read and understand the code |
| 5 | Enter sensitive data | No real passwords, API keys, or customer data |
| 6 | Expect perfection first try | Iterative prompting is normal |
| 7 | Use negations | βDonβt use varβ β Better: βUse const and letβ |
| 8 | Overload the context window | Donβt paste entire codebases into one prompt |
| 9 | Switch prompt languages | Stay in one language per conversation |
| 10 | Agent mode for trivial tasks | Simple edits donβt need an agent |
4 Copilot Chat & Context Variables
Slash Commands
| Command | Function |
|---|---|
/explain |
Get code explanations |
/fix |
Fix errors |
/tests |
Generate tests |
/doc |
Create documentation |
/new |
Scaffold new projects/files |
Context Variables
| Variable | Description |
|---|---|
#file |
Reference a specific file |
#selection |
Reference selected code |
#editor |
Current editor content |
#codebase |
Search entire project |
#terminalLastCommand |
Reference last terminal command |
Example Prompts for Daily Work
Code Review:
Review #selection for:
1. Potential bugs
2. Performance issues
3. Best practice violations
Provide improvement suggestions as a diff.
Debugging:
The following error occurred: #terminalLastCommand
Analyze the error in the context of #file:src/app.ts and suggest a fix.
π‘ More examples in the job-specific guides: Analysts Β· Legal Β· Developers Β· Office Work
5 Agent Mode β Overview
What Is Agent Mode?
Agent mode in VS Code allows Copilot to autonomously perform multiple steps:
- Read, create, and edit files
- Run terminal commands
- Work across multiple files
- Detect and self-correct errors
When to Use Agent Mode?
| Scenario | Agent β | Chat π¬ |
|---|---|---|
| New feature across multiple files | β | Β |
| Refactoring an entire module | β | Β |
| Debugging with terminal access | β | Β |
| Writing a single function | Β | π¬ suffices |
| Quick explanation | Β | π¬ suffices |
Structure for Agent Prompts
## Goal
[What should be achieved at the end?]
## Context
[Relevant architecture, technologies, constraints]
## Steps
1. [First step]
2. [Second step]
3. [Third step]
## Requirements
- [Non-functional requirement 1]
- [NFR 2]
## Do Not
- [Explicit exclusions]
Agent Mode Tips
- Use instruction files β
.github/copilot-instructions.mdis loaded automatically - Scope tasks clearly β 3 focused agent sessions beat one massive one
- Set checkpoints β Review changes after each step
- Watch terminal output β Agent runs commands that may have side effects
- Use undo β VS Code can revert agent changes
π‘ Detailed agent examples in: Analysts Β· Legal Β· Developers Β· Office Work
6 Copilot Studio Agents β Overview
What Is Copilot Studio?
Microsoft Copilot Studio lets you build custom AI agents without code β for Teams, SharePoint, Web, and more.
Structure the System Prompt
# Role
You are [Name], an assistant for [Purpose].
# Capabilities
- You can [Capability 1]
- You can [Capability 2]
- You have access to [Data Source]
# Behavior
- Always respond in [Language]
- Use a [formal/informal] tone
- Maximum [X] sentences per response
# Boundaries
- Do NOT answer questions about [Topic]
- When uncertain, say: "[Fallback Text]"
# Output Format
- Use bullet points for lists
- Link to [Sources] when possible
Agent Toolchain Architecture
flowchart TB
A[π€ User Request] --> B[π€ Orchestrator Agent]
B --> C[Agent A<br/>Research]
B --> D[Agent B<br/>Processing]
B --> E[Agent C<br/>Review]
C & D & E --> F[π Summary]
F --> G[π€ User Response]
style A fill:#e3f2fd
style B fill:#fff3e0
style F fill:#e8f5e9
style G fill:#c8e6c9
π‘ Job-specific agent examples: Reporting Agent (Analysts) Β· Contract Agent (Legal) Β· IT Helpdesk (Office)
7 Instruction Files & Custom Instructions
Levels of Configuration
ββββββββββββββββββββββββββββββββββββββ
β 1. VS Code Settings (global) β β Applies to all projects
ββββββββββββββββββββββββββββββββββββββ€
β 2. .github/copilot-instructions.md β β Applies to the project
ββββββββββββββββββββββββββββββββββββββ€
β 3. .copilot/*.md β β Context files per topic
ββββββββββββββββββββββββββββββββββββββ€
β 4. Inline prompt context β β Applies to the single request
ββββββββββββββββββββββββββββββββββββββ
VS Code Custom Instructions
In settings.json:
{
"github.copilot.chat.codeGeneration.instructions": [
{ "text": "Always use TypeScript strict mode." },
{ "text": "Prefer functional programming." },
{ "file": ".copilot/conventions.md" }
]
}
copilot-instructions.md β Example
# Project: Contoso Web App
## Tech Stack
- Frontend: React 18 + TypeScript 5
- Backend: .NET 8 Web API
- Database: PostgreSQL 16
- ORM: Entity Framework Core
## Code Conventions
- Use PascalCase for C# classes and methods
- Use camelCase for TypeScript variables and functions
- All API endpoints return `ApiResponse<T>`
## Architecture
- Clean Architecture (Domain β Application β Infrastructure β API)
- CQRS with MediatR for commands and queries
- Repository pattern for data access
## Rules
- Write unit tests for all new services
- All DTOs are `record` types
- API versioning via URL path (/api/v1/)
Best Practices
- Keep it short and precise β One rule per line
- Phrase positively β βUse Xβ instead of βDonβt use Yβ
- Prioritize β Most important rules first
- Keep it current β Review and update regularly
- Team consensus β Involve all team members
8 Cheat Sheet
Prompt Templates β Ready to Copy
Explain Code:
Explain #selection step by step. Focus on:
- What does the code do?
- What edge cases exist?
- How could it be improved?
Find Bugs:
Analyze #file for potential bugs:
1. Null reference errors
2. Race conditions
3. Missing error handling
4. Memory leaks
Write Tests:
Write unit tests for #file:
- Use [Jest/xUnit/pytest]
- Test happy path and error cases
- Use Arrange-Act-Assert pattern
- Mock external dependencies
Agent β New Feature:
## Goal
[Feature description]
## Context
- Project: [Name]
- Tech Stack: [Technologies]
- Relevant files: #file:... #file:...
## Task
1. [Step 1]
2. [Step 2]
3. [Write tests]
4. [Update documentation]
## Rules
- Follow existing architecture
- No breaking changes
- All tests must pass
Job-Specific Guides
| Guide | Description |
|---|---|
| π Analysts | Data analysis, reports, SQL, KPIs, visualizations |
| βοΈ Legal | Contracts, compliance, GDPR, clause analysis |
| π» Developers | Code, debugging, architecture, CI/CD, refactoring |
| π’ Office Work | Emails, meetings, presentations, file conversion |
Further Reading
License: MIT β Free to use and modify. Contributing: Pull requests and issues are welcome!