docs: add .agents/skills/axios-cache-interceptor.md and AI install guide#1212
Conversation
Co-authored-by: arthurfiorette <47537704+arthurfiorette@users.noreply.github.com>
arthurfiorette
left a comment
There was a problem hiding this comment.
Can you document on our install guide that we have skills that can be installed using https://github.com/vercel-labs/skills? Also put in the skill a link to our https://axios-cache-interceptor.js.org/llms.txt AIs can use to crawl.
Co-authored-by: arthurfiorette <47537704+arthurfiorette@users.noreply.github.com>
Done in a7045eb:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1212 +/- ##
=======================================
Coverage 98.77% 98.77%
=======================================
Files 20 20
Lines 3113 3113
Branches 299 299
=======================================
Hits 3075 3075
Misses 37 37
Partials 1 1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Adds an “AI / LLM Skills” entry point to the Getting Started guide and introduces a Skills-framework markdown “skill” document intended to give AI assistants a curated, up-to-date reference for axios-cache-interceptor.
Changes:
- Document a new “AI / LLM Skills” section in the Getting Started guide with an
npx skills add ...install command. - Add a new
.agents/skills/axios-cache-interceptor.mdskill file containing usage patterns, configuration reference, and examples.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| docs/src/guide/getting-started.md | Adds documentation for installing an AI/LLM “skill” for this library |
| .agents/skills/axios-cache-interceptor.md | Introduces a comprehensive skill doc with examples and configuration guidance |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| ## AI / LLM Skills | ||
|
|
||
| If you are using an AI coding assistant, you can install the axios-cache-interceptor skill | ||
| to give it up-to-date context about this library: | ||
|
|
| set(key, value, req) { | ||
| const ttlMs = | ||
| value.state === 'loading' | ||
| ? (req?.cache && typeof req.cache.ttl === 'number' ? req.cache.ttl : 60_000) | ||
| : (value.state === 'stale' && value.ttl) || (value.state === 'cached' && !canStale(value)) | ||
| ? value.createdAt + value.ttl! | ||
| : Date.now() + 60 * 60_000; | ||
|
|
||
| return client.set(`cache:${key}`, JSON.stringify(value), { PXAT: ttlMs }); |
Adds a concise, scannable skill reference for AI coding assistants at
.agents/skills/axios-cache-interceptor.md, and documents how to install it in the getting started guide.What's included
setupCache()with request deduplication exampleid,cached,stalefieldsttl,enabled,cachePredicate,staleIfError,hydrate,override,etag,varycache.update(delete + programmatic update),storage.remove/clearlocalStorage/sessionStorage, custom viabuildStorage(Redis example included)If-None-Match,Vary,Cache-Control/Expiresheader behaviour tabledebugcallbackhttps://axios-cache-interceptor.js.org/llms.txtadded to skill header so AI tools can crawl the full documentationdocs/src/guide/getting-started.mddocumentingnpx skills add axios-cache-interceptorvia the Skills framework📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.