agentleFS
assafkipassafkip/huntkit/skills/telegram-harvest/SKILL.md

telegram-harvest

Skill74 starsChanged 19 days agoMITView on GitHub

Programmatic, no-LLM Telegram channel harvest: tgspyder scrape -> offline language detection + translation (Argos) -> rule-based field extraction -> XLSX with clue columns, plus listings.jsonl and a capture batch for EV evidence. Built for marketplace / account-sale / fraud-vendor channels. Use when: "harvest these telegram channels", "scrape telegram listings into a spreadsheet", "telegram marketplace sweep", "account procurement sheet". NOT for: private groups the case has no lawful access to, or identifying a person behind a channel (clues only; attribution needs T1/T2 crosslinks).

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 1

    1. assafkip/investigators-copilot★ 74100% same

    Edited · 0

    None found.

    Wrote their own version · 0

    None found.

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository6 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Every row is T3 (automated extraction).

    line 65
  2. Very specific:

    If the workbook itself goes to a client, register it: ingest-client-document.sh <run-dir>/telegram-harvest.xlsx <slug> document …

    line 69

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

telegram-harvest

Port of the founder's assafkip/account-procurement-tools pipeline (see NOTICE.md). Deterministic: keyword dictionaries + regexes, no LLM, no external API at run time.

channels.txt -> tgspyder (scrape + invite links) -> lingua detect -> Argos translate (offline)
             -> extract.py rules (type, price, PIN, verified, qty, handles, links)
             -> geo_clues.py (clues only, never a country verdict)
             -> telegram-harvest.xlsx + listings.jsonl + urls.tsv

Setup (once per machine)

bash skills/telegram-harvest/setup.sh        # venv, deps, tgspyder, Argos models
# tgspyder is not vendored: TGSPYDER_SRC=<checkout> bash .../setup.sh if it is elsewhere
skills/telegram-harvest/.venv/bin/tgspyder @somechannel --chats   # one interactive login

Telegram login uses a real account session: founder decision per case. Sessions are secrets; never commit them.

Run

PY=skills/telegram-harvest/.venv/bin/python
H=skills/telegram-harvest/scripts/harvest.py

# live scrape into the active case (raw-collections/<ts>-telegram-harvest/)
$PY $H --channels <case>/investigation/evidence/telegram-channels.txt --case
# via SOCKS proxy
$PY $H --channels channels.txt --case --proxy socks5://127.0.0.1:9050
# offline: re-process an existing tgspyder messages CSV, no models needed
python3 $H --from-csv messages_x.csv --channel @x --case --no-translate
# a different rule profile (copy config/keywords.json and edit the terms)
$PY $H --channels channels.txt --case --keywords path/to/keywords.json

Bounded: --max-messages per channel (default 5000).

Output columns

The sheet keeps the 23 template columns in order (Date of Finding ... Screenshot 4), then helper columns prefixed »: Confidence (high/medium/low), Needs Review, Clue: Language, Clue: Country Words, Clue: Phone Country, Clue: TG Handles, Source Channel, Message ID, Message Date, Original Text, English Text. Vendor Type, Ecosystem (Geo) and Geo of Acc. are left blank and highlighted: a human makes the country call.

Evidence routing (required before citing)

  • Every row is T3 (automated extraction). The workbook is working material.
  • Capture each message you will cite as an EV item: bash skills/osint/scripts/capture-evidence.sh --batch <run-dir>/urls.tsv --case <case> (trim urls.tsv to the rows you need first; add --social per line for media).
  • If the workbook itself goes to a client, register it: ingest-client-document.sh <run-dir>/telegram-harvest.xlsx <slug> document --provided-by "telegram-harvest run <ts>".
  • Handles, phone prefixes and country words are clues. A shared handle across channels is not the same operator without a crosslink (.claude/rules/q-investigation.md).

Extending the rules

  • config/keywords.json: account types, flags, quantity/payment/transfer/spend/history/age terms, in any language. Short Latin terms match on word boundaries; longer or CJK terms match as substrings.
  • config/countries.json: country names, demonyms and local terms for the clue column.

Tests

python3 -m pytest skills/osint/tests/test_telegram_harvest.py -q (offline: extraction, clues, confidence, workbook columns, CSV mode).

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.