check-discord-jobs
Skill9 starsChanged 58 days agoMITView on GitHub
Scan Discord job channels via agent-browser over CDP, cache every post by Discord message id for instant seen or not-seen dedup, cross-check the tracker, and process NEW jobs end to end (template resume, email draft or staged form, tracker row; never submit). Invoke with /check-discord-jobs, optionally followed by channel URLs.
In this repository17 other files it gives its agents.
- docs/AGENTS.mdAGENTS.md
- bdjobs-full-runSkill
- check-facebook-savedSkill
- check-image-batchSkill
- check-linkedin-savedSkill
- create-templateSkill
- critiqueSkill
- edit-resumeSkill
- humanizerSkill
- job-apply-coreSkill
- linkedin-full-runSkill
- linkedin-job-searchSkill
- make-cover-letterSkill
- make-resumeSkill
- resume-kitSkill
- setup-build-kbSkill
- setup-extractSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 37
Never paste the token into docs, sheets, or reports.
- Very specific: line 60
Write every verdict back to seen_messages.json before doing any work.
- Very specific: line 63
Follow {{CORE_DIR}}/references/new-job-procedure.md.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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.
Files
Discord job channel scanner
Path placeholders: {{SKILL_DIR}} = this skill's base directory, {{CORE_DIR}} = the job-apply-core skill directory (sibling install).
Universal rules: {{CORE_DIR}}/OPERATIONS.md. Per-job procedure: {{CORE_DIR}}/references/new-job-procedure.md.
Config keys read: discord_channels, discord_cache_dir (default JDs/discord), cv_source, templates_dir, sheet_id, drive_folder_id, cdp_port, workspace.
Scripts: {{SKILL_DIR}}/scripts/discord_api.py (primary, REST API — references/discord-api-notes.md), {{SKILL_DIR}}/scripts/scan_channel.py (DOM fallback).
Inputs
$ARGUMENTS: optional space or newline separatedhttps://discord.com/channels/<server>/<channel>URLs.- Without URLs, use
discord_channelsfrom the config. When a new job channel is discovered, add its URL there.
Skill-specific rules
- Open every channel in a NEW tab (inventory existing tabs first). Close only the Discord tabs this run opened; never a pre-existing Discord tab. Sub-agents close only pages they opened.
- Login wall (Discord or an application link): hard stop, leave the tab open, record it.
- If the page is already on a listed channel (a pre-existing tab or the tab this run opened): do NOT deep-scroll history — collect the last 20 messages and settle. Start at the bottom (where Discord opens), extract and count; if fewer than 20, scroll up step by step and keep counting until 20 unique messages are collected or the top is reached, then stop. The scroll-back sweep (
--stop-date) is only for a first-time pass over a long channel with no already-open page.
Cache
Root <workspace>/<discord_cache_dir>/.
seen_messages.json: array of{ "message_id": "<discord snowflake>", "channel_id", "url", "company", "position", "deadline", "apply_method": "email|link|form", "contact", "verdict": "new|applied|drafted|skipped-duplicate|expired|not-a-job", "sheet_row", "output_dir", "first_seen", "processed_at" }. The message id makes dedup instant across runs.applied_cache.json:{ "company+position": { sheet_row, date, how } }.
Step 1: extract posts
- For each channel URL: it must have a tab; if none exists, open one in a NEW tab, wait for load, confirm the channel rendered.
Token (capture once, then the script handles it)
- Where it lives:
~/.config/job-apply-kit/discord_token— one raw line, no quotes (or$JAK_DISCORD_TOKEN). Secret: handle like the Google tokens. - How the script uses it:
discord_api.pyreads the file automatically and sendsAuthorization: <token>on an in-pagefetchof/api/v9/channels/<id>/messages(same-origin, so the HttpOnly Cloudflare cookies ride along by themselves). If the API answers401: Unauthorizedmid-run, the script recaptures the token itself and retries once. - How to capture (Route A — preferred, no reload): the token is already in the network log of any loaded channel tab. With the chrome-devtools MCP:
list_pages→ pick the Discord channel page →list_network_requests(resourceTypes fetch/xhr) → find a/api/v9/channels/.../messagesrequest (if none, click between two channels) →get_network_request→ copy theauthorizationrequest header → save it to the token file. - How to capture (Route B — agent-browser only):
python3 {{SKILL_DIR}}/scripts/discord_api.py <slug> --url <channel> --capture-tokenrecords a HAR while reloading the channel tab and pullsAuthorizationout of the app's own/api/v9traffic. Heavier (full SPA reload); use when the MCP is unavailable. - Never paste the token into docs, sheets, or reports. Details:
references/discord-api-notes.md("Capturing the token"). - Primary method — REST API (fast, complete, see
references/discord-api-notes.md):python3 {{SKILL_DIR}}/scripts/discord_api.py <slug> --url <channel url> --tab <t<N>> --last 20(bottom-first last-20 settle) or--after-date YYYY-MM-DDfor a catch-up sweep since the last run. The channel id is matched from the--urlagainst the tab URL; Authorization comes from~/.config/job-apply-kit/discord_token. On401: Unauthorized, recapture the token (above). - Fallback — DOM scraping (no token needed):
python3 {{SKILL_DIR}}/scripts/scan_channel.py <slug> --tab <t<N>> [--last 20 | --stop-date <YYYY-MM-DD>]— extracts the visible messages, scrolls the chat scroller, merges by message id, writes<today>/raw_<slug>.json. Quirks (single-line JS, explicit--tab, chat-scroller target) are in the notes doc. Extraction script (the same one the helper embeds):() => [...document.querySelectorAll('[id^="message-content-"], [data-list-item-id^="chat-messages"]')].map(el => ({ id: (el.id.match(/message-content-(\d+)/) || [,''])[1] || (el.getAttribute('data-list-item-id') || '').split('-').pop(), author: el.querySelector('h3, [class*="header"] [class*="name"]')?.innerText || '', time: el.querySelector('time')?.getAttribute('datetime') || '', text: el.innerText, links: [...el.querySelectorAll('a')].map(a => a.href) })).filter(m => m.id) - Persist to
<today>/messages.jsonand a readablemessages.md(per channel: message_id | date | company or role | link). Merging into the rootseen_messages.jsonis what makes future runs fast.
Step 2: dedup verdicts
For every extracted post (skip obvious chat noise; keep anything with a link, an email address or JD-shaped text):
- Seen in
seen_messages.jsonorapplied_cache.json: mark the verdict, done. - Otherwise fuzzy-check company + position against the tracker snapshot.
- Write every verdict back to
seen_messages.jsonbefore doing any work.
Step 3: process NEW jobs
Follow {{CORE_DIR}}/references/new-job-procedure.md. The comments value for the sheet row is the Discord message id.
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
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.

