# javascript-sdk

javascript-sdk teaches the agent to wire the inference.sh JavaScript/TypeScript client into your app: running AI apps, streaming progress and building agents in code.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 239 installs · ★ 31 repo stars
- Author: 101-skills
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/101-skills/superpowers/tree/HEAD/sdk/javascript-sdk/SKILL.md
- Updated: 2026-08-31
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/javascript-sdk

## What it does

This skill hands the agent a working map of `@inferencesh/sdk`, the JavaScript and TypeScript client for inference.sh. Covered: creating a client with a key, calling apps through `client.run`, following updates as a stream, uploads, and sessions that keep a worker warm between calls. A separate part deals with agents — either a template from your workspace or one assembled in code, with tools built through the tool builder and human approval on a call.

The package goes into the project with `npm install @inferencesh/sdk`; the skill itself arrives through `npx skills add`. Runtime is Node.js 18.0.0 or newer, or a browser that has fetch. A key looks like `inf_...` and belongs in `INFERENCE_API_KEY`, not in a source file.

A key left in browser code is readable by anyone, so frontend clients take a `proxyUrl` pointing at your own backend. Without that hop the key reaches every visitor of the page.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add 101-skills/superpowers --skill javascript-sdk -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/javascript-sdk/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/javascript-sdk/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add 101-skills/superpowers --skill javascript-sdk -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/javascript-sdk/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add 101-skills/superpowers --skill javascript-sdk -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/javascript-sdk/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install 101-skills/superpowers sdk/javascript-sdk/SKILL.md
```

2. **Manually: put the files in place**
- File: `.github/skills/javascript-sdk/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add 101-skills/superpowers --skill javascript-sdk -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/101-skills/superpowers --path sdk/javascript-sdk
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/javascript-sdk/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add 101-skills/superpowers --skill javascript-sdk -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/101-skills/superpowers/tree/HEAD/sdk/javascript-sdk/SKILL.md

## When to use it
- Call a ready-made AI app from a Node.js script and read the output
- Assemble an agent with custom tools and approval before each call
- Render generation progress inside a React component
- Upload a file picked in a browser form and pass it to an app
- Keep a worker alive across requests with a session

## Example prompts
- Add `@inferencesh/sdk` to this Next.js app and run `infsh/flux-schnell` with the prompt from the form
- Build an agent with a calculator tool and ask for approval before it runs
- Stream generation status into a React component

## Similar
- [javascript-expert](https://affpapa.org/en/nevibecode/skills/pcl-team-javascript-expert.md) — skill · 197 installs
- [javascript-typescript](https://affpapa.org/en/nevibecode/plugins/javascript-typescript.md) — plugin · ★ 42780 repo stars
- [spatie-javascript](https://affpapa.org/en/nevibecode/skills/spatie-javascript.md) — skill · 580 installs
- [neo4j-driver-javascript-skill](https://affpapa.org/en/nevibecode/skills/neo4j-driver-javascript-skill.md) — skill · 454 installs
- [updating-npm-package](https://affpapa.org/en/nevibecode/skills/updating-npm-package.md) — skill · 438 installs
- [sentry-sdk-upgrade](https://affpapa.org/en/nevibecode/skills/sentry-sdk-upgrade.md) — skill · 3200 installs

From the same set: [101-skills/superpowers](https://affpapa.org/en/nevibecode/by/101-skills/superpowers.md) — 81 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
