GitHub Copilot Setup
Configure GitHub Copilot with StarterApp context engineering.
StarterApp includes GitHub Copilot integration through custom instructions in .github/copilot-instructions.md
. The configuration directs Copilot to read llms/CORE.md
for codebase patterns, enabling context-aware code generation and chat responses.
Automatic Context Loading
GitHub Copilot reads .github/copilot-instructions.md
automatically. The file instructs Copilot to load architectural patterns, security requirements, and template references from the /llms/
directory.
Installation
Install the GitHub Copilot extension and authenticate:
Install the GitHub Copilot extension in VS Code, Cursor, or compatible IDE through the Extensions marketplace
Sign in with GitHub account when prompted. The extension requires Copilot subscription (Free, Individual, Business, or Enterprise).
Verify activation by opening a TypeScript file. Copilot displays suggestions automatically.
Subscription Required
GitHub Copilot requires an active subscription. The Free plan provides limited completions and chat interactions. Individual, Business, and Enterprise plans offer unlimited usage.
Context Configuration
Custom Instructions
The .github/copilot-instructions.md
file provides repository-specific context:
# Core AI Agent Rules
[CRITICAL] Read all lines of `llms/CORE.md` and execute its instructions.
Copilot reads this file automatically and loads codebase patterns from llms/CORE.md
. The instruction file directs Copilot to:
Chat Features
Workspace Participant
Use the @workspace
participant to query the entire codebase:
@workspace Where is user authentication implemented?
@workspace How do I create a protected page?
@workspace Show me examples of Convex mutations
The @workspace
participant searches indexed code and applies context from .github/copilot-instructions.md
.
Context Variables
Reference specific files and symbols using context variables:
Inline Completions
Code Generation
Copilot provides inline suggestions as code is typed. The suggestions follow patterns from .github/copilot-instructions.md
automatically:
Pro Tip
Accept suggestions with Tab. Cycle through alternatives with Alt+] (next) or Alt+[ (previous). Dismiss suggestions with Esc.
Command Execution
Copilot Chat supports natural language instructions referencing command files:
Workflow Examples
Starting a Development Session
Open the project in VS Code or compatible IDE
Copilot loads context from .github/copilot-instructions.md
automatically
Begin development with inline completions or chat interface
Using Chat for Architecture Questions
Open Copilot Chat panel (Ctrl+Alt+I or Cmd+Option+I)
Query with workspace context:
@workspace How is authentication implemented in the dashboard app?
Copilot searches the codebase and provides architecture-aware responses
Feature Implementation with Templates
Reference template patterns in chat:
#file:llms/templates/auth-page-template.tsx Create a protected billing page following this pattern
Copilot generates code matching the template structure
Review generated code for pattern adherence
Validate with:
pnpm validate
Template Integration
Copilot references patterns from /llms/templates/
when instructed through chat or custom instructions:
Pro Tip
Copilot reads templates when referenced through #file:path
syntax or natural language mentions. The custom instructions ensure generated code follows StarterApp patterns.
Chat Participants
GitHub Copilot provides specialized chat participants for different contexts:
Command Reference
Available commands through chat interface:
Pro Tip
Reference commands through natural language: "Read and execute llms/commands/prime.md". Copilot understands the instruction pattern and executes the workflow.
Keyboard Shortcuts
Essential shortcuts for GitHub Copilot:
Validation Workflow
Verify generated code meets quality standards:
# Type safety
pnpm typecheck
# Code quality
pnpm lint
# Test execution
pnpm test
# Build verification
pnpm build
# Run all checks
pnpm validate
The pnpm validate
command runs all checks sequentially and reports failures.
Best Practices
Advanced Features
Next Steps
After GitHub Copilot configuration:
AI Workflow Overview
Learn AI-assisted development patterns using templates, commands, and context engineering.
Template System
Production-ready code patterns for authentication, billing, and data operations.
Environment Setup
Configure service credentials and environment variables for development.