Claude Code JS — Git skill for Claude Code
GitHub Repo stars Claude Code SDK for Javascript & Typescript JS/TS SDK.
How to install Claude Code JS
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open s-soroosh/claude-code-js and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Claude Code JS does
A JavaScript SDK for integrating with Claude Code, Anthropic's official CLI tool for Claude.
Alternatives in Git
- Analysis Claude Code — GitHub Repo stars Complete reverse engineering research and analysis of Claude Code v1.0.33 Reverse engineerin 35k ★
- n8n MCP — GitHub Repo stars MCP for Claude Desktop/Code to build n8n workflows n8n workflow integration 15.5k ★
- Claude Relay Service — GitHub Repo stars Self-built Claude code mirror service supporting multi-account switching Relay service 9.9k ★
README
Claude Code JS
A JavaScript SDK for integrating with Claude Code, Anthropic's official CLI tool for Claude.
Overview
This project provides a JavaScript/TypeScript SDK that allows developers to programmatically interact with Claude Code, enabling AI-powered software engineering capabilities in their applications.
Installation
npm install claude-code-js
or with yarn:
yarn add claude-code-js
Quick Start
Basic Setup
import { ClaudeCode } from 'claude-code-js';
// Initialize the SDK
const claude = new ClaudeCode({
apiKey: process.env.CLAUDE_API_KEY, // Optional: if already logged in
model: 'claude-3-sonnet', // Optional: specify model
workingDirectory: './my-project', // Optional: set working directory
verbose: false, // Optional: enable verbose logging
oauth: { // Optional: OAuth credentials for token refresh
accessToken: "ACCESS_TOKENID",
refreshToken: "REFRESH_TOKEN",
expiresAt: EXPIRES_AT_VALUE
}
});
Example Usage
Single Chat with Claude
// Send a chat message to Claude with a prompt
const response = await claude.chat({
prompt: 'Explain this error: TypeError: Cannot read property of undefined',
systemPrompt: 'You are a helpful coding assistant', // Optional
appendSystemPrompt: 'Keep explanations concise' // Optional
});
if (response.success) {
console.log('Result:', response.message.result);
console.log('Session ID:', response.message.session_id);
console.log('Cost:', response.message.cost_usd);
} else {
console.error('Error:', response.error.message);
}
Sessions for Multi-turn Conversations
// Create a new session for ongoing conversations
const session = claude.newSession();
// Start the conversation
const firstMessage = await session.prompt({
prompt: 'What is 2 + 2?',
systemPrompt: 'You are expert at math. Always return a single line of text in format: equation = result'
});
...
Related Skills
Claude Hooks
by John Lindquist - A TypeScript-based system for configuring and customizing Claude Code hooks with a powerfu
TypeScript Quality Hooks
by bartolli - Quality check hook for Node.js TypeScript projects with TypeScript compilation. ESLint auto-fixi
Patdown
Block, steer, and "fuzzy lint" with Jev to make agents follow your rules and conventions. CLI, github action,
Pre Commit Check
コミット前の包括的なコードチェック(アーキテクチャ、セキュリティ、TypeScript)
Monochromatic
TypeScript and Rust monorepo: Claude Code and Pi coding-agent plugins, a minimal MCP stdio server framework, c
Polyglot Idiom
Run a per-language idiom review against a diff, PR, or branch for Java, C++, C#, Ruby, or PHP code — checkpoin
Related Agents
JavaScript Testing Patterns
Comprehensive guide for implementing robust testing strategies in JavaScript/TypeScript applications... - wsho
UI Engineer
Frontend specialist in modern JavaScript/TypeScript frameworks, responsive design, and component-driven archit
Tauri Rust Expert
Use this agent when working with Tauri applications, Rust backend development, Tauri plugins, cross-platform d