From proficiently
Polls Telegram bot for job search messages to automate applying to jobs, searching roles, and checking statuses via browser tools and API calls.
npx claudepluginhub proficientlyjobs/proficiently-claude-skills --plugin proficientlyThis skill is limited to using the following tools:
Poll Telegram for incoming messages and route them to the appropriate Proficiently skill. Runs headlessly via `/loop 1m /proficiently:jobsearch-telegram`.
Enables communication with users via Telegram for clarifications, options, blockers, task completion notifications, and long-running task updates instead of terminal.
Implements Telegram Bot API integration: BotFather setup, messages, webhooks, inline keyboards, groups, channels. Node.js and Python boilerplates.
Sends messages, images, polls, and formatted media to Telegram channels and groups via Bot API. Handles inline keyboards and templates for marketing, announcements, and community posts.
Share bugs, ideas, or general feedback.
Poll Telegram for incoming messages and route them to the appropriate Proficiently skill. Runs headlessly via /loop 1m /proficiently:jobsearch-telegram.
Before this skill can run, the user must create a Telegram bot and configure it. If DATA_DIR/telegram-config.md does not exist, walk the user through setup:
Tell the user:
Let's set up your Telegram bot.
- Open Telegram and search for @BotFather
- Send
/newbot- Choose a name (e.g., "My Job Search Assistant")
- Choose a username (must end in
bot, e.g.,my_jobsearch_bot)- BotFather will give you a bot token β copy it and paste it here
Then send your bot a message (anything) so I can find your chat ID.
Once the user provides the bot token, fetch their chat ID:
curl -s "https://api.telegram.org/bot{TOKEN}/getUpdates"
Extract message.chat.id from the first result. If no results, remind the user to send a message to the bot first, then retry.
Write DATA_DIR/telegram-config.md:
# Telegram Config
- Bot token: {TOKEN}
- Chat ID: {CHAT_ID}
- Bot username: @{USERNAME}
Send a test message:
curl -s -X POST "https://api.telegram.org/bot{TOKEN}/sendMessage" \
-H "Content-Type: application/json" \
-d '{"chat_id": "{CHAT_ID}", "text": "π Job search bot connected! Send me a job URL to apply, or say \"search\" to find jobs."}'
If successful, tell the user setup is complete and they can start the loop with /loop 1m /proficiently:jobsearch-telegram.
Resolve the data directory using shared/references/data-directory.md.
Config β DATA_DIR/telegram-config.md (created during setup, contains bot token + chat ID). Never commit this file to git. Read this first on every poll cycle to get credentials.
State β DATA_DIR/telegram-state.md (tracks polling position). Create if missing:
# Telegram State
## Polling
- last_update_id: 0
## Pending Confirmations
<!-- Format: [msg_id: X] type/stage β description β waiting since DATE
For apply confirmations, also store: job_url, form_url, field_mapping (JSON) -->
(none)
## Recent Actions
<!-- Last 20 actions taken -->
DATA_DIR/telegram-config.md β if missing, run First-Time Setup above and stopDATA_DIR/telegram-state.md β if missing, create from template aboveDATA_DIR/job-history.md, DATA_DIR/application-data.md, DATA_DIR/preferences.mdcurl -s "https://api.telegram.org/bot{TOKEN}/getUpdates?offset={LAST_UPDATE_ID+1}&timeout=5"
If no new messages β exit silently. Do not log, do not send anything.
Parse each message and classify:
| Message Type | Detection | Route |
|---|---|---|
| Job URL | Contains greenhouse.io, lever.co, myworkdayjobs.com, ashbyhq.com, or other job board URL | Step 4a: Apply |
| "apply last" / "apply" | Text matches apply (with optional last/current) | Step 4a: Apply |
| "search for ..." | Text starts with search, find, look for | Step 4b: Search |
| "tailor resume for ..." | Text mentions tailor/resume + context | Step 4c: Tailor |
| "status" / "what's open" | Text asks about application status | Step 4d: Status |
| "help" | Text is exactly help or ? | Step 4e: Help |
| Confirmation reply | Threaded reply to a pending confirmation message, OR standalone confirm word (yes/y/go/no/cancel) when pending confirmations exist | Step 5: Confirm |
| Plain text | Anything else | Step 6: Note |
Extract the URL or resolve "last"/"current"
Check if a job folder already exists in DATA_DIR/jobs/ for this URL
Send acknowledgment to Telegram:
π― Got it β applying to [URL or "most recent job"].
I'll scan the form, tailor your resume, and propose answers. Stand by...
Execute the apply workflow from skills/apply/SKILL.md:
job_url, form_url (the direct ATS form URL navigated to), and field_mapping (the full approved fieldβvalue JSON)When field-approval confirmation arrives (Step 5), re-navigate to form_url, fill all fields, then send a second confirmation (submit approval) with a screenshot description and ask: "Everything looks good β submit?"
stage: "submit-approval"When submit-approval arrives, click Submit, then log the application (Step 9 of the apply skill).
Sending the proposal: Use the send message helper (Step 8) with the full field summary. Keep it under 4000 chars. If longer, split into: (1) auto-fill fields, (2) proposed answers, (3) needs input.
Two-phase confirmation flow:
stage: field-approval): User approves the fieldβvalue mappingstage: submit-approval): User approves the final form before clicking Submitπ Searching for: [keywords]...skills/job-search/SKILL.mdπ Found X matches for "[keywords]":
1. [Role] at [Company] β [fit score]
[URL]
2. ...
Reply with a number to apply, or "apply 1" / "apply 3" etc.
π Tailoring resume for [job]...skills/tailor-resume/SKILL.mdCompile from DATA_DIR/job-history.md and DATA_DIR/jobs/*/applied.md:
π Job Search Status
Applied (X):
- [Role] at [Company] β [date] β [status]
- ...
Saved but not applied (Y):
- [Role] at [Company] β [date saved]
- ...
Pending your confirmation:
- [any pending apply proposals]
Send:
π Here's what you can do:
<b>Apply</b>
β’ Send a job URL β I'll apply for you
β’ "apply last" β continue with the most recent job
<b>Search</b>
β’ "search [keywords]" β find matching jobs
β’ "find AI product jobs" β same thing
<b>Resume</b>
β’ "tailor resume for [job URL or name]"
<b>Status</b>
β’ "status" β see all applications and what's pending
<b>Other</b>
β’ "help" β this message
β’ Any other text is saved as a note
A confirmation reply is either:
reply_to_message.message_id to a pending confirmationyes, y, go, send it, π, no, skip, cancel, β) when pending confirmations existDisambiguation when standalone:
You have X things waiting. Which one?
1. [description of pending 1]
2. [description of pending 2]
Reply with a number.
Processing:
telegram-state.mdstage: field-approval β re-navigate to form_url, fill fields using field_mapping, then send submit-approval promptstage: submit-approval β click Submit, log applicationDATA_DIR/telegram-inbox.md with timestamp"Want me to search for [text] jobs?""Noted π"After processing all messages:
last_update_id in DATA_DIR/telegram-state.md[msg_id: X] apply/field-approval β [Role] at [Company] β waiting since DATE
job_url: https://...
form_url: https://...
field_mapping: {"First Name": "...", "Email": "...", ...}
Read credentials from DATA_DIR/telegram-config.md, then send via curl:
curl -s -X POST "https://api.telegram.org/bot{TOKEN}/sendMessage" \
-H "Content-Type: application/json" \
-d '{"chat_id": "CHAT_ID", "text": "MESSAGE", "parse_mode": "HTML"}'
For replies to specific messages, add "reply_to_message_id": MSG_ID.
Formatting rules:
<b>bold</b>, <i>italic</i>, <code>code</code>To capture the sent message's message_id (needed for tracking confirmations):
# Parse from response JSON
jq -r '.result.message_id'
DATA_DIR/telegram-config.md.After every poll cycle that does actual work (not silent exits), you MUST:
Count your token usage for this cycle. At the end of your response, estimate:
Append to DATA_DIR/telegram-cost-log.csv (create with header if missing):
timestamp,action,input_tokens,output_tokens,estimated_cost_usd
Example row:
2026-03-11T14:30:00Z,apply-proposal,12000,3500,$0.09
Include a cost footer in every Telegram reply:
---
π ~12K in / ~3.5K out Β· ~$0.09
On "status" queries, include a cost summary section:
π° Cost this session: $X.XX (Y interactions)
π° Cost all-time: $X.XX (Z interactions)
Compute from the CSV log.
Add to ~/.claude/settings.json:
{
"permissions": {
"allow": [
"Bash(curl:*)",
"Bash(jq:*)",
"Read(~/.proficiently/**)",
"Write(~/.proficiently/**)",
"Edit(~/.proficiently/**)",
"Read(~/.claude/skills/**)",
"mcp__claude-in-chrome__*"
]
}
}