Help us improve
Share bugs, ideas, or general feedback.
From langchain-plugin
Initializes a new LangChain TypeScript project with Bun/NPM package init, core dependencies like @langchain/core and @langchain/openai, tsconfig.json, example ReAct agent, .env.example, and scripts.
npx claudepluginhub laurigates/claude-plugins --plugin langchain-pluginHow this skill is triggered — by the user, by Claude, or both
Slash command
/langchain-plugin:langchain-inithaikuThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Initialize a new LangChain TypeScript project with optimal configuration for building AI agents.
Guides tool selection (LangChain vs LangGraph vs Deep Agents) for agent building projects. Loaded first to determine framework choice, environment setup, and next skill.
Bootstraps new projects from scratch: gathers requirements for frontend SPAs, full-stack apps, APIs, CLI tools, libraries; researches latest best practices via WebSearch; creates blueprint; confirms; initializes with official CLI; sets up Claude Code agent system.
Scaffolds headless TypeScript agents using @openrouter/agent and Bun for CLI tools, API servers, queue workers, and pipelines—no terminal UI.
Share bugs, ideas, or general feedback.
Initialize a new LangChain TypeScript project with optimal configuration for building AI agents.
Detect the environment:
node --version - Node.js versionwhich bun - Check if Bun is available| Parameter | Description | Default |
|---|---|---|
project-name | Name of the project directory | Required |
mkdir -p $1 && cd $1
If Bun is available:
bun init -y
Otherwise:
npm init -y
Core packages:
# Package manager: bun or npm
bun add langchain @langchain/core @langchain/langgraph
bun add @langchain/openai # Default model provider
# Dev dependencies
bun add -d typescript @types/node tsx
Create tsconfig.json:
{
"compilerOptions": {
"target": "ES2022",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"esModuleInterop": true,
"strict": true,
"skipLibCheck": true,
"outDir": "dist",
"declaration": true
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist"]
}
mkdir -p src
Create src/agent.ts:
import { ChatOpenAI } from "@langchain/openai";
import { createReactAgent } from "@langchain/langgraph/prebuilt";
import { tool } from "@langchain/core/tools";
import { z } from "zod";
// Example tool
const greetTool = tool(
async ({ name }) => `Hello, ${name}!`,
{
name: "greet",
description: "Greet someone by name",
schema: z.object({
name: z.string().describe("The name to greet"),
}),
}
);
// Create the agent
const model = new ChatOpenAI({
model: "gpt-4o",
temperature: 0,
});
export const agent = createReactAgent({
llm: model,
tools: [greetTool],
});
// Run if executed directly
if (import.meta.url === `file://${process.argv[1]}`) {
const result = await agent.invoke({
messages: [{ role: "user", content: "Say hello to Claude" }],
});
console.log(result.messages[result.messages.length - 1].content);
}
Create .env.example:
# OpenAI (default)
OPENAI_API_KEY=sk-...
# Optional: Anthropic
# ANTHROPIC_API_KEY=sk-ant-...
# Optional: LangSmith tracing
# LANGCHAIN_TRACING_V2=true
# LANGCHAIN_API_KEY=ls__...
# LANGCHAIN_PROJECT=my-project
Add to package.json:
{
"scripts": {
"dev": "tsx watch src/agent.ts",
"start": "tsx src/agent.ts",
"build": "tsc",
"typecheck": "tsc --noEmit"
}
}
node_modules/
dist/
.env
*.log
Display success message with next steps:
.env.example to .env and add API keybun dev or npm run dev to startSuggest installing additional model providers if needed:
@langchain/anthropic for Claude@langchain/google-genai for Gemini