$npx -y skills add Varnan-Tech/opendirectory --skill sdk-adoption-trackerGiven your SDK or library name, searches GitHub code search for public repos that import or require it, classifies each repo as company org, affiliated developer, solo developer, or tutorial noise, scores by adoption signal strength, detects new adopters by date, and outputs a ra
| 1 | # SDK Adoption Tracker |
| 2 | |
| 3 | Take an SDK name. Search GitHub for public repos that import it. Score each repo by company signal, activity, and noise indicators. Enrich high-signal repos with owner and contributor data. Output a ranked adoption report with outreach context for company adopters. |
| 4 | |
| 5 | --- |
| 6 | |
| 7 | **Critical rule:** Every repo in the output must exist in the GitHub code search API response. Every company name must come from the GitHub user or org API `company` or `name` field. Every contributor handle must come from the GitHub contributors API response. If any field is empty in the API, write "not listed" -- do not infer, guess, or extrapolate. |
| 8 | |
| 9 | --- |
| 10 | |
| 11 | ## Common Mistakes |
| 12 | |
| 13 | | The agent will want to... | Why that's wrong | |
| 14 | |---|---| |
| 15 | | Run code search without GITHUB_TOKEN | Unauthenticated code search hits a 3 req/min secondary rate limit and fails on any meaningful scan. GITHUB_TOKEN is required. Stop at Step 1 with a clear error if it is missing. | |
| 16 | | Include forks of the SDK itself | Repos that fork the SDK are contributors or mirrors, not adopters. Filter out repos where `fork == true` AND the repo name matches the SDK name. | |
| 17 | | Send all 500 raw search results to the AI | Code search can return up to 500 results, most of which are noise. Filter and score locally first. Send only the top 20 high-signal repos to the AI analysis step. | |
| 18 | | Report tutorial and example repos as adopters | Repos with "example", "tutorial", "demo", "learn", "sample", "playground", "starter" in the name or description are not production users. Mark as tutorial_noise and exclude from lead briefs. | |
| 19 | | Invent company names or contact handles | Every company name must come from the GitHub `company` or org `name` field. Every contributor handle must come from the contributors API response. If a field is empty, write "not listed". | |
| 20 | | Use one import pattern for all ecosystems | `require('sdk')` will not find Python users. Auto-detect ecosystem from the SDK name and build ecosystem-specific patterns. Ask the user if auto-detection is ambiguous. | |
| 21 | |
| 22 | --- |
| 23 | |
| 24 | ## Step 1: Setup Check |
| 25 | |
| 26 | ```bash |
| 27 | if [ -z "$GITHUB_TOKEN" ]; then |
| 28 | echo "ERROR: GITHUB_TOKEN is required for code search." |
| 29 | echo "Add a token at github.com/settings/tokens (no scopes needed for public repos)." |
| 30 | echo "Without it, GitHub code search hits a 3 req/min secondary rate limit and fails." |
| 31 | exit 1 |
| 32 | fi |
| 33 | echo "GITHUB_TOKEN: set" |
| 34 | curl -s -H "Authorization: Bearer $GITHUB_TOKEN" \ |
| 35 | -H "Accept: application/vnd.github+json" \ |
| 36 | "https://api.github.com/rate_limit" | python3 -c " |
| 37 | import json, sys |
| 38 | d = json.load(sys.stdin) |
| 39 | search = d['resources']['search'] |
| 40 | core = d['resources']['core'] |
| 41 | print(f'Search rate: {search[\"remaining\"]}/{search[\"limit\"]} remaining') |
| 42 | print(f'Core rate: {core[\"remaining\"]}/{core[\"limit\"]} remaining') |
| 43 | " |
| 44 | ``` |
| 45 | |
| 46 | If search remaining is 0: stop. Tell the user the reset time from `X-RateLimit-Reset`. |
| 47 | |
| 48 | --- |
| 49 | |
| 50 | ## Step 2: Gather Input |
| 51 | |
| 52 | Collect from the conversation: |
| 53 | - SDK name (e.g. `@company/my-sdk`, `requests`, `github.com/org/go-sdk`) |
| 54 | - Optional: ecosystem override (`npm`, `python`, `go`, `gem`) -- auto-detected if not provided |
| 55 | - Optional: org/user to exclude from results (the SDK owner's own repos) |
| 56 | - Optional: product context string (used to personalize outreach messages) |
| 57 | |
| 58 | **Auto-detect ecosystem:** |
| 59 | - Starts with `@` or contains `-`: npm |
| 60 | - snake_case with no `/` or `-`: python |
| 61 | - Contains `github.com/`: go |
| 62 | - Otherwise: ask the user |
| 63 | |
| 64 | **If no SDK name is provided:** Ask: "Which SDK or library would you like to track? Provide the package name as it appears in import statements (e.g. `stripe`, `@clerk/nextjs`, `requests`)." |
| 65 | |
| 66 | ```bash |
| 67 | python3 << 'PYEOF' |
| 68 | import json, sys, re |
| 69 | |
| 70 | sdk_name = "SDK_NAME_HERE" |
| 71 | ecosystem_override = "" # leave empty for auto-detect |
| 72 | exclude_owner = "" # optional: owner name to exclude (usually the SDK publisher) |
| 73 | product_context = "" # optional: what your product does |
| 74 | |
| 75 | # Auto-detect ecosystem |
| 76 | if ecosystem_override: |
| 77 | ecosystem = ecosystem_override |
| 78 | elif sdk_name.startswith("@") or "-" in sdk_name: |
| 79 | ecosystem = "npm" |
| 80 | elif re.match(r'^[a-z][a-z0-9_]*$', sdk_name): |
| 81 | ecosystem |