csharpfritz/squadui/nodejs-api-client-caching-2
Claude Code and agent skill by csharpfritz/squadui
- community
Checking that the SKILL.md file is still in the repository.
Pattern for building Node.js API clients with TTL-based caching and no external dependencies
Install
npx vskill@latest install csharpfritz/squadui/nodejs-api-client-caching-2SKILL.md
Context
When building API clients in Node.js (especially VS Code extensions or CLI tools that must stay zero/low-dependency), use the built-in https module with a simple TTL cache. This avoids polyfill issues with fetch in CommonJS environments and keeps the dependency footprint minimal.
Patterns
TTL Cache with Forced Refresh
Store fetched data alongside a fetchedAt timestamp. Check expiry on access. Expose forceRefresh parameter and invalidateCache() method for external triggers (e.g., file watchers).
Node.js HTTPS GET with Promise Wrapper
Wrap https.request in a typed Promise. Set User-Agent (required by GitHub API), handle status codes, and parse JSON response.
Graceful Pagination
When paginating API results, catch errors per-page. If a later page fails, return the pages already fetched rather than losing everything.
Anti-Patterns
- Using `node-fetch` or `axios` in zero-dep projects — Use
httpsmodule instead. - Global mutable cache — Keep cache as instance state so tests can create isolated instances.
- Infinite cache without invalidation — Always provide
invalidateCache()and TTL expiry. - Tight coupling to auth mechanism — Accept token via constructor/setter, don't import VS Code APIs directly.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryChecking.ai-team/skills/nodejs-api-client-caching/SKILL.md
Popularity
- Repository stars
- 16
- Repository forks
- 4
- 7-day trend score
- 14
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 16 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/csharpfritz/squadui/nodejs-api-client-caching-2)