• Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
project logo

marvinkennis

github-leads

Find customers to sell to from GitHub activity
Remix of templates/github-leads
Public
Like
github-leads
Home
Code
9
PROMPT.txt
README.md
agent.ts
dashboard.tsx
db.ts
C
digest.ts
C
github.cron.ts
H
main.ts
welcome-ui.tsx
Branches
1
Pull requests
Remixes
History
Environment variables
2
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
README.md
Code
/
README.md
Search
…
Viewing readonly version of main branch: v10
View latest version
README.md

GitHub Stargazer Lead Tracker

Find potential customers from GitHub stargazer activity. Monitor any repositories for new stars, scrape historic stargazers on first run, and use AI to qualify leads automatically.

image.png

What this does

  1. Historic Scraping: On first run, scrapes all existing stargazers from configured repositories
  2. Ongoing Monitoring: A cron job monitors for new stars on your configured repositories
  3. AI Lead Qualification: An AI agent researches each stargazer and scores them as a lead
  4. Dashboard & Alerts: Qualified leads appear in your dashboard with periodic digest emails

Getting started

  1. Click Remix
  2. Add environment variables:
    • OPENAI_API_KEY — for AI lead qualification
    • GITHUB_TOKEN — for accessing GitHub API (create one here)
  3. Configure your repositories:
    • Edit GITHUB_REPOS array in github.cron.ts
    • Add repositories in "owner/repo" format (e.g., "facebook/react")
  4. Configure email settings:
    • Edit RECIPIENTS in digest.ts
    • Customize PROMPT.txt with your ICP criteria
  5. Open main.ts to view your dashboard

Note: The first run will scrape ALL historic stargazers, which may take time for popular repositories.

How it works

Repository Monitoring (github.cron.ts)

  • First Run: Scrapes all existing stargazers from configured repositories
  • Subsequent Runs: Monitors for new stars since last check
  • Processes stargazers in batches to avoid rate limits
  • Tracks repository state to know when historic scraping is complete

AI Agent (agent.ts)

  • Researches each GitHub user's profile, repos, and linked sites
  • Uses web search to learn about their company and role
  • Scores them against your ICP defined in PROMPT.txt
  • Returns {name, match, score, leadTypes, reasoning}

Storage (db.ts)

  • Leads Table: Every lead is stored in SQLite with columns:
    • id — auto-incremented
    • timestamp — when first seen
    • input_data — the GitHub stargazer event(s) that triggered it
    • output_data — AI result
  • Repository State Table: Tracks scraping progress per repository:
    • repo_name — repository identifier
    • last_checked — timestamp of last check
    • historic_scrape_complete — whether initial scrape is done

Dashboard (main.ts)

  • Qualified leads (match=true) appear at the top
  • Shows score and lead type tags (customer/hire)
  • Click a lead to see full details and GitHub activity

Email Digest (digest.ts)

  • Sends daily emails (1pm UTC) with new qualified leads
  • Edit RECIPIENTS array to configure who receives them

Customization

  • Repositories: Edit the GITHUB_REPOS array in github.cron.ts to add/remove repositories
  • Lead Criteria: Edit PROMPT.txt to define your ideal customer profile
  • Monitoring Frequency: Adjust the cron schedule in github.cron.ts (default: hourly)
  • Email Schedule: Adjust the email digest schedule in digest.ts (default: daily at 1pm UTC)

Repository Configuration

Add repositories to monitor in the GITHUB_REPOS array:

export const GITHUB_REPOS = [ "val-town/val-town", "facebook/react", "microsoft/vscode", "your-org/your-repo", // Add more repositories here ];

Performance Notes

  • Historic Scraping: Popular repositories with many stars will take time to process initially
  • Rate Limits: The system processes stargazers in batches with delays to respect GitHub API limits
  • Incremental Updates: After the first run, only new stars are processed, making subsequent runs fast

Testing

Use the test bar in the dashboard to evaluate any GitHub username instantly.

FeaturesVersion controlCode intelligenceCLIMCP
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
© 2026 Val Town, Inc.