Karma Farmer is a command line tool that gives a 0.0 to 1.0 triage score for how likely a GitHub account, or a pull request, is to be an agent karma farmer: an account whose activity is automated bulk repository creation, forking, and drive-by pull requests filed shortly after an issue is opened.
The score is a heuristic triage signal, not proof. Every signal is printed with its raw value so a human can check the reasoning.
Provide --user, --pr, or both.
% uv run karma-farmer --user leninworldorg/repo#N% uv run karma-farmer --pr https://github.com/delta-io/delta-rs/pull/5132
% uv run karma-farmer --pr delta-io/delta-rs#5132% uv run karma-farmer --user leninworld --pr delta-io/delta-rs#5132 --threshold 0.5Options:
| Option | Purpose |
|---|---|
|
GitHub login to examine |
|
Pull request as a full URL or |
|
Exit with status 1 when the score is above this value (0.0 to 1.0) |
|
Print the full report as JSON |
Exit status:
| Status | Meaning |
|---|---|
0 |
Scored successfully, and at or below the threshold if one was given |
1 |
Score is above |
2 |
Invalid arguments, or the user or PR could not be fetched |
Each signal is normalised to 0.0 to 1.0, and the final score is a weighted mean over the signals that were measured.
- Profile signals
-
account age, repos created in the last 90 and 180 days, share of repos created recently (dormancy break), fork ratio, zero-star ratio, write-type public events in the last seven days, and distinct repos touched in recent events.
- Pull request signals
-
hours between the linked issue and the PR, whether the author is a first-time contributor, and whether the body carries AI-generation boilerplate.
Bot accounts are excluded and score 0.0.
Labels:
| Score | Label |
|---|---|
0.75 and above |
likely karma farmer |
0.50 to 0.75 |
suspicious, review manually |
0.40 to 0.50 |
weak signal |
below 0.40 |
consistent with authentic contributors |
Dependencies are managed with uv, and tests use pytest.
% uv sync
% uv run pytest
% uv run pytest --cov=karma_farmer --cov-report=term-missingThe scoring logic in scoring.py is pure and takes plain data objects, so it
is tested without network access. github_client.py is the only module that
talks to GitHub, through PyGithub, and its tests use fake objects.
| Path | Contents |
|---|---|
|
Signal definitions, weights, and labels (pure functions) |
|
PyGithub access, PR reference parsing, token resolution |
|
Plain data objects passed between the client and the scorer |
|
Command line entry point |
|
Unit tests |
This repository is licensed under the MIT License. See LICENSE.