Fetch GitHub Trending
Fetch and store trending AI/ML repositories from GitHub with deduplication.
When to Use
Use this skill when you need to:
- Discover trending AI/ML tools and libraries
- Find new repositories gaining traction
- Collect repos for tool spotlight sections in digests
Instructions
Step 1: Define Search Topics
Target these GitHub topics for AI/ML repos:
machine-learning
deep-learning
llm
artificial-intelligence
nlp
transformers
computer-vision
Step 2: Build GitHub Search Query
Construct a GitHub search API query:
Query pattern:
topic:machine-learning OR topic:llm language:python stars:>100 pushed:>2026-01-25
Date calculation based on time range:
daily: pushed in last 1 day
weekly: pushed in last 7 days
monthly: pushed in last 30 days
Step 3: Fetch from GitHub API
Use the http_request tool to query GitHub Search API.
API endpoint:
- URL:
https://api.github.com/search/repositories
- Method: GET
- Parameters: q (query), sort (stars), order (desc), per_page (20)
- Headers: Accept: application/vnd.github.v3+json
For each API response:
- Extract: full_name, description, html_url, stargazers_count, forks_count, language, topics
- Parse created_at and pushed_at timestamps
Step 4: Check for Duplicates
For each repository:
Check if already seen:
- Call
memory/check_seen with key=full_name (e.g., "owner/repo"), namespace="news/repos"
- If seen=true, skip this repo
Validate AI relevance:
- Repo must have at least one AI-related topic OR
- Description mentions AI/ML keywords
- Skip repos that don't appear AI-related
Step 5: Store New Repositories
For each new (unseen) repository:
Store in memory:
- Call
memory/add with:
- type: "document"
- namespace: "news/repos"
- data: {full_name, name, description, url, stars, forks, language, topics, created_at, pushed_at}
- metadata: {fetched_at, search_topic}
Mark as seen:
- Call
memory/mark_seen with:
- key: full_name
- namespace: "news/repos"
- ttl_seconds: 604800 (7 days)
Step 6: Return Results
Return a summary including:
- Number of repos stored
- Number of duplicates skipped
- Topics searched
- Total matching repos found
Tool Usage Guidance
http_request tool
- Use for GitHub API calls
- Set appropriate headers for API version
- Handle rate limiting (60/hour unauthenticated, 5000/hour authenticated)
memory/check_seen
- Key should be the full repo name (owner/repo format)
- Namespace: "news/repos"
memory/add
- Store each new repo as type "document"
- Include star count for ranking
memory/mark_seen
- Use 7-day TTL (repos trend changes weekly)
Repository Data Schema
{
"full_name": "owner/repo-name",
"name": "repo-name",
"description": "A powerful LLM inference library",
"url": "https://github.com/owner/repo-name",
"stars": 15234,
"forks": 1523,
"language": "Python",
"topics": ["llm", "inference", "machine-learning"],
"created_at": "2025-06-15",
"pushed_at": "2026-01-26"
}
Error Handling
- If GitHub API rate limits, wait and retry or return cached results
- If API request fails, log error and continue
- Return partial results if some queries succeed
Success Criteria
- At least one topic query succeeds
- Repos are sorted by star count
- No duplicate repos in output
- AI-relevance filter applied
1---2name: fetch-github-trending3description: Fetch trending AI/ML repositories from GitHub and store them in memory. Uses HTTP requests for GitHub API and memory MCP for storage and deduplication.4license: MIT5---6
7# Fetch GitHub Trending
8
9Fetch and store trending AI/ML repositories from GitHub with deduplication.
10
11## When to Use
12
13Use this skill when you need to:
14- Discover trending AI/ML tools and libraries
15- Find new repositories gaining traction
16- Collect repos for tool spotlight sections in digests
17
18## Instructions
19
20### Step 1: Define Search Topics
21
22Target these GitHub topics for AI/ML repos:
23- `machine-learning`
24- `deep-learning`
25- `llm`
26- `artificial-intelligence`
27- `nlp`
28- `transformers`
29- `computer-vision`
30
31### Step 2: Build GitHub Search Query
32
33Construct a GitHub search API query:
34
35**Query pattern:**
36```
37topic:machine-learning OR topic:llm language:python stars:>100 pushed:>2026-01-25
38```
39
40**Date calculation based on time range:**
41- `daily`: pushed in last 1 day
42- `weekly`: pushed in last 7 days
43- `monthly`: pushed in last 30 days
44
45### Step 3: Fetch from GitHub API
46
47Use the `http_request` tool to query GitHub Search API.
48
49**API endpoint:**
50- URL: `https://api.github.com/search/repositories`
51- Method: GET
52- Parameters: q (query), sort (stars), order (desc), per_page (20)
53- Headers: Accept: application/vnd.github.v3+json
54
55**For each API response:**
561. Extract: full_name, description, html_url, stargazers_count, forks_count, language, topics
572. Parse created_at and pushed_at timestamps
58
59### Step 4: Check for Duplicates
60
61For each repository:
62
631. **Check if already seen:**
64 - Call `memory/check_seen` with key=full_name (e.g., "owner/repo"), namespace="news/repos"
65 - If seen=true, skip this repo
66
672. **Validate AI relevance:**
68 - Repo must have at least one AI-related topic OR
69 - Description mentions AI/ML keywords
70 - Skip repos that don't appear AI-related
71
72### Step 5: Store New Repositories
73
74For each new (unseen) repository:
75
761. **Store in memory:**
77 - Call `memory/add` with:
78 - type: "document"
79 - namespace: "news/repos"
80 - data: {full_name, name, description, url, stars, forks, language, topics, created_at, pushed_at}
81 - metadata: {fetched_at, search_topic}
82
832. **Mark as seen:**
84 - Call `memory/mark_seen` with:
85 - key: full_name
86 - namespace: "news/repos"
87 - ttl_seconds: 604800 (7 days)
88
89### Step 6: Return Results
90
91Return a summary including:
92- Number of repos stored
93- Number of duplicates skipped
94- Topics searched
95- Total matching repos found
96
97## Tool Usage Guidance
98
99### http_request tool
100- Use for GitHub API calls
101- Set appropriate headers for API version
102- Handle rate limiting (60/hour unauthenticated, 5000/hour authenticated)
103
104### memory/check_seen
105- Key should be the full repo name (owner/repo format)
106- Namespace: "news/repos"
107
108### memory/add
109- Store each new repo as type "document"
110- Include star count for ranking
111
112### memory/mark_seen
113- Use 7-day TTL (repos trend changes weekly)
114
115## Repository Data Schema
116
117```json
118{
119 "full_name": "owner/repo-name",
120 "name": "repo-name",
121 "description": "A powerful LLM inference library",
122 "url": "https://github.com/owner/repo-name",
123 "stars": 15234,
124 "forks": 1523,
125 "language": "Python",
126 "topics": ["llm", "inference", "machine-learning"],
127 "created_at": "2025-06-15",
128 "pushed_at": "2026-01-26"
129}
130```
131
132## Error Handling
133
134- If GitHub API rate limits, wait and retry or return cached results
135- If API request fails, log error and continue
136- Return partial results if some queries succeed
137
138## Success Criteria
139
140- At least one topic query succeeds
141- Repos are sorted by star count
142- No duplicate repos in output
143- AI-relevance filter applied