Cursor vs Copilot Repo Footprint: 12 Steps, 70 Min A recount of the 2026 Stack Overflow Developer Survey by Stackness puts GitHub Copilot at 61.3% and Cursor at 26.6% of the 11,739 respondents who ticked at least one coding tool, with Claude Code ahead of both at 68.4%. The survey collected 30,903 valid responses from 169 countries between June 23 and August 5, 2026, and Stack Overflow published results on October 6, 2026. The analysis argues these self-reported shares measure respondents rather than repositories, and proposes a public-repo footprint method — counting tool config files via GitHub code search, sampling hits into repositories, stripping bulk-committed templates, and reporting a range — built on standard-library Python 3.12.3 with one GitHub token in about 70 minutes. Survey ticks and repository files answer different questions. A tick says a developer admits to using Cursor or GitHub Copilot. A committed rules file says someone cared enough to configure the tool for a codebase, in public. In the 2026 Stack Overflow Developer Survey, a recount by Stackness https://stackness.dev/blog/stack-overflow-developer-survey-2026-tool-changes-year-over-year reportedly puts Copilot at 61.3% and Cursor at 26.6% of the 11,739 respondents who ticked at least one coding tool, with Claude Code ahead of both at 68.4%. Those shares say little about how many repositories carry either tool’s setup files, and that second number is what a footprint measures. A public repo footprint works in four moves. Count marker files per tool through GitHub code search. Sample the hits to turn files into repositories. Strip out accounts that bulk-commit the same template. Then report a range instead of one tidy percentage. The kit runs on standard-library Python 3.12.3, needs a single GitHub token, and takes about 70 minutes to build and test. Survey work still matters, and the site already covers it from several sides. The Stack Overflow survey pandas walkthrough https://shattered.io/cursor-vs-copilot-stack-overflow-survey-pandas-12-steps-2026/ counts tool mentions with explicit denominators, and the market share audit https://shattered.io/cursor-vs-github-copilot-market-share-audit-12-steps-2026/ adds seat exports and a pulse survey. A footprint adds a third angle that none of those cover: what developers commit to public code when nobody is asking them anything. Don't miss new tech stories on Google Add Shattered once in the Google app and our stories show up in your news suggestions. Add now https://www.google.com/preferences/source?hl=en&q=https%3A%2F%2Fshattered.io%2F What a Repo Footprint Measures in Cursor vs Copilot Comparisons Every popular claim about Cursor vs Copilot rests on a unit. A survey counts respondents. A vendor page counts companies, revenue or seats. A footprint counts repositories that contain a tool’s configuration file. None of these is market share in the way a stock analyst would use the phrase, because none of them counts paid, active developers. They are three partial views, and each one fails in a different direction. Stack Overflow’s own 2025 press release said, in its words, “Cursor was used by 18% of surveyed developers as an AI-enabled IDE.” https://stackoverflow.co/company/press/archive/stack-overflow-2025-developer-survey That sentence is careful. It names a share of surveyed developers, not of all developers. The 2026 edition collected 30,903 valid responses from 169 countries between June 23 and August 5, 2026, and Stack Overflow published the results on October 6, 2026. Anyone quoting those percentages inherits the same limit: they describe people who chose to answer. | Signal | Unit counted | Who is counted | Main bias | Example | |---|---|---|---|---| | Developer survey | Respondents who tick a tool | Self-selected survey takers | Wording, base size, non-response | Stack Overflow 2026: 30,903 valid responses from 169 countries | | Vendor claim | Companies, revenue or seats | Customers the vendor chooses to cite | Undefined denominators | GitHub’s Copilot page says more than 90% of the Fortune 100 use it | | Vendor revenue headline | Recurring revenue | Paying accounts | No user count attached | A headline on Cursor’s site says recurring revenue doubled in three months to $2 billion | | Seat export | Licences assigned | Your own organization | Assigned is not active | Covered in the Copilot usage audit | | Repo footprint | Repos with a config file | Public-code authors who opt in | Public only, template spam, power-user skew | The kit in this tutorial | The footprint row has one property the others lack. It records behavior that someone chose to commit, timestamped by the search index, with no questionnaire in the way. It also has blind spots you must accept up front. Private repositories are invisible, which is where most enterprise Copilot seats live. Free-tier and student users may never write a rules file. And a team that uses Cursor daily but never commits a rules file leaves no trace at all. The kit below handles some of that bias and flags the rest. If you want a seat-level view of one organization, the Copilot usage audit https://shattered.io/github-copilot-usage-audit-cursor-installs-seats-12-steps-2026/ is the better tool. Prerequisites and Versions for the Footprint Kit The kit uses only the Python standard library at runtime, so there is no dependency tree to audit. Pytest is the single dev dependency. Every command below was run on Linux with the versions in this table. | Requirement | Version or detail | Why it matters | |---|---|---| | Python | 3.12.3 | urllib, json and pathlib cover the whole client | | pytest | Not listed | Runs the 10 tests against a local mock server | | GitHub account | Free tier works | Code search needs an authenticated request | | Personal access token | No scopes for public data | Raises you from a 401 to a working search | | jq | Any recent release optional | Inspect JSONL snapshots from the shell | | Disk | Under 5 MB | Snapshots, samples and a response cache | | Time | About 70 minutes | Most of it is writing and testing, not waiting | One honest caveat shapes everything that follows. The outputs shown in this tutorial come from the bundled mock server, so every count is synthetic. I did not run the kit against the live index with a real token, and the numbers would not be reproducible anyway because the index changes daily. The code paths are identical in both modes. You switch by setting BASE URL to https://api.github.com and exporting your own GITHUB TOKEN. Steps 1 to 3: Project, Probes and Token Step 1: Create the project and pin the tooling Start with an empty directory and a virtual environment. Pinning pytest keeps the test output in this tutorial reproducible. The data directory holds three things: the JSONL snapshots you will compare over time, the repository samples, and an HTTP cache that stops a rerun from burning your search quota. mkdir footprint && cd footprint python3 -m venv .venv && . .venv/bin/activate printf 'pytest==9.2.0\n' requirements.txt pip install -r requirements.txt mkdir -p tests data/snapshots data/samples python3 --version Python 3.12.3 Step 2: Choose marker files for each tool A probe is a code search query that matches one kind of configuration file. Pick markers that a tool documents and that developers commit on purpose. The five below cover Cursor’s project rules directory, Cursor’s older single-file format, Copilot’s repository instructions, the agent-neutral AGENTS.md file, and Claude Code’s CLAUDE.md. Check each vendor’s documentation for current filenames before you trust a probe, because formats change. The older rules format is one reason the Cursor rules linter https://shattered.io/cursor-rules-linter-agents-md-cursorignore-12-steps-2026/ exists. | Probe id | Tool | Query | Unit | |---|---|---|---| | cursor rules mdc | Cursor | path:.cursor/rules extension:mdc | Many files per repo | | cursor legacy | Cursor | filename:.cursorrules | One file per repo | | copilot instructions | Copilot | filename:copilot-instructions.md path:.github | One file per repo | | agents md | Shared | filename:AGENTS.md | One file per repo | | claude md | Claude Code | filename:CLAUDE.md | One file per repo | The Unit column is the first trap. A Cursor project can hold several .mdc files, so a raw file count in this tutorial’s demo data is not a repository count. Copilot’s instructions file is a single path per repo. Comparing the two raw counts would inflate Cursor, which Step 7 corrects. The config also defines two slices: all files, and files over 1,000 bytes. { "probes": {"id": "cursor rules mdc", "tool": "cursor", "unit": "many files per repo", "q": "path:.cursor/rules extension:mdc"}, {"id": "cursor legacy", "tool": "cursor", "unit": "one file per repo", "q": "filename:.cursorrules"}, {"id": "copilot instructions", "tool": "copilot", "unit": "one file per repo", "q": "filename:copilot-instructions.md path:.github"}, {"id": "agents md", "tool": "shared", "unit": "one file per repo", "q": "filename:AGENTS.md"}, {"id": "claude md", "tool": "claude code", "unit": "one file per repo", "q": "filename:CLAUDE.md"} , "slices": {"id": "all", "suffix": ""}, {"id": "substantive", "suffix": " size: 1000"} } Step 3: Create a token and test the quota Code search refuses anonymous callers. A plain curl returns HTTP 401 with the message Requires authentication , which is exactly what the client will translate into a readable error. Create a fine-grained or classic personal access token with no extra scopes, since you only read public data. Export it, then check the quota before any long run. export GITHUB TOKEN=ghp your token here curl -s -H "Authorization: Bearer $GITHUB TOKEN" \ https://api.github.com/rate limit | jq '.resources.code search' Read the limit and remaining fields your account reports and plan around them. The search quota is tracked apart from the general API quota and resets on a short window. That is why the collector pauses between calls instead of firing all ten queries at once. Steps 4 and 5: API Client and Snapshot Collector Step 4: Write the API client The client does four jobs. It adds the auth header, caches successful responses on disk, retries transient failures, and turns a 401 into an actionable message. Retry logic follows one rule: wait only when waiting can help. A Retry-After header wins, then an exhausted rate-limit header with its reset time, then a 403 whose body mentions a rate limit. Server errors back off exponentially. Anything else, such as a 422, raises immediately because retrying will not change the answer. """Small GitHub REST client: auth header, retries, rate-limit waits, disk cache.""" import hashlib import json import sys import time import urllib.error import urllib.parse import urllib.request from pathlib import Path class AuthError RuntimeError : pass class GitHub: def init self, base url="https://api.github.com", token=None, cache dir="data/cache", ttl=6 3600, sleep=time.sleep, max retries=4 : self.base url = base url.rstrip "/" self.token = token self.cache dir = Path cache dir self.cache dir.mkdir parents=True, exist ok=True self.ttl = ttl self.sleep = sleep self.max retries = max retries self.requests made = 0 def headers self : h = {"Accept": "application/vnd.github+json", "X-GitHub-Api-Version": "2022-11-28", "User-Agent": "footprint-probe/1.0"} if self.token: h "Authorization" = f"Bearer {self.token}" return h def cache file self, url : return self.cache dir / hashlib.sha256 url.encode .hexdigest :24 + ".json" def read cache self, url : f = self. cache file url if f.exists and time.time - f.stat .st mtime < self.ttl: return json.loads f.read text return None def wait for self, err, attempt : """Seconds to wait before retrying, or None when retrying cannot help.""" code = err.code if code in 403, 429 : retry after = err.headers.get "Retry-After" if retry after: return int retry after if err.headers.get "X-RateLimit-Remaining" == "0": reset = int err.headers.get "X-RateLimit-Reset", "0" return max 1, reset - int time.time + 1 body = err.read .decode errors="replace" .lower if "rate limit" in body: return 60 attempt + 1 return None if code = 500: return 2 attempt return None def get self, path, params : url = f"{self.base url}{path}?{urllib.parse.urlencode params }" cached = self. read cache url if cached is not None: return cached for attempt in range self.max retries + 1 : req = urllib.request.Request url, headers=self. headers try: with urllib.request.urlopen req, timeout=30 as resp: self.requests made += 1 body = json.load resp self. cache file url .write text json.dumps body return body except urllib.error.HTTPError as err: if err.code == 401: raise AuthError "401 from GitHub: code search needs a token " " set GITHUB TOKEN " from err wait = self. wait for err, attempt if wait is None or attempt == self.max retries: raise print f"retry {attempt + 1}: HTTP {err.code}, waiting {wait}s", file=sys.stderr self.sleep wait raise RuntimeError "unreachable" def search code self, q, per page=1, page=1 : return self.get "/search/code", q=q, per page=per page, page=page The sleep argument is injectable on purpose. Tests pass a list’s append method instead of time.sleep, so the retry path runs in milliseconds and still proves that the client waited the right number of seconds. Step 5: Count markers and save a snapshot The collector runs every probe in every slice with per page=1, because only total count matters at this stage. It stamps all rows from one run with the same UTC timestamp and appends them to a file named after the date. Appending matters. A second run on the same day adds rows instead of overwriting, and the report always reads the newest timestamp. """Count marker files per probe and slice, append one JSONL snapshot.""" import argparse import json import os import sys import time from datetime import datetime, timezone from pathlib import Path from ghclient import AuthError, GitHub def run gh, config, pause : stamp = datetime.now timezone.utc .isoformat timespec="seconds" rows = for probe in config "probes" : for sl in config "slices" : q = probe "q" + sl "suffix" data = gh.search code q, per page=1 rows.append { "ts": stamp, "probe": probe "id" , "tool": probe "tool" , "unit": probe "unit" , "slice": sl "id" , "query": q, "total count": data "total count" , "incomplete": data.get "incomplete results", False , } print f"{probe 'id' :<22}{sl 'id' :<12}{data 'total count' : 8}" time.sleep pause return rows def main : ap = argparse.ArgumentParser ap.add argument "--probes", default="probes.json" ap.add argument "--base-url", default="https://api.github.com" ap.add argument "--out", default="data/snapshots" ap.add argument "--pause", type=float, default=7.0 args = ap.parse args gh = GitHub base url=args.base url, token=os.environ.get "GITHUB TOKEN" config = json.loads Path args.probes .read text try: rows = run gh, config, args.pause except AuthError as e: sys.exit str e out = Path args.out out.mkdir parents=True, exist ok=True target = out / f"{rows 0 'ts' :10 }.jsonl" with target.open "a" as fh: for r in rows: fh.write json.dumps r + "\n" print f"wrote {len rows } rows to {target}" if name == " main ": main Run it first without a token to confirm the failure mode, then with one. The demo below targets the mock server in flaky mode, which injects one 403 and one 502 so you can watch the retries. python3 collect.py --base-url http://127.0.0.1:8765 --pause 0 401 from GitHub: code search needs a token set GITHUB TOKEN GITHUB TOKEN=ghp demo python3 collect.py --base-url http://127.0.0.1:8765 --pause 0.1 retry 1: HTTP 403, waiting 1s retry 1: HTTP 502, waiting 1s cursor rules mdc all 4800 cursor rules mdc substantive 3840 cursor legacy all 3200 cursor legacy substantive 2240 copilot instructions all 2600 copilot instructions substantive 1170 agents md all 9000 agents md substantive 4500 claude md all 5100 claude md substantive 3315 wrote 10 rows to data/snapshots/2026-11-29.jsonl Against the real API, keep the default seven-second pause. Ten queries then take about 70 seconds, which is cheap insurance against a secondary rate limit. Steps 6 and 7: Slices and Repository Sampling Step 6: Compare the all-files and substantive slices Raw counts reward spam. A repository can commit a one-line copilot-instructions.md stub from a template, and the search index counts it the same as a 4 KB file full of project conventions. The substantive slice appends size: 1000 to every query, which keeps only files over 1,000 bytes. The threshold is a judgment call, so store it in the config and change it when you disagree. jq -r 'select .slice=="substantive" | .probe,.total count | @tsv' data/snapshots/2026-11-29.jsonl cursor rules mdc 3840 cursor legacy 2240 copilot instructions 1170 agents md 4500 claude md 3315 In the synthetic data, only 45% of Copilot instruction files clear 1,000 bytes, against 70% of legacy Cursor files. That asymmetry is invented for the demo, but real stub-heavy markers behave the same way. Any slice that moves the ratio by this much is a reason to publish both views. Step 7: Sample hits to convert files into repositories Code search returns at most 1,000 results per query, served 100 per page, so a full crawl is impossible. The sampler pages through the first few hundred hits and stores repository, path pairs. From those pairs, the analysis derives files per repository for the many-files probes and the owner mix for every probe. The sample is biased toward whatever the index ranks first, so treat the derived ratios as estimates. """Page through the first results of each probe and save repo, path pairs.""" import argparse import json import os import sys import time from pathlib import Path from ghclient import AuthError, GitHub def sample probe gh, q, max pages, per page=100, pause=7.0 : pairs = for page in range 1, max pages + 1 : data = gh.search code q, per page=per page, page=page batch = data.get "items", pairs += i "repository" "full name" , i "path" for i in batch if len batch < per page or len pairs = data "total count" : break time.sleep pause return pairs def main : ap = argparse.ArgumentParser ap.add argument "--probes", default="probes.json" ap.add argument "--base-url", default="https://api.github.com" ap.add argument "--out", default="data/samples" ap.add argument "--max-pages", type=int, default=3 ap.add argument "--pause", type=float, default=7.0 args = ap.parse args gh = GitHub base url=args.base url, token=os.environ.get "GITHUB TOKEN" config = json.loads Path args.probes .read text out = Path args.out out.mkdir parents=True, exist ok=True try: for probe in config "probes" : pairs = sample probe gh, probe "q" , args.max pages, pause=args.pause out / f"{probe 'id' }.json" .write text json.dumps pairs print f"{probe 'id' :<22}{len pairs : 6} files sampled" except AuthError as e: sys.exit str e if name == " main ": main GITHUB TOKEN=ghp demo python3 sample.py --base-url http://127.0.0.1:8765 --max-pages 3 --pause 0.1 cursor rules mdc 300 files sampled cursor legacy 300 files sampled copilot instructions 300 files sampled agents md 300 files sampled claude md 300 files sampled Steps 8 and 9: Estimates, Bounds and Bulk Owners Step 8: Write the analysis module Four ideas live in analysis.py. First, files per repository converts a many-files marker into a repo estimate. Second, tool bounds handle the fact that one repo may carry two markers for the same tool. The lower bound is the largest single marker, which assumes full overlap. The upper bound is the sum of markers, which assumes none. Third, share bounds combine both tools’ ranges into the widest honest interval for Cursor’s slice of the pair. Fourth, owner concentration and bulk adjustment catch templates. """Turn counts and samples into repo estimates, bounds and drift flags.""" from collections import Counter def files per repo pairs : repos = {repo for repo, in pairs} return len pairs / len repos if repos else 1.0 def owner concentration pairs, top=10 : owners = Counter repo.split "/" 0 for repo, in pairs total = sum owners.values if not total: return 0.0, leaders = owners.most common top return sum n for , n in leaders / total, o for o, in leaders def bulk owners pairs, threshold=0.05 : """Owners that hold more than threshold of the sampled files.""" owners = Counter repo.split "/" 0 for repo, in pairs total = sum owners.values return {o for o, n in owners.items if total and n / total threshold} def repo estimate total count, pairs, unit : if unit == "one file per repo" or not pairs: return float total count return total count / files per repo pairs def adjust for bulk estimate, pairs : """Remove the sampled share held by bulk owners rough, sample-based .""" if not pairs: return estimate bulk = bulk owners pairs share = sum 1 for repo, in pairs if repo.split "/" 0 in bulk / len pairs return estimate 1 - share def tool bounds estimates : """Lower bound: biggest single marker. Upper bound: markers summed no overlap .""" if not estimates: return 0.0, 0.0 return max estimates , sum estimates def share bounds a, b : """Range for A / A + B when each side only has lo, hi repo bounds.""" a lo, a hi , b lo, b hi = a, b low = a lo / a lo + b hi if a lo + b hi else 0.0 high = a hi / a hi + b lo if a hi + b lo else 0.0 return low, high def compare snapshots old, new, shock=0.4 : """Per probe, slice change between two snapshots, flagged when it jumps.""" index = { r "probe" , r "slice" : r for r in old} out = for r in new: prev = index.get r "probe" , r "slice" if not prev or not prev "total count" : continue change = r "total count" - prev "total count" / prev "total count" out.append {"probe": r "probe" , "slice": r "slice" , "old": prev "total count" , "new": r "total count" , "change": change, "shock": abs change shock} return out Bounds are not confidence intervals. They say what the data allows, not how likely each value is. If you want a probabilistic range instead, feed the repo counts into the Bayesian beta-binomial model https://shattered.io/cursor-vs-copilot-share-bayesian-beta-binomial-pooling-12-steps-2026/ and compare. The two approaches answer different questions, and agreement between them is reassuring. Step 9: Flag and remove bulk owners Bulk committers distort footprints more than sampling noise does. Some accounts generate hundreds of near-identical repositories, each with the same instructions file. The kit flags any owner holding more than 5% of the sampled files and removes that sampled share from the estimate. The adjustment is rough because it assumes the sample mirrors the full result set, so report it next to the raw figure, never instead of it. python python3 - <<'EOF' import json, analysis as an pairs = json.load open 'data/samples/copilot instructions.json' share, leaders = an.owner concentration pairs print 'sampled files:', len pairs print 'top-10 owner share: %.1f%%' % share 100 print 'bulk owners:', sorted an.bulk owners pairs print 'estimate 2600 - adjusted %.0f' % an.adjust for bulk 2600.0, pairs EOF sampled files: 300 top-10 owner share: 28.0% bulk owners: 'template-factory' estimate 2600 - adjusted 1950 One synthetic account, template-factory, holds a quarter of the sampled Copilot files. Strip it out and the estimate drops sharply. In a real run, look at the flagged account by hand before you trust the adjustment. Sometimes a prolific owner is a legitimate open-source organization with many real projects. Steps 10 and 11: Report and Drift Check Step 10: Render the report The report reads the newest snapshot and all samples, then prints a markdown table per slice with the raw estimate and the bulk-adjusted one. It ends with the Cursor share of the Cursor-plus-Copilot pair as a range, and a concentration section that prints FLAG when the top ten owners hold more than a quarter of the sampled files. python """Read the newest snapshot and samples, print a markdown report.""" import argparse import json from pathlib import Path import analysis as an def latest rows snap dir : files = sorted Path snap dir .glob " .jsonl" if not files: raise SystemExit "no snapshots yet: run collect.py first" rows = json.loads line for line in files -1 .read text .splitlines if line last ts = max r "ts" for r in rows return r for r in rows if r "ts" == last ts def load samples sample dir : return {p.stem: json.loads p.read text for p in Path sample dir .glob " .json" } def build rows, samples, sl="all" : est = {} for r in rows: if r "slice" = sl: continue pairs = samples.get r "probe" , repos = an.repo estimate r "total count" , pairs, r "unit" est r "probe" = {"tool": r "tool" , "files": r "total count" , "repos": repos, "adjusted": an.adjust for bulk repos, pairs , "incomplete": r "incomplete" } return est def tool range est, tool, key : vals = v key for v in est.values if v "tool" == tool return an.tool bounds vals def render rows, samples : lines = " Public repo footprint", "" for sl in "all", "substantive" : est = build rows, samples, sl lines += f" Slice: {sl}", "", "| Probe | Tool | Files | Est. repos | Bulk-adjusted |", "|---|---|---:|---:|---:|" for pid, v in est.items : lines.append f"| {pid} | {v 'tool' } | {v 'files' :,} | " f"{v 'repos' :,.0f} | {v 'adjusted' :,.0f} |" for key, label in "repos", "raw" , "adjusted", "bulk-adjusted" : cur, cop = tool range est, "cursor", key , tool range est, "copilot", key lo, hi = an.share bounds cur, cop lines.append "" lines.append f"Cursor share of Cursor+Copilot markers {label} : " f"{lo:.1%} to {hi:.1%}" lines.append "" lines += " Concentration top-10 owners, share of sampled files ", "" for pid, pairs in samples.items : share, leaders = an.owner concentration pairs flag = "FLAG" if share 0.25 else "ok" lines.append f"- {pid}: {share:.1%} {flag} bulk owners: " f"{', '.join sorted an.bulk owners pairs or 'none'} " return "\n".join lines def main : ap = argparse.ArgumentParser ap.add argument "--snapshots", default="data/snapshots" ap.add argument "--samples", default="data/samples" args = ap.parse args print render latest rows args.snapshots , load samples args.samples if name == " main ": main python3 report.py Public repo footprint Slice: all | Probe | Tool | Files | Est. repos | Bulk-adjusted | |---|---|---:|---:|---:| | cursor rules mdc | cursor | 4,800 | 1,200 | 1,200 | | cursor legacy | cursor | 3,200 | 3,200 | 2,933 | | copilot instructions | copilot | 2,600 | 2,600 | 1,950 | | agents md | shared | 9,000 | 9,000 | 9,000 | | claude md | claude code | 5,100 | 5,100 | 5,100 | Cursor share of Cursor+Copilot markers raw : 55.2% to 62.9% Cursor share of Cursor+Copilot markers bulk-adjusted : 60.1% to 67.9% Slice: substantive | Probe | Tool | Files | Est. repos | Bulk-adjusted | |---|---|---:|---:|---:| | cursor rules mdc | cursor | 3,840 | 960 | 960 | | cursor legacy | cursor | 2,240 | 2,240 | 2,053 | | copilot instructions | copilot | 1,170 | 1,170 | 878 | | agents md | shared | 4,500 | 4,500 | 4,500 | | claude md | claude code | 3,315 | 3,315 | 3,315 | Cursor share of Cursor+Copilot markers raw : 65.7% to 73.2% Cursor share of Cursor+Copilot markers bulk-adjusted : 70.1% to 77.4% Concentration top-10 owners, share of sampled files - agents md: 3.3% ok bulk owners: none - cursor legacy: 11.3% ok bulk owners: template-factory - cursor rules mdc: 13.3% ok bulk owners: none - claude md: 3.3% ok bulk owners: none - copilot instructions: 28.0% FLAG bulk owners: template-factory Read the ranges as a pair. Under the all-files slice, Cursor holds one range of the combined markers. Remove bulk owners and the range moves. Switch to the substantive slice and it moves again. A large swing from filters alone is the finding. It tells you that the choice of definition matters more than any sampling error, which is also the lesson from survey denominators. Step 11: Compare snapshots to catch index shocks Weekly snapshots turn a single reading into a trend, and they expose index changes. If a probe’s count falls by more than 40% in a week, the cause is rarely developers deleting files. More often GitHub re-indexed, changed a qualifier’s behavior, or rate-limited you into a partial result. The compare script prints each probe’s change and tags the big ones. """Compare two snapshot files and flag jumps that look like index changes.""" import argparse import json from pathlib import Path import analysis as an def load path : rows = json.loads l for l in Path path .read text .splitlines if l last = max r "ts" for r in rows return r for r in rows if r "ts" == last def main : ap = argparse.ArgumentParser ap.add argument "old" ap.add argument "new" ap.add argument "--shock", type=float, default=0.4 a = ap.parse args for r in an.compare snapshots load a.old , load a.new , a.shock : tag = "SHOCK" if r "shock" else "ok" print f"{r 'probe' :<22}{r 'slice' :<12}{r 'old' : 7} - {r 'new' : 7}" f" {r 'change' :+7.1%} {tag}" if name == " main ": main The demo below compares a doctored last-week file against today’s snapshot. I edited the older counts by hand to simulate a re-index, so the SHOCK tag is by design. python3 compare.py data/snapshots/2026-11-22.jsonl data/snapshots/2026-11-29.jsonl php cursor rules mdc all 4400 - 4800 +9.1% ok cursor rules mdc substantive 3500 - 3840 +9.7% ok cursor legacy all 3050 - 3200 +4.9% ok cursor legacy substantive 2150 - 2240 +4.2% ok copilot instructions all 5800 - 2600 -55.2% SHOCK copilot instructions substantive 2600 - 1170 -55.0% SHOCK agents md all 7600 - 9000 +18.4% ok agents md substantive 3800 - 4500 +18.4% ok claude md all 4900 - 5100 +4.1% ok claude md substantive 3200 - 3315 +3.6% ok Step 12: Tests, Mock Server and Scheduling Tests matter here because the failure modes are quiet. A wrong denominator still prints a plausible percentage. The ten tests pin the arithmetic, the retry behavior, the cache, the auth error and the 1,000-result cap. They run against a small local server that mimics GitHub’s code search response shape, including the 401, a secondary rate limit, a 502 and the 422 returned past page ten. """Offline stand-in for GitHub code search. All numbers are synthetic.""" import argparse import json import threading from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer from urllib.parse import parse qs, urlparse marker - name, synthetic total, files per repo, 1-in-N repos owned by one bulk account, fraction of files over 1,000 bytes KINDS = { ".cursor/rules": "cursor rules mdc", 4800, 4.0, 0, 0.80 , ".cursorrules": "cursor legacy", 3200, 1.0, 12, 0.70 , "copilot-instructions": "copilot instructions", 2600, 1.0, 4, 0.45 , "AGENTS.md": "agents md", 9000, 1.0, 0, 0.50 , "CLAUDE.md": "claude md", 5100, 1.0, 0, 0.65 , } def kind for q : for marker, spec in KINDS.items : if marker in q: return spec return None def make items spec, total, start, count : name, , fpr, bulk, = spec items = for i in range start, min start + count, total, 1000 : repo idx = int i / fpr owner = "template-factory" if bulk and repo idx % bulk == 0 else f"dev{repo idx % 480}" items.append {"path": f"{name}/{i}.md", "repository": {"full name": f"{owner}/{name}-{repo idx}"}} return items class Handler BaseHTTPRequestHandler : calls = 0 flaky = False lock = threading.Lock def log message self, a : pass def send self, code, body, headers=None : raw = json.dumps body .encode self.send response code self.send header "Content-Type", "application/json" self.send header "Content-Length", str len raw for k, v in headers or {} .items : self.send header k, v self.end headers self.wfile.write raw def do GET self : url = urlparse self.path qs = parse qs url.query with Handler.lock: Handler.calls += 1 n = Handler.calls if url.path = "/search/code": return self. send 404, {"message": "Not Found"} if not self.headers.get "Authorization" : return self. send 401, {"message": "Requires authentication"} if Handler.flaky and n == 3: return self. send 403, {"message": "You have exceeded a secondary rate limit."}, {"Retry-After": "1"} if Handler.flaky and n == 5: return self. send 502, {"message": "Bad Gateway"} q = qs "q" 0 per page = int qs.get "per page", "30" 0 page = int qs.get "page", "1" 0 spec = kind for q if not spec: return self. send 200, {"total count": 0, "incomplete results": False, "items": } total = spec 1 if "size: 1000" in q: total = int total spec 4 start = page - 1 per page if start = 1000: return self. send 422, {"message": "Only the first 1000 search results are available"} self. send 200, {"total count": total, "incomplete results": False, "items": make items spec, total, start, per page } def serve port=8765, flaky=False : Handler.flaky = flaky Handler.calls = 0 server = ThreadingHTTPServer "127.0.0.1", port , Handler return server if name == " main ": ap = argparse.ArgumentParser ap.add argument "--port", type=int, default=8765 ap.add argument "--flaky", action="store true" a = ap.parse args s = serve a.port, a.flaky print f"mock GitHub on http://127.0.0.1:{a.port} synthetic data " s.serve forever python import sys import threading from pathlib import Path import pytest sys.path.insert 0, str Path file .resolve .parents 1 import mock github noqa: E402 @pytest.fixture def server : srv = mock github.serve port=0, flaky=False t = threading.Thread target=srv.serve forever, daemon=True t.start yield f"http://127.0.0.1:{srv.server address 1 }" srv.shutdown python import analysis as an def test files per repo : pairs = "a/x", "1" , "a/x", "2" , "b/y", "1" , "b/y", "2" assert an.files per repo pairs == 2.0 def test repo estimate many files : pairs = "a/x", "1" , "a/x", "2" assert an.repo estimate 1000, pairs, "many files per repo" == 500.0 assert an.repo estimate 1000, pairs, "one file per repo" == 1000.0 def test bounds use max and sum : assert an.tool bounds 3200, 1200 == 3200, 4400 def test share bounds order : low, high = an.share bounds 3000, 4000 , 2000, 2500 assert low < high assert round low, 3 == round 3000 / 5500, 3 assert round high, 3 == round 4000 / 6000, 3 def test concentration flags bulk owner : pairs = "factory/r%d" % i, "p" for i in range 30 + "u%d/r" % i, "p" for i in range 70 share, leaders = an.owner concentration pairs, top=1 assert share == 0.30 and leaders == "factory" assert an.bulk owners pairs == {"factory"} assert an.adjust for bulk 1000, pairs == 700.0 def test snapshot shock flag : old = {"probe": "a", "slice": "all", "total count": 1000} new = {"probe": "a", "slice": "all", "total count": 400} out = an.compare snapshots old, new assert out 0 "shock" is True and round out 0 "change" , 2 == -0.60 python import pytest from ghclient import AuthError, GitHub import mock github def test requires token server, tmp path : gh = GitHub base url=server, token=None, cache dir=tmp path with pytest.raises AuthError : gh.search code "filename:AGENTS.md" def test count and cache server, tmp path : gh = GitHub base url=server, token="x", cache dir=tmp path first = gh.search code "filename:CLAUDE.md" again = gh.search code "filename:CLAUDE.md" assert first "total count" == 5100 == again "total count" assert gh.requests made == 1 def test retries rate limit and 5xx tmp path : srv = mock github.serve port=0, flaky=True import threading threading.Thread target=srv.serve forever, daemon=True .start waits = gh = GitHub base url=f"http://127.0.0.1:{srv.server address 1 }", token="x", cache dir=tmp path, sleep=waits.append for q in "filename:AGENTS.md", "filename:CLAUDE.md", ".cursorrules", "copilot-instructions" : assert gh.search code q "total count" 0 srv.shutdown assert 1 in waits def test page cap raises 422 server, tmp path : import urllib.error gh = GitHub base url=server, token="x", cache dir=tmp path with pytest.raises urllib.error.HTTPError as e: gh.search code "filename:AGENTS.md", per page=100, page=11 assert e.value.code == 422 python3 -m pytest -v tests/test analysis.py::test files per repo PASSED tests/test analysis.py::test repo estimate many files PASSED tests/test analysis.py::test bounds use max and sum PASSED tests/test analysis.py::test share bounds order PASSED tests/test analysis.py::test concentration flags bulk owner PASSED tests/test analysis.py::test snapshot shock flag PASSED tests/test client.py::test requires token PASSED tests/test client.py::test count and cache PASSED tests/test client.py::test retries rate limit and 5xx PASSED tests/test client.py::test page cap raises 422 PASSED ============================== 10 passed in 2.09s ============================== Finally, schedule the collector. A weekly cron entry is enough, since the search index does not move fast enough to justify daily runs. Keep the snapshot directory under version control or back it up. Those JSONL files are the only record of what the index said on a given day, and you cannot recreate them later. 17 6 1 cd /srv/footprint && . .venv/bin/activate && GITHUB TOKEN=ghp your token here ./run all.sh data/cron.log 2 &1 Reading the Footprint Against the 2026 Survey Numbers Put the footprint next to the survey and the disagreement teaches you something. Suppose the survey puts Cursor at well under half of the Copilot figure, as the Stackness recount reportedly does 26.6% against 61.3% , while your footprint says Cursor holds more than half of the marker files. That gap does not mean one source lies. A plausible reading is that Cursor users commit configuration more often, while a large share of Copilot use leaves no repository trace because it happens in private enterprise code. Price floors help explain who leaves a trace. Copilot’s plan lineup includes Free, Student, Pro, Pro+, Max, Business and Enterprise tiers. According to GitHub’s plan documentation https://docs.github.com/en/copilot/get-started/plans?ref=vanja.io , Pro+ costs $39 a month and Max costs $100 a month. Cursor’s current lineup runs from Free through Plus at $8 a month to Ultra at $200. For a side-by-side of limits and usage rules, see the Claude Code vs Cursor vs Copilot pricing comparison https://shattered.io/claude-code-vs-cursor-vs-github-copilot-pricing-limits-2026/ . | Plan | Monthly price | Footprint implication | |---|---|---| | Cursor Plus | $8 | Low entry price, so casual users can configure rules | | Cursor Premium | $30 | Listed as the most popular tier, likely where heavy rules use happens | | Cursor Ultra | $200 | Power users, few in number, many files per repo | | Copilot Pro+ | $39 | Individual power users, but instructions files are optional | | Copilot Max | $100 | Heavy users, same optional-file caveat | Product churn adds another blind spot. GitHub’s changelog reports that Gemini 4 Neon became generally available in Copilot on November 18, 2026 https://github.blog/changelog/type/new-releases/page/2/ , following other model additions earlier that month. Switching models changes nothing in a repository, so a footprint cannot see it. The same applies to a developer who moves from one tool to another without touching a config file. The footprint lags real behavior, and sometimes by months. According to Stackness, the 2025 coding-tool list was shown only to people who use AI agents, so the two editions are not directly comparable. Stack Overflow’s 2025 results post https://stackoverflow.blog/2025/12/29/developers-remain-willing-but-reluctant-to-use-ai-the-2025-developer-survey-results-are-here is worth reading for how it frames adoption. To reconcile the editions properly, look at the survey reweighting tutorial https://shattered.io/cursor-vs-copilot-survey-raking-reweight-python-12-steps-2026/ , which rebuilds a like-for-like base. Common Pitfalls When Measuring Cursor vs GitHub Copilot Market Share Seven mistakes account for most bad footprints. Each one produces a clean number that looks fine in a chart. - Counting files as repositories. A Cursor rules directory can hold many .mdc files. Always convert with files per repo, or choose single-file markers for a like-for-like comparison. - Assigning AGENTS.md to a tool. More than one tool reads the file, so it measures agent-config adoption in general. Keep it in the report as context and exclude it from the Cursor-versus-Copilot ratio. - Ignoring bulk committers. One account with hundreds of template repos can shift a ratio by several points. Run the concentration check on every probe, every time. - Treating total count as exact. GitHub’s search counts can be approximate, and incomplete results can be true. Store the flag in each snapshot row and rerun when it fires. - Mixing marker ages. A legacy format fades while its replacement grows, so summing both without care double-counts migrating repos. The lower and upper bounds exist for this reason, and the Copilot-to-Cursor rules migration guide https://shattered.io/cursor-rules-migrate-github-copilot-2026/ explains how instructions move between the two tools. - Forgetting the public-only limit. Enterprise teams rarely commit rules to public repos. A footprint says nothing about them, which is a large blind spot given the vendor claims about enterprise reach. - Publishing one number. A single percentage hides the filter choices behind it. Publish the range, the slice, the snapshot date and the query strings together. A footprint also cannot tell you which tool is better. If that is your real question, run the Cursor vs Copilot benchmark https://shattered.io/benchmark-cursor-vs-github-copilot-2026/ on your own repositories instead of inferring quality from popularity. Troubleshooting: 10 Failures and Their Fixes - HTTP 401, Requires authentication . Code search rejects anonymous calls. Export GITHUB TOKEN in the same shell that runs the script, and confirm with the rate limit curl from Step 3. - HTTP 403 with a rate-limit message. You hit a primary or secondary limit. The client honors Retry-After, but if it keeps firing, raise –pause to 10 seconds or more and run fewer probes per hour. - HTTP 422, Only the first 1000 search results are available . You asked for a page past the cap. Keep –max-pages at 10 or below, and split large probes with size ranges to reach deeper. - total count is 0 for a file you know exists. The qualifier syntax probably missed. Try the filename alone, then add path: back, and check that the repo is public and not archived out of the index. - incomplete results is true. The search timed out server-side and returned a partial set. Wait a few minutes, delete the cached response, and rerun that probe. - Counts jump by half overnight. Run compare.py. A SHOCK tag across several unrelated probes points to an index change, not real behavior. Do not publish that week’s reading. - The report shows yesterday’s numbers. The 6-hour response cache served old data. Delete data/cache, or lower the ttl argument when you build the client. - SSL: CERTIFICATE VERIFY FAILED. Python cannot find your CA bundle, which is common on freshly installed macOS builds and behind corporate proxies. Point SSL CERT FILE at your bundle rather than disabling verification. - The no snapshots yet message from report.py. The report looks for JSONL files under data/snapshots. Run collect.py first, and check that you ran it from the project root. - Tests fail with an address-already-in-use error. A hand-started mock server holds port 8765. Stop it, because the tests bind to a random free port and do not need it. Advanced Tips for a Sharper Footprint - Fingerprint file contents. Fetch a sample of raw files and hash them. If 40% of a probe’s sampled files share a handful of hashes, you are counting template copies, and no owner-based filter would have caught it. - Slice by file size ranges. Queries such as size:100..500 and size:500..2000 return separate result sets, each with its own 1,000-result cap. Sum several slices to reach deeper than a single query allows. - Scope to one organization. Add org:yourcompany to a probe and run it with a token that can see private repositories. You get an internal footprint that shows which teams configured which tool, with no survey required. - Compute a configuration-intensity ratio. Divide each tool’s footprint share by its survey share. A ratio above 1 means users of that tool commit configuration more often than the survey headcount predicts. - Check claims alongside counts. Pair the footprint with the share-claim linter https://shattered.io/cursor-vs-copilot-share-claim-linter-python-12-steps-2026/ so every public percentage you cite carries its denominator and date. - Respect the platform. Use the REST API as documented, keep your pauses, and never scrape the HTML search pages. For wider context on developer tooling, browse the coding tools section https://shattered.io/category/software/ . The Complete Project, Layout and One-Command Run Copy the files from Steps 2 to 12 into this layout. The runner script below wires collect, sample and report together. footprint/ probes.json ghclient.py collect.py sample.py analysis.py report.py compare.py mock github.py run all.sh requirements.txt tests/ conftest.py test analysis.py test client.py data/ snapshots/ JSONL, one file per day samples/ one JSON per probe cache/ HTTP responses bash /bin/sh One command: count, sample, report. Set GITHUB TOKEN first. set -eu BASE="${BASE URL:-https://api.github.com}" python3 collect.py --base-url "$BASE" python3 sample.py --base-url "$BASE" --max-pages 3 python3 report.py data/report.md cat data/report.md To rehearse offline, start the mock with python3 mock github.py in one terminal, set BASE URL to the local address the mock serves on and a dummy token, then run ./run all.sh. To go live, drop BASE URL and use a real token. In both modes, run python3 -m pytest first. A green suite confirms the arithmetic before you trust any percentage. FAQ: Cursor vs Copilot Repo Footprint Is a repo footprint the same as market share? No. It counts public repositories that contain a configuration file, which is a narrow behavioral signal. It ignores private code, free users who skip configuration, and anyone who uses a tool without committing a file. Treat it as one lens next to surveys and seat data. Can I run the kit without a token? No. GitHub’s code search returns HTTP 401 with the message Requires authentication for anonymous requests. A token with no scopes is enough for public data. Why include AGENTS.md if it belongs to neither tool? It shows how much agent configuration exists overall, which gives the tool-specific markers a baseline. Excluding it from the Cursor-versus-Copilot ratio keeps the comparison clean. How often should I take a snapshot? Weekly is plenty. The index moves slowly, and more frequent runs mostly spend quota. Keep every snapshot so you can spot index changes later. Why do the survey and the footprint disagree? They count different things. A survey counts people who chose to answer and tick a box, and a footprint counts repositories where someone committed a file. Configuration habits differ by tool, plan and company, so the ratios should differ. How wide should I expect the range to be? Wide enough to be uncomfortable. In the synthetic demo, filters alone moved Cursor’s share by about ten points. A real range depends on your probes, slices and bulk-owner handling, so publish all three alongside the numbers. Does this work for private repositories? Yes, with a token that can read them. Add an org qualifier to scope the search to your own company, and you get an internal view of which teams configured Cursor or Copilot. What is the best next step after building this? Run it weekly for a month, then compare the trend against your internal seat data. Agreement between independent signals is worth far more than any single percentage.