Juejin Hot List Skill v1.4.0: One CLI Call, Verified API, No Login
For developers building Agent skill packages, this post offers a concrete template: verify the unofficial API, keep deterministic tasks as CLI commands, and document what the API does not return. The pattern matters beyond Juejin because it prevents hallucinations and unpredictable behavior in any skill that talks to an undocumented endpoint.
The juejin-skills package now includes a hot-list command (v1.4.0) that answers natural-language requests like "look at today's Juejin frontend hot list" by running `node scripts/hot.mjs`. The script hits a public Juejin endpoint that needs no Cookie, maps fields for rank, title, author, heat, views, likes, collects, comments, and article link, and outputs either human-readable text or JSON for pipelines. The author first cross-checked endpoint documentation across sources, sent a live request, and recorded the verified field structure and date in the repo docs, rather than trusting memory or blog examples.
The article argues against wrapping every task in an "autonomous" Agent. A single GET with fixed mapping has no decision branches or memory, so packing it with Agent autonomy only adds uncertainty. Instead, the Agent's only job is translating natural language into a CLI command. The SPEC originally promised a summary field that the API does not return; after testing, the spec was corrected and explicitly states not to fabricate one. Similarly, the `type=new` parameter returns `Internal Server Error`, so it is kept in the parameter list but marked unverified rather than claim support.
A config merge bug shows why every nested default group needs an explicit shallow-merge line. Adding a `hot` group to `DEFAULTS` without updating `loadUserConfig` means a user override like `{"hot":{"defaultLimit":5}}` wipes out `type` and `maxLimit`, breaking `--limit` validation and returning an empty list. The default path never catches it; only an explicit override does. The fix is one line, but the lesson is to check merge logic whenever you add a nested group.
Using a CLI script for a deterministic task instead of an "autonomous Agent" keeps behavior predictable and reduces the chance of hallucinated decisions, a useful counterbalance to Agent-heavy tooling.
Verifying API fields before coding and correcting the spec from "should have" to "actually has" is a concrete way to prevent AI-generated hallucinations in downstream tools.
The config merge trap is a classic shallow-clone pitfall: default paths never exercise nested overrides, so any new configuration group needs a merge check and ideally a test to catch overwrites.