
Github Trending
Pull GitHub trending repositories and developers into apps or agents when there is no official trending API.
Install
npx skills add https://github.com/hoodini/ai-agents-skills --skill github-trendingWhat is this skill?
- Documents that GitHub has no official trending API—scrape or Search API alternatives
- Cheerio-based scrape pattern for github.com/trending with language and since filters
- Typed TrendingRepo shape: stars, forks, starsToday, language metadata
- Triggers on GitHub trending, trending repos, popular repositories, GitHub discover
Adoption & trust: 2.9k installs on skills.sh; 222 GitHub stars; 2/3 security scanners passed (skills.sh audits); trending (+100% hot-view momentum).
Recommended Skills
Agent Browservercel-labs/agent-browser
Lark Imlarksuite/cli
Lark Calendarlarksuite/cli
Lark Sheetslarksuite/cli
Lark Vclarksuite/cli
Lark Contactlarksuite/cli
Journey fit
Primary fit
Idea discover is the canonical shelf because the primary trigger is finding what is hot on GitHub before choosing what to build or fork. Discover fits open-ended exploration of trending repos, languages, and time windows rather than deep competitor teardown.
Common Questions / FAQ
Is Github Trending safe to install?
skills.sh reports 2 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.
SKILL.md
READMESKILL.md - Github Trending
# GitHub Trending Data Access GitHub trending repositories and developers data. ## Important Note **GitHub does NOT provide an official trending API.** The trending page at `github.com/trending` must be scraped directly or use the GitHub Search API as an alternative. ## Approach 1: Direct Web Scraping (Recommended) Scrape `github.com/trending` directly using Cheerio: ```typescript import * as cheerio from 'cheerio'; interface TrendingRepo { owner: string; name: string; fullName: string; url: string; description: string; language: string; languageColor: string; stars: number; forks: number; starsToday: number; } async function scrapeTrending(options: { language?: string; since?: 'daily' | 'weekly' | 'monthly'; } = {}): Promise<TrendingRepo[]> { // Build URL: github.com/trending or github.com/trending/typescript?since=weekly let url = 'https://github.com/trending'; if (options.language) { url += `/${encodeURIComponent(options.language)}`; } if (options.since) { url += `?since=${options.since}`; } const response = await fetch(url, { headers: { 'User-Agent': 'Mozilla/5.0 (compatible; TrendingBot/1.0)', }, }); if (!response.ok) { throw new Error(`Failed to fetch trending: ${response.status}`); } const html = await response.text(); const $ = cheerio.load(html); const repos: TrendingRepo[] = []; // Each trending repo is in an article.Box-row element $('article.Box-row').each((_, element) => { const $el = $(element); // Get repo link (e.g., /owner/repo) const repoLink = $el.find('h2 a').attr('href')?.trim() || ''; const [, owner, name] = repoLink.split('/'); // Get description const description = $el.find('p.col-9').text().trim(); // Get language const language = $el.find('[itemprop="programmingLanguage"]').text().trim(); // Get language color from the colored dot const langColorStyle = $el.find('.repo-language-color').attr('style') || ''; const langColorMatch = langColorStyle.match(/background-color:\s*([^;]+)/); const languageColor = langColorMatch ? langColorMatch[1].trim() : ''; // Get stars (total) const starsText = $el.find('a[href$="/stargazers"]').text().trim(); const stars = parseNumber(starsText); // Get forks const forksText = $el.find('a[href$="/forks"]').text().trim(); const forks = parseNumber(forksText); // Get stars today/this week/this month const starsTodayText = $el.find('.float-sm-right, .d-inline-block.float-sm-right').text().trim(); const starsToday = parseNumber(starsTodayText); if (owner && name) { repos.push({ owner, name, fullName: `${owner}/${name}`, url: `https://github.com${repoLink}`, description, language, languageColor, stars, forks, starsToday, }); } }); return repos; } function parseNumber(text: string): number { const clean = text.replace(/,/g, '').trim(); if (clean.includes('k')) { return Math.round(parseFloat(clean) * 1000); } return parseInt(clean) || 0; } ``` ## Approach 2: GitHub Search API (Official Alternative) Use GitHub's Search API to find recently created repos with high stars: ```typescript interface GitHubSearchResult { total_count: number; items: GitHubRepo[]; } interface GitHubRepo { full_name: string; html_url: string; description: string; language: string; stargazers_count: number; forks_count: number; created_at: string; } async function getTrendingViaSearch(options: { language?: string; days?: number; minStars?: number; } = {}): Pro