framework
HTTP and cross-cutting behavior for the CDA SDK — request.js, fetch retries, plugins, runtime http/localstorage.
by contentstack★ 35 GitHub stars
Install framework in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
About this skill
Framework skill — HTTP / transport / runtime
The SDK isolates networking and retries in src/core/lib/request.js, with platform-specific fetch and storage under src/runtime/.
Key modules
| File / area | Responsibility |
|---|---|
src/core/lib/request.js |
Builds query string from stack requestParams, sets headers (X-User-Agent, content type), fetchRetry, integrates stack.plugins (onRequest / onResponse), parses JSON, maps HTTP errors to rejection objects |
src/core/lib/utils.js |
Merge/deep helpers and shared utilities used by stack and modules |
src/core/stack.js |
Default fetchOptions (retry policy, logHandler), merges user options, constructs requestParams for calls |
src/runtime/node/http.js, web/http.js, etc. |
Platform fetch implementation wired via webpack alias runtime/http.js |
src/runtime/*/localstorage.js |
Cache provider storage for each target |
When to change this layer
- Retry policy, status-based retry, timeout defaults →
request.js/stack.js(fetchOptions) and JSDoc onStack. - Headers, user-agent format, query serialization →
request.js(keep backward compatible for CDN query shapes). - New global hook → extend plugin contract consistently in
request.js. - New platform → add
src/runtime/<platform>/, webpack config, and package entry fields if needed.
Tests
- Extend
test/ortest/typescript/when changing request behavior; many suites loaddist/node/contentstack.js— runnpm run buildaftersrc/edits.
Rule shortcut
.cursor/rules/javascript.mdcfor style; CDA semantics in.cursor/rules/contentstack-javascript-cda.mdc
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
FAQ
What does the framework skill do?
HTTP and cross-cutting behavior for the CDA SDK — request.js, fetch retries, plugins, runtime http/localstorage.
How do I install the framework skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the framework skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…