From dsa-coach
Suggest the freshest recently-asked coding interview problem the user has NOT solved yet, from an opt-in live community feed. The feed is the only part of this skill that touches the network, and it is OFF by default.
How this skill is triggered — by the user, by Claude, or both
Slash command
/dsa-coach:fresh-problemThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Suggest the freshest recently-asked coding interview problem the user has NOT solved yet, from an opt-in live community feed. The feed is the only part of this skill that touches the network, and it is OFF by default.
Suggest the freshest recently-asked coding interview problem the user has NOT solved yet, from an opt-in live community feed. The feed is the only part of this skill that touches the network, and it is OFF by default.
Look for dsa-coach.config.json in the current working directory. If present, parse it and use its values. For any missing key, fall back to the documented default below. If the file is absent entirely, use all defaults.
Config keys + defaults this skill uses:
language (default "ts") — solution file extension (for the local solved-scan).solutionDirs (default { "leetcode": "leetcode", "geeksforgeeks": "geeksforgeeks", "hackerrank": "hackerrank", "interviewbit": "interviewbit" }) — platform key → folder name.liveQuestions (default { "enabled": false, "endpoint": "https://www.hellointerview.com/trpc/intelligence/getQuestionsAndUpvotes", "interviewTypes": ["CODING", "AI_ENABLED_CODING"], "maxPages": 3 }) — the live feed. enabled is the master opt-in; when false this skill makes NO network call.If liveQuestions.enabled is not exactly true, do NOT fetch anything. Print this and stop:
fresh-problem is opt-in and currently disabled. This skill fetches recently-asked interview questions live from an external community feed (default: HelloInterview). To enable it, add this to
dsa-coach.config.jsonand run the skill again:"liveQuestions": { "enabled": true }Fetched questions are used only for your own practice — nothing is saved to your repo or shared.
Make no further tool calls. The gate is absolute: no network access happens unless enabled === true.
Build the set of problems the user has already solved by scanning their own repo (same approach as suggest-problem). For each folder in solutionDirs:
git ls-files -- "<dir>/**/*.<language>" "<dir>/*.<language>"
If git ls-files returns nothing (not a git repo / untracked), fall back to:
ls -1 <dir>/**/*.<language> <dir>/*.<language> 2>/dev/null
Record each solved file's name and, for LeetCode files named <NNN>_<slug>.<language>, its LeetCode number <NNN>.
This is the one place that knows the current source's wire format. To switch sources later, rewrite ONLY this section; everything below stays the same.
Run the fetch with python3 (already used elsewhere in this plugin). Substitute <endpoint> and <maxPages> from liveQuestions, and pass liveQuestions.interviewTypes as a JSON-array string for the third argument (e.g. '["CODING","AI_ENABLED_CODING"]'):
python3 - "<endpoint>" "<maxPages>" '<interviewTypesJson>' <<'PY'
import json, sys, urllib.parse, urllib.request
# Exit 0 in every case so this bash step never errors; the agent reads stdout
# to detect failure (a line containing "_error", or no output at all).
endpoint, maxpages, types = sys.argv[1], int(sys.argv[2]), json.loads(sys.argv[3])
out = []
for page in range(1, maxpages + 1):
payload = {"0": {"json": {
"company": None, "interviewTypes": types, "interviewLevels": None,
"regions": None, "search": None, "sort": "recentAndPopular",
"page": page, "pageSize": 25, "atLeastOneUpvote": True},
"meta": {"values": {"company": ["undefined"], "interviewLevels": ["undefined"],
"regions": ["undefined"], "search": ["undefined"]}}}}
q = urllib.parse.urlencode({"batch": "1", "input": json.dumps(payload, separators=(',', ':'))})
req = urllib.request.Request(endpoint + "?" + q,
headers={"Accept": "application/json", "User-Agent": "dsa-coach"})
try:
data = json.load(urllib.request.urlopen(req, timeout=25))
qs = data[0]["result"]["data"]["json"]["questions"]
except Exception as e:
print(json.dumps({"_error": str(e)})); sys.exit(0)
if not qs:
break
for x in qs:
ups = x.get("upvotes") or []
recent = max(ups, key=lambda u: (u.get("approxAskedOn") or ""), default=None)
out.append({
"title": x.get("title"),
"type": x.get("defaultInterviewType"),
"companies": sorted({u.get("company") for u in ups if u.get("company")}),
"level": (recent.get("level") if recent else None),
"askedOn": (recent.get("approxAskedOn") if recent else None),
"link": x.get("detailsLink"),
"statement": x.get("description"),
})
for r in out:
print(json.dumps(r))
PY
Each output line is one normalized question: {title, type, companies[], level, askedOn, link, statement}. The list is already ordered freshest-first (recentAndPopular).
Error handling: If the only output is a line containing _error, or there is no output at all, tell the user the feed could not be reached right now (show the error briefly) and stop — do not fall back to the static curricula (that is suggest-problem's job).
Working from the normalized list, in order:
title matches Leetcode <NNN>. (or LeetCode #<NNN>), extract <NNN> and drop it if a solved LeetCode file with that number exists.(possibly solved — not in your folders by name) in the output.$ARGUMENTS is non-empty). Keep only questions whose companies[] contains the requested company (case-insensitive substring match). If nothing matches, say so and suggest re-running without the company filter — then stop.Pick the FIRST remaining (freshest) question. Present it like a fresh interview problem. Do NOT give hints, approach, or solution unless the user explicitly asks (same rule as suggest-problem).
Format:
Recently asked · [companies, comma-joined] · [level] · ~[askedOn date] · community feed
Problem: [title] Type: [type] Maps to: [LeetCode #NNN if the title is a Leetcode problem, else "not in your bundled curricula (fresh)"] Asked at: [companies, comma-joined]
Problem Statement: [statement]
After presenting, add one line:
This was pulled live for your practice and not saved. Solved it? Use
add-problem <file>to record it.
$ARGUMENTS
Searches MemPalace before answering questions about past work, people, projects, or prior decisions. Returns verbatim stored content instead of guessing from model memory.
Guides Payload CMS config (payload.config.ts), collections, fields, hooks, access control, APIs. Debugs validation errors, security, relationships, queries, transactions, hook behavior.
Implements vector databases with Pinecone, Weaviate, Qdrant, Milvus, pgvector for semantic search, RAG, recommendations, and similarity systems. Optimizes embeddings, indexing, and hybrid search.
npx claudepluginhub arkajyotiadhikary/dsa-coach --plugin dsa-coach