context-prime
Invoke when starting a session (or resuming after a break) on a repo before making changes, to load live project context (structure, recent commits, test status)
Best use case
context-prime is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Invoke when starting a session (or resuming after a break) on a repo before making changes, to load live project context (structure, recent commits, test status)
Teams using context-prime should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/context-prime/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How context-prime Compares
| Feature / Agent | context-prime | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Invoke when starting a session (or resuming after a break) on a repo before making changes, to load live project context (structure, recent commits, test status)
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Context Prime
## Why This is Copilot-Exclusive
Copilot CLI reads `.github/copilot-instructions.md` automatically on every session start.
This skill layers *additional* context loading on top of that — fetching live project state
(recent commits, file structure, test status) that static instructions can't capture.
## When to Use
- At the start of any session before making changes to an unfamiliar codebase
- When resuming work after a long break (branch has moved, dependencies changed)
- Before running a large autopilot or fleet task — ensure the AI has full context
- When onboarding a new contributor — demonstrate the project structure interactively
## Workflow
### 1. Read Project Identity
```powershell
# Core identity files
Get-Content README.md | Select-Object -First 60
# Project instructions (Copilot reads this automatically, but re-surface it)
if (Test-Path .github/copilot-instructions.md) {
Get-Content .github/copilot-instructions.md
}
```
### 2. Understand the File Structure
```powershell
# List tracked files (respects .gitignore automatically)
git ls-files | Select-Object -First 100
# Or filtered by extension for a focused view
git ls-files | Where-Object { $_ -match '\.(ts|js|py|go|cs)$' } | Select-Object -First 80
# Top-level structure
Get-ChildItem -Depth 1 | Where-Object { $_.Name -notmatch '^\.' } |
Select-Object Name, PSIsContainer | Format-Table
```
### 3. Understand the Tech Stack
```powershell
# Node.js
if (Test-Path package.json) {
$pkg = Get-Content package.json | ConvertFrom-Json
Write-Host "Project: $($pkg.name) v$($pkg.version)"
Write-Host "Scripts: $($pkg.scripts.PSObject.Properties.Name -join ', ')"
Write-Host "Key deps: $($pkg.dependencies.PSObject.Properties.Name -join ', ')"
}
# Python
if (Test-Path pyproject.toml) { Get-Content pyproject.toml | Select-Object -First 30 }
# .NET
Get-ChildItem -Recurse -Filter "*.csproj" | Select-Object -First 3 | Get-Content
```
### 4. Get Current Development Context
```powershell
# What branch and recent activity
git --no-pager log --oneline -5
git --no-pager status --short
# Any open issues or PRs being worked on (Copilot MCP)
# Tool: github-mcp-server-list_issues owner: ... repo: ... state: OPEN
```
### 5. Check Test and Build State (Optional)
```powershell
# Quick test status without full run
npm test -- --passWithNoTests 2>&1 | Select-Object -Last 5
# Or just see what test command exists
if (Test-Path package.json) {
(Get-Content package.json | ConvertFrom-Json).scripts
}
```
## Context Degradation Signals
Long sessions can slowly lose coherence. Re-prime when you notice:
- Repeated questions about decisions that were already made
- Reintroduction of bugs or patterns that were already corrected
- New code drifting away from local conventions established earlier in the task
- Responses that suddenly assume conflicting project facts
**If degradation shows up:**
1. Re-run this skill and reload live project state
2. Save a short checkpoint of the goal, decisions, and open risks
3. Start a fresh session if the context window is clearly fighting you
## Example Session Start Prompt
```text
> Prime context for this session:
> 1. Read README.md (first 50 lines)
> 2. List all tracked source files
> 3. Show the last 5 commits
> 4. Identify the tech stack from package.json / pyproject.toml
> 5. Summarize what this project does in 2-3 sentences
```
Copilot will run these steps and give you a compact project brief before you start working.
## Quick Variant (One-liner prompt)
```text
> Read README.md, list git ls-files output, and show me the last 3 commits.
> Then tell me: what does this project do, what stack is it using, and what was last worked on?
```
## Tips
- **Run this before autopilot tasks**: A well-primed session means fewer mid-task surprises
- **Include domain context**: If the project has a `docs/` or `ARCHITECTURE.md`, include it
- **`.github/copilot-instructions.md` is your long-term context**: Use this skill for *session-specific* context (current branch state, open issues)
- **After a long break**: Always re-prime — the `[Unreleased]` CHANGELOG section and recent commits tell you where things stand
## See Also
- [`sprint-workflow`](../../workflow/sprint-workflow/SKILL.md) — full sprint starting with context prime
- [`github-issue-triage`](../github-issue-triage/SKILL.md) — load current open issues as context
- *Inspired by: [awesome-claude-code/resources/slash-commands/context-prime](https://github.com/hesreallyhim/awesome-claude-code)*Related Skills
context-engineering
Use when designing prompts or agent tasks to optimize information delivery — minimize noise, maximize signal for AI agents
verification-before-completion
Use before claiming any task is done — run the exact command that proves the fix works, read the output, and only then report success.
using-git-worktrees
Use when you need multiple branches checked out at once — create isolated working directories for parallel development without cloning the repository repeatedly
triage
Use when a single issue needs structured triage — classify it, reproduce if needed, request missing information, and leave a durable brief or close-out note in the tracker.
to-issues
Use when a plan, spec, or PRD must become an actionable backlog — break it into thin dependency-aware issues that each deliver a verifiable vertical slice
sprint-workflow
Use when starting a new feature, refactor, or multi-step dev task — runs the full sprint cycle (Think → Plan → Build → Review → Test → Ship → Monitor) using Copilot CLI's plan/autopilot modes.
sprint-retro
Use at the end of a sprint to run a data-driven retrospective — analyzes session history and git metrics to surface what shipped, what slowed you down, and concrete improvements.
security-audit
Use when a codebase needs a formal security audit beyond a quick scan — applies OWASP Top 10 and STRIDE threat modeling from a CSO perspective to surface systemic vulnerabilities.
release
Use when a sprint or feature is complete and ready to ship — tags the version, generates GitHub Release notes, runs rollout or smoke verification, and publishes to npm/PyPI/Docker registries.
prompt-optimizer
Use when a rough prompt, vague idea, or task description needs to become a finished copy-pasteable prompt for a chat-based LLM - rewrite it into one ready-to-send prompt with no blanks, no placeholders, and a clear output shape.
outside-voice
Use when you need an independent second opinion before, during, or after implementation — run challenge, consult, or review mode in a direct builder-to-builder voice
llm-wiki
Use when research or domain knowledge keeps getting rediscovered across sessions — build a supplementary markdown wiki that compounds synthesized knowledge without replacing GitHub or committed project guidance