Description
Detects oversized .github/copilot-instructions.md (or equivalent) files. Custom instructions are prepended to every request's system prompt — large files inflate input tokens on every turn, often by thousands of tokens that are never relevant to the current task.
When Triggered
{{extra.bloatedSessions}} workspace(s) have custom-instruction files larger than {{thresholds.maxBytes}} bytes (largest: {{extra.maxBytes}} bytes). Every request in those workspaces pays the bloat cost on input tokens.
How to Improve
Trim .github/copilot-instructions.md to the essentials: language/framework conventions, code style, "do not" rules, and pointers to longer docs. Move long examples and rationale into separate files referenced via #file:. Keep the always-on payload under ~4 KB.
Examples
{{extra.maxBytes}} bytes — largest custom-instructions file across {{extra.totalSessions}} workspace(s)
Detection Logic
scan: sessions
match: true
aggregate: count
stats: instructionBloatStats(allSessions, thresholds.maxBytes)
bloatedSessions: stats.bloatedSessions
maxBytes: stats.maxBytes
totalSessions: stats.totalSessions
withInstructionsCount: stats.withInstructionsCount
emitCount: stats.bloatedSessions
emitTotal: stats.totalSessions
check: stats.bloatedSessions >= thresholds.minBloated
examples: {{maxBytes}} bytes (workspace-level)