copilot

An integration that gives GitHub Copilot, GitHub’s coding assistant, a persistent project memory loop through its instruction file. It records context, file changes, follow-up tasks, and session recaps.

In plain words
What is it for?
Use it to configure Copilot, load context in VS Code or JetBrains, bootstrap from Git history, and record work for later sessions.
Why use it?
It helps Copilot retain useful project history across sessions rather than relying only on the current conversation.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/rustkit-ai/aimemo/copilot
Clone the repo
git clone --depth 1 https://github.com/rustkit-ai/aimemo
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 850 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00850
Opus 5 $0.00000 $0.00425
Sonnet 5 $0.00000 $0.00170
Haiku 4.5 $0.00000 $0.00085

Measured yesterday against content hash 88c9d4617696, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

copilot scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/agents/copilot.md · 135 lines

How it starts

The opening of the file, as written. The whole thing — 135 lines — stays where its author put it; the contents beside it link to each section on GitHub.

aimemo × GitHub Copilot / VS Code

GitHub Copilot reads .github/copilot-instructions.md automatically in VS Code and JetBrains IDEs. aimemo setup writes instructions into that file telling Copilot to maintain the memory loop: inject context at session start, log after file edits, recap at session end.

VS Code users: use aimemo inject --vscode — it writes to the same file.


Setup

Run once in your project root:

aimemo setup --copilot

Then bootstrap from your git history so the agent has context from day one:

aimemo bootstrap

What gets written

.github/copilot-instructions.md (appended section):

## aimemo — persistent memory
- At session start: run `aimemo inject --copilot` to load context from previous sessions
- After modifying any file: run `aimemo log "modified {filename}: {one-line reason}"`
- When you identify something to fix later: run `aimemo log "todo: {description}"`
- At session end: run `aimemo recap "{what was done} — next: {what comes next}"` then `aimemo inject --copilot`

<!-- aimemo:start -->
## aimemo context
last: (no entries yet)
<!-- aimemo:end -->

If a copilot-instructions.md already exists, aimemo setup appends the block instead of overwriting the file.


The session loop

Open VS Code / JetBrains with Copilot
      │
      ▼
Copilot reads .github/copilot-instructions.md
      │
      ▼
Agent runs: aimemo inject --copilot
      │  (updates the context block in copilot-instructions.md)
      ▼
Agent reads the context — knows where it left off
      │
      ▼
You work — agent logs after each file edit:
  aimemo log "modified src/components/Button.tsx: extracted shared component"
  aimemo log "todo: update Storybook stories for Button"
      │
      ▼
At session end:
  aimemo recap "extracted Button component, replaced 12 usages — next: Storybook"
  aimemo inject --copilot
      │
      ▼
Next session starts with full context

What the context block looks like

Read the full file on GitHub · 135 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 135 lines · 0 tokens per session scan A 88c9d4617696

Subscribe to this mod's changes

copilot is an agent published in the GitHub repository rustkit-ai/aimemo (4 stars, last pushed 5mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 850 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.