TypeChat: Instructions file for GitHub Copilot

.github/copilot-instructions.md

TypeChat copilot-instructions.md is an instructions file for GitHub Copilot from microsoft/TypeChat. It costs 1,062 tokens per session, scanned A, original, MIT.

Repository instructions for contributors and coding agents working on TypeChat, a library that turns natural-language requests into validated, typed data.

In plain words
What is it for?
It helps agents assess scope, preserve schemas and validation behavior, follow repository guidance, and know when to pause for an owner's decision.
Why use it?
It keeps proposed changes aligned with the project's approved direction, compatibility requirements, and review process.

Instructions file for GitHub Copilot ✓ vendor

Written for GitHub Copilot: a Copilot instructions file.

This is microsoft/TypeChat's own configuration. It tells GitHub Copilot how to work on TypeChat itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything TypeChat configures →

About the project

TypeChat is a library for building natural-language interfaces by defining types that describe the intents and data an application accepts. Developers use it to guide large language models toward structured responses and check that those responses match the required schema.

microsoft/TypeChat · 8,693 stars · on GitHub · microsoft.github.io

Reuse

Borrowing it

Nothing to install: this file belongs to microsoft/TypeChat. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/microsoft/TypeChat/main/.github/copilot-instructions.md
Clone the repo
git clone --depth 1 https://github.com/microsoft/TypeChat

Made for: GitHub Copilot.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for TypeChat copilot-instructions.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/microsoft/typechat/copilot-instructions/github.svg)](https://agentmods.dev/instructions/microsoft/typechat/copilot-instructions)
Your own site
<a href="https://agentmods.dev/instructions/microsoft/typechat/copilot-instructions"><img src="https://agentmods.dev/badge/instructions/microsoft/typechat/copilot-instructions/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for TypeChat copilot-instructions.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/microsoft/typechat/copilot-instructions"><img src="https://agentmods.dev/badge/instructions/microsoft/typechat/copilot-instructions.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,062 This file is loaded in full into every session.
When invoked 1,062 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.01062 $0.01062
Opus 5.5 $0.00425 $0.00425
Sonnet 5.5 $0.00212 $0.00212
Haiku 4.5 $0.00106 $0.00106

Measured 2d ago against content hash bbd9f03797e2, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

TypeChat copilot-instructions.md 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 2d ago.

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.

.github/copilot-instructions.md · 97 lines

How it starts

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

TypeChat contributor guidance

TypeChat turns natural-language requests into validated, typed data. Preserve schema accuracy, validation behavior, and compatibility when proposing changes.

Project direction

Read GOALS.md before assessing scope or proposing work. It is the primary repository policy for product direction. Use the approved default-branch version; proposed edits in an unmerged PR are not active policy.

Only the human project owner, @robgruen, can approve changes to that policy or exceptions to its boundaries. Items under consideration are not approved implementation work. If the policy is unavailable, fit is unclear, or a request conflicts with it, explain the issue and pause dependent work for an owner decision. Do not infer approval from community interest, labels, passing checks, or agent recommendations.

Ordinary in-scope maintenance follows the existing maintainer review process. Do not remove supported behavior or close existing contributions merely because of a possible policy conflict; preserve the evidence and ask the owner.

Working in this repository

  • The TypeScript library and examples are in typescript/; the Python library and examples are in python/; the documentation site is in site/.
  • Use the Node.js version in .nvmrc. Consult each language's README and dependency manifest rather than assuming both implementations behave alike.
  • Keep changes focused, preserve existing contributions, and update directly related documentation. Add regression tests for behavioral changes.
  • Use the existing test tools. Prefer offline, deterministic tests with mocked model responses; do not require live model credentials for ordinary tests.
  • Do not weaken validation or replace unsupported schema types with unconstrained types merely to make a test pass. Report errors explicitly.

Verification

Run commands from the indicated directory:

  • typescript/: npm ci, npm run build-all, and npm test.
  • python/: hatch env create and hatch run test. For the existing Pyright check, install the npm development dependencies and run npm run check.
  • site/: npm ci and npm run build.
  • tools/: npm ci --ignore-scripts and npm test for repository automation.

Read the full file on GitHub · 97 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. 2d ago Changed · +8 lines · +100 tokens per session bbd9f03797e2
  2. 4d ago Changed · +10 lines · +138 tokens per session cc91313b0cc5
  3. 5d ago Changed · +2 lines · +31 tokens per session 4d6d210dcf21
  4. 6d ago Changed · +6 lines · +81 tokens per session 567724884b03
  5. 7d ago Changed · -1 tokens per session af10da2450a9
  6. 9d ago First seen · 71 lines · 713 tokens per session scan A 438128eceeef

Subscribe to this mod's changes

TypeChat copilot-instructions.md is an instructions file published in the GitHub repository microsoft/TypeChat (8,693 stars, last pushed today), licensed MIT. It adds 1,062 tokens to every session, about $0.0042 per session on Opus 5.5. 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-10-28.

Related

TypeChat copilot-instructions.md compared with instructions from other repositories

TypeChat copilot-instructions.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
TypeChat copilot-instructions.mdmicrosoft/TypeChatInstructions file8.7ktodayMITA1,062GitHub Copilot
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode