Boilerplate for GitHub Copilot — agents, skills, your own MCP servers, and a persistent memory system — ready to drop into any repository.
Let me know what you think about this, if this is helpful to you or how you would improved this. What default MCP, skills or agents would add?
Copy the .github/ directory into your repository and customise the files to match your project.
Then install the local plugin so Copilot picks up your agents, skills, and MCPs:
copilot plugin install "$PWD/.github"Also add the anthropic document skills:
copilot plugin marketplace add anthropics/skills
copilot plugin install document-skills@anthropic-agent-skills.github/
├── .heartbeats.json # Declarative heartbeat schedule and prompts
├── copilot-instructions.md # Standard global instructions loaded into every Copilot session
├── plugin.json # Local plugin manifest — registers agents, skills & MCPs
├── .mcp.json # MCP server registry (stdio servers run via `uv`)
├── hooks/ # Copilot hook definitions (session lifecycle automation)
│ └── sync_heartbeats.json # Session-start hook that syncs heartbeat jobs
├── scripts/ # Helper scripts invoked by hooks
│ ├── sync_heartbeats.py # Linux cron sync
│ ├── sync_heartbeats_mac.py # macOS launchd sync
│ └── sync_heartbeats_win.py # Windows Task Scheduler sync
│
├── agents/ # Custom Copilot agent definitions
│ ├── orchestrator.agent.md # Lead-Architect — coordinates all other agents
│ ├── researcher.agent.md # Web & scientific literature search
│ ├── codebase.agent.md # Read-only codebase exploration
│ ├── coder.agent.md # Feature implementation
│ ├── refactor.agent.md # Structural changes & migrations
│ ├── code_critic.agent.md # Code review (read-only)
│ ├── tester.agent.md # Test writing & QA
│ ├── test_critic.agent.md # Test review (read-only)
│ ├── docs_writer.agent.md # Documentation generation
│ └── experiment_manager.agent.md # Experiment lifecycle management
│
├── mcps/ # Model Context Protocol servers
│ └── deep_research_mcp.py # Web + ArXiv search MCP (FastMCP / uv)
│
├── skills/ # Reusable instruction bundles (skills)
│ ├── add-skill/ # Skill: scaffold a new skill
│ │ └── SKILL.md
│ ├── add-mcp/ # Skill: scaffold a new MCP server
│ │ └── SKILL.md
│ ├── dream/ # Skill: memory consolidation (/dream)
│ │ └── SKILL.md
│ └── temp-skill-test/ # (empty, used for testing)
│
└── memory/ # Persistent memory bank for cross-session context
├── project-context.md # Project purpose, tech stack & architecture
├── active-task.md # Current task and immediate next steps
├── workflows.md # Step-by-step SOPs for repetitive tasks
├── decision-log.md # Chronological log of technical decisions
├── archive.md # Compressed summaries of completed work
└── dream-protocol.md # `/dream` consolidation & pruning rules
The standard global instruction file loaded at the start of every Copilot session. It contains:
- Project Overview / Commands / Key Conventions — placeholders you fill in for your project.
- Memory Bank Protocol — tells Copilot how to read, use, and update the persistent memory files (see §7 Memory).
| Field | Purpose |
|---|---|
agents |
Points to the agents/ directory so all .agent.md files are discovered |
skills |
Lists registered skills by path (skills/add-skill, skills/add-mcp, skills/dream) |
mcpServers |
Points to .mcp.json for MCP server definitions |
The agents form a multi-agent workflow orchestrated by the Lead-Architect:
| Agent | File | Role |
|---|---|---|
| Lead-Architect | orchestrator.agent.md |
Coordinates all agents |
| Researcher | researcher.agent.md |
Searches the web and ArXiv for scientific context |
| Codebase Agent | codebase.agent.md |
Explores the local codebase for existing implementations |
| Coder | coder.agent.md |
Implements new features |
| Refactor-Specialist | refactor.agent.md |
Restructures code, updates imports, handles migrations |
| Code Critic | code_critic.agent.md |
Reviews code for correctness, readability & security |
| Tester | tester.agent.md |
Writes pytest tests targeting 100% coverage |
| Test Critic | test_critic.agent.md |
Reviews test suites for gaps and robustness |
| Docs Writer | docs_writer.agent.md |
Generates and updates READMEs, API docs & changelogs |
MCP (Model Context Protocol) servers give Copilot access to external tools at runtime.
A local stdio MCP server built with FastMCP and run via uv. It exposes two tools:
| Tool | Description |
|---|---|
search_web |
DuckDuckGo web search for documentation, articles & general info |
search_scientific_papers |
ArXiv search for academic papers and preprints |
Dependencies are declared inline (PEP 723) so they stay isolated from the main project:
arxiv>=3.0.0, duckduckgo-search>=8.0.0, mcp[cli]>=1.0.0Registers servers so Copilot can discover them:
{
"mcpServers": {
"deep-research": {
"command": "uv",
"args": ["run", "mcps/deep_research_mcp.py"]
}
}
}Skills are reusable instruction bundles that teach Copilot how to perform specific tasks. Each skill lives in its own directory with a SKILL.md file.
| Skill | Directory | Trigger phrases |
|---|---|---|
| add-skill | skills/add-skill/ |
"add a skill", "create a skill", "scaffold skill" |
| add-mcp | skills/add-mcp/ |
"add an MCP", "create an MCP", "new MCP server" |
| dream | skills/dream/ |
"dream", "/dream", "consolidate memory", "prune memory" |
Walks through scaffolding a new skill: gathering requirements, creating skills/<name>/SKILL.md, registering it in plugin.json, and reinstalling the plugin.
Walks through scaffolding a new MCP server: gathering requirements, creating a FastMCP Python script in mcps/, registering it in .mcp.json, and verifying the server responds.
Triggers the memory maintenance cycle: reads all memory files, archives completed tasks, merges redundant decisions, extracts new workflows, updates project context, and presents the changes for review.
Hooks let Copilot run automation at session lifecycle boundaries. In this boilerplate, the currently implemented hook runs at session start and ensures the configured heartbeat jobs are synchronized with the local operating system scheduler.
This file registers a sessionStart hook with platform-specific commands:
bashrunspython .github/scripts/sync_heartbeats.pypowershellrunspython .github/scripts/sync_heartbeats_win.py
The effect is that whenever a real Copilot chat session starts in the repository, Copilot re-reads the heartbeat configuration and reapplies it to the local scheduler. That keeps the scheduled automation aligned with the checked-in config instead of relying on a one-time manual setup.
This file is the declarative source of truth for heartbeat jobs:
| Field | Purpose |
|---|---|
name |
Stable identifier used for the scheduled job name and log file name |
schedule |
Five-field cron-style schedule string |
prompt |
Copilot prompt to execute when the heartbeat fires |
Current example:
weekly-sleepruns every Sunday at03:00- It executes the
dreamskill prompt to consolidate memory automatically
The hook does not execute the heartbeat immediately. Instead, it translates .heartbeats.json into native scheduled jobs:
| Platform | Script | Scheduler |
|---|---|---|
| Linux | scripts/sync_heartbeats.py |
cron |
| macOS | scripts/sync_heartbeats_mac.py |
launchd |
| Windows | scripts/sync_heartbeats_win.py |
Task Scheduler |
On Windows, the sync script validates each heartbeat, creates a per-workspace task prefix, writes a short PowerShell wrapper script, and registers a Task Scheduler entry that launches Copilot in autopilot mode from the repository root. The task name format is CopilotHB_<workspace-hash>_<heartbeat-name>, which avoids collisions across repositories.
This design gives you two important properties:
- Heartbeat definitions stay version-controlled in the repository.
- Session start acts as a repair point, re-registering jobs if they were deleted or changed locally.
A persistent, file-based memory system that gives Copilot cross-session context. Governed by the Memory Bank Protocol defined in copilot-instructions.md.
| File | Purpose | Volatility |
|---|---|---|
project-context.md |
Project description, tech stack, architecture | Static — rarely changes |
active-task.md |
Current task and immediate next steps | Highly dynamic |
workflows.md |
Step-by-step SOPs for repetitive tasks | Grows over time |
decision-log.md |
Why specific technical decisions were made | Append-only |
archive.md |
Compressed summaries of completed tasks | Append-only |
dream-protocol.md |
Rules for the /dream consolidation command |
Static |
Protocol phases:
- Read — Copilot reads
project-context.mdandactive-task.mdat session start. - Execute — Copilot consults
workflows.mdanddecision-log.mdduring work. - Write — On request ("update the memory"), Copilot proposes edits to the relevant memory files.
- Dream — The dream skill triggers consolidation: completed tasks move to the archive, redundant decisions are merged, and new workflows are extracted. Activate it by saying "dream", "/dream", or "consolidate memory".
| What you want to do | Where to look |
|---|---|
| Add project-specific instructions | copilot-instructions.md — fill in the placeholder sections |
| Add a new agent | Create agents/<name>.agent.md (auto-discovered via plugin.json) |
| Add a new skill | Use the add-skill skill, or manually create skills/<name>/SKILL.md and register in plugin.json |
| Add a new MCP server | Use the add-mcp skill, or manually create mcps/<name>_mcp.py and register in .mcp.json |
| Add or change a startup hook | Edit hooks/*.json and point it at a script in scripts/ |
| Add or change a heartbeat job | Edit .heartbeats.json; the next session start will resync it |
| Record a technical decision | Add an entry to memory/decision-log.md |
| Document a repeatable workflow | Add steps to memory/workflows.md |
- GitHub Copilot CLI with plugin support
- uv (for running MCP servers)
- Python ≥ 3.12 (for the MCP scripts)