An example workspace demonstrating best practices for AI-assisted development with GitHub Copilot, VS Code, and MCP servers.
This repository serves as a reference implementation for setting up an AI-enhanced development environment. It showcases:
- GitHub Copilot integration with custom prompts and instructions
- Model Context Protocol (MCP) servers for extended AI capabilities
- Security-conscious auto-approval settings for terminal and file operations
- Project-specific context through
copilot-instructions.mdand domain-specific instruction files
- VS Code (version 1.99+)
- GitHub Copilot subscription
- Node.js (for NPX-based MCP servers)
- Docker (for containerized MCP servers)
-
Clone this repository:
git clone <repository-url> cd ai-workspace
-
Open in VS Code:
code . -
Install recommended extensions:
- VS Code will prompt you to install recommended extensions
- Or manually install from
.vscode/extensions.json
-
Review and adjust configurations:
- See
docs/CONFIGURATION.mdfor detailed configuration guide - Adjust AWS profile and region in
.vscode/mcp.json - Review auto-approval patterns in
.vscode/settings.json
- See
-
Start using AI features:
- Open GitHub Copilot Chat (ββI / Ctrl+Alt+I)
- Try the custom prompts in
.github/prompts/ - Use
/commands to trigger custom prompts
- Agent Mode: Autonomous coding with multi-step reasoning
- Custom Prompts: Pre-built prompts for common workflows
- Sequential Thinking: Complex problem-solving with structured reasoning
This workspace includes several MCP servers that extend AI capabilities:
- GitHub: Manage issues, PRs, and repositories
- Atlassian: Integrate Jira and Confluence
- Terraform: Infrastructure as Code assistance
- AWS Terraform: AWS-specific IaC support
- Docker: Container management
- Memory: Persistent context across sessions
- Sequential Thinking: Structured problem decomposition
See docs/CONFIGURATION.md for detailed information on each server.
- Selective auto-approval: Only safe, read-only commands are auto-approved
- File protection: Critical configuration files require manual review
- Explicit deny lists: Dangerous commands are explicitly blocked
- Auditable patterns: All patterns are documented and version-controlled
.github/copilot-instructions.md: Project-wide instructions for Copilot.github/instructions/: Domain-specific instruction files.github/prompts/: Reusable prompt templates
AI agents use several files to understand your project:
.github/copilot-instructions.md: Project-wide instructions for Copilot.github/instructions/*.instructions.md: Domain-specific guidance
Enable these features in settings:
{
"chat.useAgentsMdFile": true,
"chat.useNestedAgentsMdFiles": true
}Use custom prompts with the / command:
/terraform- Terraform-specific assistance/documentation-writer- Generate documentation/react-component- Create React components
Custom prompts are stored in .github/prompts/ and can be triggered by name in chat.
The workspace uses carefully crafted auto-approval patterns to balance productivity and security.
Safe commands (auto-approved):
- Git read operations:
git status,git diff,git log - File inspection:
cat,ls,pwd - Safe operations:
echo,terraform validate
Dangerous commands (require confirmation):
- Destructive:
rm,rmdir,del - Privileged:
chmod,chown,kill - Network:
curl,wget - Installations:
npm install,pip install
See Terminal Auto-Approval for complete configuration.
ai-workspace/
βββ .github/
β βββ copilot-instructions.md # Project-wide Copilot instructions
β βββ instructions/ # Domain-specific instructions
β β βββ terraform.instructions.md
β β βββ postgres.instructions.md
β β βββ ...
β βββ prompts/ # Custom prompt templates
β β βββ terraform.prompt.md
β β βββ documentation-writer.prompt.md
β β βββ ...
β βββ scripts/ # Utility scripts
β βββ fix-line-endings.sh
βββ .vscode/
β βββ settings.json # Workspace settings
β βββ mcp.json # MCP server configuration
β βββ extensions.json # Recommended extensions
β βββ task-list.mdc # Task management
βββ .config/
β βββ memory.json # (optional) local persistent memory storage (gitignored)
βββ docs/
β βββ CONFIGURATION.md # Detailed configuration guide
βββ README.md # This file
βββ TODO.md # Project tasks
All configurations are documented in docs/CONFIGURATION.md, including:
- VS Code settings explanation
- MCP server setup and usage
- Terminal auto-approval patterns
- File edit auto-approval rules
- Security considerations
- Troubleshooting guide
- Review auto-approval patterns before enabling
- Keep dangerous commands blocked
- Regularly audit configurations
- Use workspace settings for project-specific rules
- Keep
copilot-instructions.mdupdated with current project context - Document decisions in instruction files
- Use custom prompts for repeated workflows
- Leverage memory server for persistent context
- Disable unused servers to improve performance
- Pin versions for stability
- Use environment variables for sensitive configuration
- Monitor server logs in VS Code Output panel
- Version control configurations to share with team
- Document custom patterns and their rationale
- Create team-specific prompts for common workflows
- Review and update configurations regularly
- Check VS Code Output panel β "GitHub Copilot Chat"
- Verify command availability:
which npxorwhich docker - Restart VS Code after configuration changes
- Check server logs for specific errors
- Verify pattern syntax (regex requires
/pattern/) - Test pattern matches against actual commands
- Check for conflicting rules (more specific rules win)
- Review VS Code settings for typos
- Ensure
chat.useAgentsMdFilesetting is enabled - Check that
copilot-instructions.mdcontains project context - Verify
.github/copilot-instructions.mdexists - Restart VS Code to reload context files
See docs/CONFIGURATION.md#troubleshooting for more solutions.
This workspace supports automated testing with Playwright MCP server. See the Microsoft Playwright MCP documentation for setup instructions.
- VS Code Copilot Documentation
- GitHub Copilot Documentation
- MCP Specification
- Awesome MCP Servers
- VS Code Agent Mode
This is an example repository. Feel free to fork and adapt to your needs. If you find improvements or have suggestions, contributions are welcome!
This project is licensed under the MIT License.