Codebase Recon
Exclusively by VRIL LABS
Ultra-dense, full-spectrum codebase reconnaissance that chains together every major and emerging code repository platform. Systematically discovers, evaluates, and documents the highest-signal reference codebases into a dedicated REFERENCE_REPOS.md corpus—accelerating development by surfacing battle-tested patterns, canonical implementations, and edge-case solutions before a single line of new code is written.
When to Use
- User needs reference implementations before beginning a complex feature or system
- Current task involves a technology, pattern, or API the agent is less familiar with
- User asks to "find examples of", "look up how others have done", or "research existing codebases"
- Building a new module and canonical open-source patterns would accelerate or de-risk the work
- User asks to "build a reference corpus", "scout similar projects", or "document reference repos"
- Starting a new project where analogous open-source projects serve as architectural north stars
- Security review where studying hardened implementations improves assurance
- Debugging a subtle issue that may already have known solutions in the wild
Process
Phase 1 — Define Reconnaissance Scope
Extract the reconnaissance brief from the current task context:
- Primary technology/language/framework
- Feature or pattern category (e.g., "rate limiter", "OAuth flow", "distributed lock")
- Quality signals required (stars, recency, test coverage, production use)
- Output fidelity needed (a handful of targeted repos vs. a broad corpus)
Decompose into 3–5 search axes:
- Canonical implementations (official libraries, reference impls)
- Production examples (large deployed codebases using the pattern)
- Edge-case or advanced usage (unusual combinations, performance-critical variants)
- Alternative approaches (different stacks, languages, paradigms)
- Emerging or cutting-edge implementations (recent repositories, research prototypes)
Phase 2 — Primary Repository Platforms (Tier 1)
Search all Tier-1 platforms in parallel. Use free API endpoints where available.
2a. GitHub (github.com)
- Code Search API:
GET https://api.github.com/search/code?q=<query>+language:<lang>
- Repository Search:
GET https://api.github.com/search/repositories?q=<topic>&sort=stars
- Advanced operators:
in:file, filename:, path:, repo:, org:, topic:, language:, stars:>N, pushed:>YYYY-MM-DD
- Semantic code search:
https://github.com/search?type=code (web UI, supports natural language)
- Rate limit: 10 unauthenticated req/min; 30 with token. Cache results between axes.
2b. GitLab (gitlab.com)
- Repository Search:
GET https://gitlab.com/api/v4/search?scope=projects&search=<query>
- Code/Blob Search:
GET https://gitlab.com/api/v4/search?scope=blobs&search=<query>
- Group Search:
GET https://gitlab.com/api/v4/groups/<id>/search?scope=blobs&search=<query>
- Especially valuable for DevSecOps patterns, CI/CD configs, and self-hosted infrastructure.
2c. Bitbucket (bitbucket.org)
- Repository Search:
GET https://api.bitbucket.org/2.0/repositories?q=name~"<query>"
- Strong for Atlassian-ecosystem integrations (Jira, Confluence, Bamboo).
2d. Codeberg (codeberg.org) — Forgejo/Gitea API
- Repository Search:
GET https://codeberg.org/api/v1/repos/search?q=<query>&limit=20
- Code Search:
GET https://codeberg.org/api/v1/repos/search?topic=true&q=<topic>
- Privacy-first, FOSS-only hosting; valuable for permissively licensed reference implementations.
Phase 3 — Cross-Repository Search Engines (Tier 1 Amplifiers)
These engines index millions of repos and dramatically increase throughput.
3a. Sourcegraph (sourcegraph.com)
- GraphQL API:
POST https://sourcegraph.com/.api/graphql
- Query syntax:
<pattern> lang:<language> repo:github.com/<org>/.*
- Structural search:
comby:... patterns for AST-aware matching
- Cross-repo intelligence: symbol definitions, references, call graphs
- Free for public code. No API key required for read-only public search.
3b. searchcode.com
- Search API:
GET https://searchcode.com/api/search/?q=<query>&lan=<language_id>
- Code Result API:
GET https://searchcode.com/api/result/<result_id>/
- Indexes 90B+ lines of code across GitHub, GitLab, Bitbucket, Google Code, Codeplex.
- Explicitly designed for LLM/agent consumption. Free for public code.
3c. grep.app
- Web:
https://grep.app/search?q=<query>&filter[lang][0]=<Language>
- Searches 1M+ public GitHub repos with instant regex and string matching.
- No official API; use as a verification and discovery web interface.
3d. Libraries.io
- Search API:
GET https://libraries.io/api/search?q=<query>&platforms=<platform>&api_key=<key>
- Project API:
GET https://libraries.io/api/<platform>/<package>?api_key=<key>
- Indexes 11M+ packages across 30+ ecosystems. Free tier: 60 req/min.
- Use to discover the most-depended-upon packages for a given domain.
Phase 4 — Niche and Specialized Platforms (Tier 2)
Search selectively based on task context.
4a. SourceForge (sourceforge.net)
- Project Search API:
GET https://sourceforge.net/api/project/get/?q=<query>&limit=20&api_key=<key>
- Legacy but valuable: enormous catalog of C/C++, Java, and Python projects predating GitHub.
- Ideal for: embedded systems, audio DSP, scientific computing, legacy protocol implementations.
4b. Gitea (gitea.com / gitea.io)
- API:
GET https://gitea.com/api/v1/repos/search?q=<query>&limit=20
- Growing ecosystem of self-hosted instances with public APIs at their own domains.
4c. SourceHut / sr.ht (sr.ht)
- API:
https://meta.sr.ht/api/ with per-service endpoints (git.sr.ht, builds.sr.ht)
- Preferred by hacker/minimalist community; email-patch workflow; unique Mercurial repos.
4d. Pagure (pagure.io)
- API:
GET https://pagure.io/api/0/projects?pattern=<query>
- Fedora ecosystem: RPM packaging, kernel modules, system software.
4e. Gitee (gitee.com)
- API:
GET https://gitee.com/api/v5/search/repositories?q=<query>&access_token=<token>
- Essential for Chinese open-source ecosystem, large-scale system software, and Go/Java projects.
4f. Phorge / Phabricator instances
- Conduit API:
POST https://<instance>/api/diffusion.repository.search
- Used by large organizations (Mozilla, Wikimedia, Facebook legacy). High-quality codebases.
4g. Gerrit instances (android.googlesource.com, chromium.googlesource.com)
- REST API:
GET https://<gerrit-host>/r/projects/?d&type=CODE
- Code Search:
GET https://cs.android.com/ (Android code search)
- Authoritative for Android/Chrome/AOSP patterns.
4h. Apache Allura (forge-allura.apache.org)
- REST API:
GET https://forge-allura.apache.org/rest/p/<project>/
- Apache Software Foundation projects. Authoritative for Java middleware, distributed systems.
4i. GNU Savannah (savannah.gnu.org)
- Browse:
https://savannah.gnu.org/search/?type_of_search=soft&Search=<query>
- GNU/FSF canonical implementations. Especially valuable for C, POSIX, and system libraries.
4j. Notabug (notabug.org) — Gogs API
GET https://notabug.org/api/v1/repos/search?q=<query>
- Privacy-focused FOSS projects.
4k. Launchpad (launchpad.net)
- API:
GET https://api.launchpad.net/1.0/projects?ws.op=searchProjects&text=<query>
- Ubuntu/Canonical ecosystem: daemons, packaging, snap packages, system init.
4l. Radicle (radicle.xyz)
- HTTP API:
GET https://seed.radicle.xyz/api/v1/repos
- Decentralized/P2P code. Leading edge of sovereign, censorship-resistant development.
Phase 5 — Package Registry Code Discovery (Tier 2 Amplifiers)
Pivot from repositories to packages for implementation-level discovery.
| Registry |
Search Endpoint |
Ecosystem |
| npm |
https://registry.npmjs.org/-/v1/search?text=<query> |
JavaScript/TypeScript |
| npms.io |
https://api.npms.io/v2/search?q=<query> |
JS quality scoring |
| PyPI |
https://pypi.org/pypi/<pkg>/json |
Python |
| crates.io |
https://crates.io/api/v1/crates?q=<query> |
Rust |
| Maven Central |
https://search.maven.org/solrsearch/select?q=<query>&wt=json |
JVM |
| Hex.pm |
https://hex.pm/api/packages?search=<query> |
Elixir/Erlang |
| Pub.dev |
https://pub.dev/api/search?q=<query> |
Dart/Flutter |
| Packagist |
https://packagist.org/search.json?q=<query> |
PHP/Composer |
| RubyGems |
https://rubygems.org/api/v1/search.json?query=<query> |
Ruby |
| NuGet |
https://azuresearch-usnc.nuget.org/query?q=<query> |
.NET |
| Go Modules |
https://pkg.go.dev/search?q=<query> |
Go |
For each top-scoring package: fetch source link → pivot to GitHub/GitLab to inspect full repo.
Phase 6 — Specialized Domain Sources (Tier 3)
Use selectively for niche, academic, or archival tasks.
- Hugging Face Hub:
GET https://huggingface.co/api/models?search=<query> — ML model repos with code
- Papers with Code:
https://paperswithcode.com/api/v1/papers/?q=<query> — Academic implementations
- Software Heritage:
https://archive.softwareheritage.org/api/1/origin/search/<query>/ — Universal source archive
- Zenodo:
GET https://zenodo.org/api/records?q=<query>&type=software — Citable research software
- OpenHub / Open Hub:
GET https://www.openhub.net/projects.xml?query=<query>&api_key=<key> — OSS project analytics
- OSS Insight:
https://ossinsight.io/ — GitHub analytics, trending repos, language stats
Phase 7 — Distro & Ecosystem Forges (Tier 3)
- Debian / Salsa:
https://salsa.debian.org/api/v4/projects?search=<query> — Debian packaging
- Fedora / dist-git:
https://src.fedoraproject.org/api/0/projects?pattern=<query> — Fedora packages
- GNOME GitLab:
https://gitlab.gnome.org/api/v4/projects?search=<query> — GNOME ecosystem
- KDE Invent:
https://invent.kde.org/api/v4/projects?search=<query> — KDE/Qt ecosystem
- freedesktop.org:
https://gitlab.freedesktop.org/api/v4/projects?search=<query> — X11, Wayland, Mesa
- Android AOSP:
https://android.googlesource.com/?format=JSON — Android source tree
- Chromium:
https://chromium.googlesource.com/?format=JSON — Chrome/Chromium
Phase 8 — Evaluate and Triage
For every discovered repository, score it on these signals:
| Signal |
Weight |
Notes |
| Stars / forks |
High |
Proxy for community validation |
| Last commit date |
High |
Staleness kills relevance |
| Test coverage |
High |
Quality indicator |
| Issue/PR activity |
Medium |
Health of community |
| README quality |
Medium |
Documentation density |
| License |
Medium |
Must match project constraints |
| Dependency count |
Low |
Simpler = more portable patterns |
| CI/CD presence |
Low |
Indicates production readiness |
Triage tiers:
- 🟢 Tier 1 Reference — High stars, recent activity, tests, good docs; study in depth
- 🟡 Tier 2 Reference — Moderate signals; scan for specific patterns
- 🔵 Tier 3 Awareness — Notable but dated or narrow; link only
- ⬛ Exclude — Abandoned, toy projects, or redundant with a Tier 1 entry
Phase 9 — Build REFERENCE_REPOS.md
Create or update a REFERENCE_REPOS.md file at the project root (or in the relevant module directory if scoped). Structure:
# Reference Repositories
> Generated by the Codebase Recon skill — VRIL LABS
> Task context: <brief description>
> Generated: <YYYY-MM-DD>
## Tier 1 — Primary References
### <Repo Name>
- **URL**: https://github.com/org/repo
- **Platform**: GitHub
- **Stars**: 12,400 | **Last Commit**: 2025-03-14
- **Language**: TypeScript | **License**: MIT
- **Why relevant**: <1–2 sentence rationale tied to the current task>
- **Key files/patterns to study**:
- `src/core/ratelimiter.ts` — token bucket implementation
- `tests/integration/ratelimiter.test.ts` — edge-case coverage
...
## Tier 2 — Supporting References
...
## Tier 3 — Awareness
...
## Search Queries Used
- GitHub: `rate limiter language:typescript stars:>500`
- Sourcegraph: `TokenBucket lang:typescript repo:github.com/.*`
- searchcode: `token_bucket_rate_limiter language:4`
Phase 10 — Synthesis Note
After building REFERENCE_REPOS.md, write a concise synthesis block at the top of the file (or return inline) covering:
- Dominant implementation approaches observed across repos
- Consensus patterns vs. areas of divergence
- Critical edge cases seen in multiple codebases
- Any surprising or counter-conventional patterns worth noting
Output Format
## Codebase Recon Complete
**Platforms searched:** 8 of 28 applicable
**Repositories evaluated:** 34
**REFERENCE_REPOS.md:** Created / Updated at `./REFERENCE_REPOS.md`
### Synthesis
[3–5 sentences covering dominant patterns, notable divergences, and recommended study order]
### Top 3 Tier-1 References
1. **org/repo** — [one-line rationale]
2. **org/repo** — [one-line rationale]
3. **org/repo** — [one-line rationale]
Full corpus documented in REFERENCE_REPOS.md.
Examples
Example Input
Before I implement a distributed rate limiter for our Node.js API gateway, research how this
has been done across the open-source ecosystem. Build a REFERENCE_REPOS.md for me.
Example Output
## Codebase Recon Complete
**Platforms searched:** 6 (GitHub, GitLab, Sourcegraph, searchcode.com, npm, Libraries.io)
**Repositories evaluated:** 27
**REFERENCE_REPOS.md:** Created at ./REFERENCE_REPOS.md
### Synthesis
Token bucket and sliding window log are the dominant approaches; Redis-backed implementations
account for 70% of production-grade examples. Key divergence: some repos use Lua scripts
for atomic Redis operations while others rely on distributed locking. The `node-rate-limiter-flexible`
library is the clear Tier-1 reference with 40+ strategies, Redis/Memcached support, and
1,700+ tests. Study `rate-limiter-flexible` and Cloudflare's `itty-router-extras` for edge
deployment patterns.
### Top 3 Tier-1 References
1. animir/node-rate-limiter-flexible — most comprehensive Node.js rate limiting library, 40+ strategies
2. tj/node-ratelimiter — minimal, Redis-backed; study for simplicity of the core algorithm
3. microlinkhq/limit-it — in-memory, token bucket; excellent test coverage for edge cases
Boundaries
- Always document what was searched (platforms, queries) in the output and in
REFERENCE_REPOS.md for reproducibility.
- Do NOT include repositories with licenses incompatible with the user's project constraints without an explicit warning.
- Do NOT blindly copy code from references — use them to inform design, understand trade-offs, and recognize patterns.
- Do NOT include toy "hello world" or tutorial repos unless the task is explicitly instructional.
- Respect rate limits across all APIs — add delays between bulk requests and cache results within a session.
- If an API requires a key that is unavailable, fall back to the web UI search interface and note the limitation.
- For REFERENCE_REPOS.md: if the file already exists, append a new dated section rather than overwriting.
- Limit
REFERENCE_REPOS.md to ≤30 repos by default; surface the highest-signal subset unless the user requests exhaustive coverage.
1---2name: codebase-recon3description: Ultra-dense, full-spectrum codebase reconnaissance skill exclusively by VRIL LABS. Chains every major and obscure code repository platform and cross-repository search engine—leveraging free APIs wherever available—to systematically discover, evaluate, and document high-signal reference codebases in a dedicated REFERENCE_REPOS.md file, saving development time and elevating output quality on any current task. Invoke when asked to find reference implementations, build a reference corpus, scout existing solutions, discover similar projects, or research how a technology is used across the open-source ecosystem.4---56# Codebase Recon78*Exclusively by VRIL LABS*910Ultra-dense, full-spectrum codebase reconnaissance that chains together every major and emerging code repository platform. Systematically discovers, evaluates, and documents the highest-signal reference codebases into a dedicated `REFERENCE_REPOS.md` corpus—accelerating development by surfacing battle-tested patterns, canonical implementations, and edge-case solutions before a single line of new code is written.1112## When to Use1314- User needs reference implementations before beginning a complex feature or system15- Current task involves a technology, pattern, or API the agent is less familiar with16- User asks to "find examples of", "look up how others have done", or "research existing codebases"17- Building a new module and canonical open-source patterns would accelerate or de-risk the work18- User asks to "build a reference corpus", "scout similar projects", or "document reference repos"19- Starting a new project where analogous open-source projects serve as architectural north stars20- Security review where studying hardened implementations improves assurance21- Debugging a subtle issue that may already have known solutions in the wild2223## Process2425### Phase 1 — Define Reconnaissance Scope26271. **Extract the reconnaissance brief** from the current task context:28 - Primary technology/language/framework29 - Feature or pattern category (e.g., "rate limiter", "OAuth flow", "distributed lock")30 - Quality signals required (stars, recency, test coverage, production use)31 - Output fidelity needed (a handful of targeted repos vs. a broad corpus)32332. **Decompose into 3–5 search axes**:34 - Canonical implementations (official libraries, reference impls)35 - Production examples (large deployed codebases using the pattern)36 - Edge-case or advanced usage (unusual combinations, performance-critical variants)37 - Alternative approaches (different stacks, languages, paradigms)38 - Emerging or cutting-edge implementations (recent repositories, research prototypes)3940### Phase 2 — Primary Repository Platforms (Tier 1)4142Search all Tier-1 platforms in parallel. Use free API endpoints where available.4344#### 2a. GitHub (github.com)45- **Code Search API**: `GET https://api.github.com/search/code?q=<query>+language:<lang>`46- **Repository Search**: `GET https://api.github.com/search/repositories?q=<topic>&sort=stars`47- **Advanced operators**: `in:file`, `filename:`, `path:`, `repo:`, `org:`, `topic:`, `language:`, `stars:>N`, `pushed:>YYYY-MM-DD`48- **Semantic code search**: `https://github.com/search?type=code` (web UI, supports natural language)49- **Rate limit**: 10 unauthenticated req/min; 30 with token. Cache results between axes.5051#### 2b. GitLab (gitlab.com)52- **Repository Search**: `GET https://gitlab.com/api/v4/search?scope=projects&search=<query>`53- **Code/Blob Search**: `GET https://gitlab.com/api/v4/search?scope=blobs&search=<query>`54- **Group Search**: `GET https://gitlab.com/api/v4/groups/<id>/search?scope=blobs&search=<query>`55- Especially valuable for DevSecOps patterns, CI/CD configs, and self-hosted infrastructure.5657#### 2c. Bitbucket (bitbucket.org)58- **Repository Search**: `GET https://api.bitbucket.org/2.0/repositories?q=name~"<query>"`59- Strong for Atlassian-ecosystem integrations (Jira, Confluence, Bamboo).6061#### 2d. Codeberg (codeberg.org) — Forgejo/Gitea API62- **Repository Search**: `GET https://codeberg.org/api/v1/repos/search?q=<query>&limit=20`63- **Code Search**: `GET https://codeberg.org/api/v1/repos/search?topic=true&q=<topic>`64- Privacy-first, FOSS-only hosting; valuable for permissively licensed reference implementations.6566### Phase 3 — Cross-Repository Search Engines (Tier 1 Amplifiers)6768These engines index millions of repos and dramatically increase throughput.6970#### 3a. Sourcegraph (sourcegraph.com)71- **GraphQL API**: `POST https://sourcegraph.com/.api/graphql`72- Query syntax: `<pattern> lang:<language> repo:github.com/<org>/.*`73- Structural search: `comby:...` patterns for AST-aware matching74- Cross-repo intelligence: symbol definitions, references, call graphs75- Free for public code. No API key required for read-only public search.7677#### 3b. searchcode.com78- **Search API**: `GET https://searchcode.com/api/search/?q=<query>&lan=<language_id>`79- **Code Result API**: `GET https://searchcode.com/api/result/<result_id>/`80- Indexes 90B+ lines of code across GitHub, GitLab, Bitbucket, Google Code, Codeplex.81- Explicitly designed for LLM/agent consumption. Free for public code.8283#### 3c. grep.app84- **Web**: `https://grep.app/search?q=<query>&filter[lang][0]=<Language>`85- Searches 1M+ public GitHub repos with instant regex and string matching.86- No official API; use as a verification and discovery web interface.8788#### 3d. Libraries.io89- **Search API**: `GET https://libraries.io/api/search?q=<query>&platforms=<platform>&api_key=<key>`90- **Project API**: `GET https://libraries.io/api/<platform>/<package>?api_key=<key>`91- Indexes 11M+ packages across 30+ ecosystems. Free tier: 60 req/min.92- Use to discover the most-depended-upon packages for a given domain.9394### Phase 4 — Niche and Specialized Platforms (Tier 2)9596Search selectively based on task context.9798#### 4a. SourceForge (sourceforge.net)99- **Project Search API**: `GET https://sourceforge.net/api/project/get/?q=<query>&limit=20&api_key=<key>`100- Legacy but valuable: enormous catalog of C/C++, Java, and Python projects predating GitHub.101- Ideal for: embedded systems, audio DSP, scientific computing, legacy protocol implementations.102103#### 4b. Gitea (gitea.com / gitea.io)104- **API**: `GET https://gitea.com/api/v1/repos/search?q=<query>&limit=20`105- Growing ecosystem of self-hosted instances with public APIs at their own domains.106107#### 4c. SourceHut / sr.ht (sr.ht)108- **API**: `https://meta.sr.ht/api/` with per-service endpoints (git.sr.ht, builds.sr.ht)109- Preferred by hacker/minimalist community; email-patch workflow; unique Mercurial repos.110111#### 4d. Pagure (pagure.io)112- **API**: `GET https://pagure.io/api/0/projects?pattern=<query>`113- Fedora ecosystem: RPM packaging, kernel modules, system software.114115#### 4e. Gitee (gitee.com)116- **API**: `GET https://gitee.com/api/v5/search/repositories?q=<query>&access_token=<token>`117- Essential for Chinese open-source ecosystem, large-scale system software, and Go/Java projects.118119#### 4f. Phorge / Phabricator instances120- **Conduit API**: `POST https://<instance>/api/diffusion.repository.search`121- Used by large organizations (Mozilla, Wikimedia, Facebook legacy). High-quality codebases.122123#### 4g. Gerrit instances (android.googlesource.com, chromium.googlesource.com)124- **REST API**: `GET https://<gerrit-host>/r/projects/?d&type=CODE`125- **Code Search**: `GET https://cs.android.com/` (Android code search)126- Authoritative for Android/Chrome/AOSP patterns.127128#### 4h. Apache Allura (forge-allura.apache.org)129- **REST API**: `GET https://forge-allura.apache.org/rest/p/<project>/`130- Apache Software Foundation projects. Authoritative for Java middleware, distributed systems.131132#### 4i. GNU Savannah (savannah.gnu.org)133- **Browse**: `https://savannah.gnu.org/search/?type_of_search=soft&Search=<query>`134- GNU/FSF canonical implementations. Especially valuable for C, POSIX, and system libraries.135136#### 4j. Notabug (notabug.org) — Gogs API137- `GET https://notabug.org/api/v1/repos/search?q=<query>`138- Privacy-focused FOSS projects.139140#### 4k. Launchpad (launchpad.net)141- **API**: `GET https://api.launchpad.net/1.0/projects?ws.op=searchProjects&text=<query>`142- Ubuntu/Canonical ecosystem: daemons, packaging, snap packages, system init.143144#### 4l. Radicle (radicle.xyz)145- **HTTP API**: `GET https://seed.radicle.xyz/api/v1/repos`146- Decentralized/P2P code. Leading edge of sovereign, censorship-resistant development.147148### Phase 5 — Package Registry Code Discovery (Tier 2 Amplifiers)149150Pivot from repositories to packages for implementation-level discovery.151152| Registry | Search Endpoint | Ecosystem |153|----------|----------------|-----------|154| **npm** | `https://registry.npmjs.org/-/v1/search?text=<query>` | JavaScript/TypeScript |155| **npms.io** | `https://api.npms.io/v2/search?q=<query>` | JS quality scoring |156| **PyPI** | `https://pypi.org/pypi/<pkg>/json` | Python |157| **crates.io** | `https://crates.io/api/v1/crates?q=<query>` | Rust |158| **Maven Central** | `https://search.maven.org/solrsearch/select?q=<query>&wt=json` | JVM |159| **Hex.pm** | `https://hex.pm/api/packages?search=<query>` | Elixir/Erlang |160| **Pub.dev** | `https://pub.dev/api/search?q=<query>` | Dart/Flutter |161| **Packagist** | `https://packagist.org/search.json?q=<query>` | PHP/Composer |162| **RubyGems** | `https://rubygems.org/api/v1/search.json?query=<query>` | Ruby |163| **NuGet** | `https://azuresearch-usnc.nuget.org/query?q=<query>` | .NET |164| **Go Modules** | `https://pkg.go.dev/search?q=<query>` | Go |165166For each top-scoring package: fetch source link → pivot to GitHub/GitLab to inspect full repo.167168### Phase 6 — Specialized Domain Sources (Tier 3)169170Use selectively for niche, academic, or archival tasks.171172- **Hugging Face Hub**: `GET https://huggingface.co/api/models?search=<query>` — ML model repos with code173- **Papers with Code**: `https://paperswithcode.com/api/v1/papers/?q=<query>` — Academic implementations174- **Software Heritage**: `https://archive.softwareheritage.org/api/1/origin/search/<query>/` — Universal source archive175- **Zenodo**: `GET https://zenodo.org/api/records?q=<query>&type=software` — Citable research software176- **OpenHub / Open Hub**: `GET https://www.openhub.net/projects.xml?query=<query>&api_key=<key>` — OSS project analytics177- **OSS Insight**: `https://ossinsight.io/` — GitHub analytics, trending repos, language stats178179### Phase 7 — Distro & Ecosystem Forges (Tier 3)180181- **Debian / Salsa**: `https://salsa.debian.org/api/v4/projects?search=<query>` — Debian packaging182- **Fedora / dist-git**: `https://src.fedoraproject.org/api/0/projects?pattern=<query>` — Fedora packages183- **GNOME GitLab**: `https://gitlab.gnome.org/api/v4/projects?search=<query>` — GNOME ecosystem184- **KDE Invent**: `https://invent.kde.org/api/v4/projects?search=<query>` — KDE/Qt ecosystem185- **freedesktop.org**: `https://gitlab.freedesktop.org/api/v4/projects?search=<query>` — X11, Wayland, Mesa186- **Android AOSP**: `https://android.googlesource.com/?format=JSON` — Android source tree187- **Chromium**: `https://chromium.googlesource.com/?format=JSON` — Chrome/Chromium188189### Phase 8 — Evaluate and Triage190191For every discovered repository, score it on these signals:192193| Signal | Weight | Notes |194|--------|--------|-------|195| Stars / forks | High | Proxy for community validation |196| Last commit date | High | Staleness kills relevance |197| Test coverage | High | Quality indicator |198| Issue/PR activity | Medium | Health of community |199| README quality | Medium | Documentation density |200| License | Medium | Must match project constraints |201| Dependency count | Low | Simpler = more portable patterns |202| CI/CD presence | Low | Indicates production readiness |203204**Triage tiers**:205- 🟢 **Tier 1 Reference** — High stars, recent activity, tests, good docs; study in depth206- 🟡 **Tier 2 Reference** — Moderate signals; scan for specific patterns207- 🔵 **Tier 3 Awareness** — Notable but dated or narrow; link only208- ⬛ **Exclude** — Abandoned, toy projects, or redundant with a Tier 1 entry209210### Phase 9 — Build REFERENCE_REPOS.md211212Create or update a `REFERENCE_REPOS.md` file at the project root (or in the relevant module directory if scoped). Structure:213214```markdown215# Reference Repositories216217> Generated by the Codebase Recon skill — VRIL LABS218> Task context: <brief description>219> Generated: <YYYY-MM-DD>220221## Tier 1 — Primary References222223### <Repo Name>224- **URL**: https://github.com/org/repo225- **Platform**: GitHub226- **Stars**: 12,400 | **Last Commit**: 2025-03-14227- **Language**: TypeScript | **License**: MIT228- **Why relevant**: <1–2 sentence rationale tied to the current task>229- **Key files/patterns to study**:230 - `src/core/ratelimiter.ts` — token bucket implementation231 - `tests/integration/ratelimiter.test.ts` — edge-case coverage232233...234235## Tier 2 — Supporting References236...237238## Tier 3 — Awareness239...240241## Search Queries Used242- GitHub: `rate limiter language:typescript stars:>500`243- Sourcegraph: `TokenBucket lang:typescript repo:github.com/.*`244- searchcode: `token_bucket_rate_limiter language:4`245```246247### Phase 10 — Synthesis Note248249After building `REFERENCE_REPOS.md`, write a concise synthesis block at the top of the file (or return inline) covering:250- Dominant implementation approaches observed across repos251- Consensus patterns vs. areas of divergence252- Critical edge cases seen in multiple codebases253- Any surprising or counter-conventional patterns worth noting254255## Output Format256257```258## Codebase Recon Complete259260**Platforms searched:** 8 of 28 applicable261**Repositories evaluated:** 34262**REFERENCE_REPOS.md:** Created / Updated at `./REFERENCE_REPOS.md`263264### Synthesis265[3–5 sentences covering dominant patterns, notable divergences, and recommended study order]266267### Top 3 Tier-1 References2681. **org/repo** — [one-line rationale]2692. **org/repo** — [one-line rationale]2703. **org/repo** — [one-line rationale]271272Full corpus documented in REFERENCE_REPOS.md.273```274275## Examples276277### Example Input278```279Before I implement a distributed rate limiter for our Node.js API gateway, research how this280has been done across the open-source ecosystem. Build a REFERENCE_REPOS.md for me.281```282283### Example Output284```285## Codebase Recon Complete286287**Platforms searched:** 6 (GitHub, GitLab, Sourcegraph, searchcode.com, npm, Libraries.io)288**Repositories evaluated:** 27289**REFERENCE_REPOS.md:** Created at ./REFERENCE_REPOS.md290291### Synthesis292Token bucket and sliding window log are the dominant approaches; Redis-backed implementations293account for 70% of production-grade examples. Key divergence: some repos use Lua scripts294for atomic Redis operations while others rely on distributed locking. The `node-rate-limiter-flexible`295library is the clear Tier-1 reference with 40+ strategies, Redis/Memcached support, and2961,700+ tests. Study `rate-limiter-flexible` and Cloudflare's `itty-router-extras` for edge297deployment patterns.298299### Top 3 Tier-1 References3001. animir/node-rate-limiter-flexible — most comprehensive Node.js rate limiting library, 40+ strategies3012. tj/node-ratelimiter — minimal, Redis-backed; study for simplicity of the core algorithm3023. microlinkhq/limit-it — in-memory, token bucket; excellent test coverage for edge cases303```304305## Boundaries306307- Always document what was searched (platforms, queries) in the output and in `REFERENCE_REPOS.md` for reproducibility.308- Do NOT include repositories with licenses incompatible with the user's project constraints without an explicit warning.309- Do NOT blindly copy code from references — use them to inform design, understand trade-offs, and recognize patterns.310- Do NOT include toy "hello world" or tutorial repos unless the task is explicitly instructional.311- Respect rate limits across all APIs — add delays between bulk requests and cache results within a session.312- If an API requires a key that is unavailable, fall back to the web UI search interface and note the limitation.313- For REFERENCE_REPOS.md: if the file already exists, append a new dated section rather than overwriting.314- Limit `REFERENCE_REPOS.md` to ≤30 repos by default; surface the highest-signal subset unless the user requests exhaustive coverage.