langchain-local-dev-loop

Featured

Configure LangChain local development workflow with testing and mocks. Use when setting up dev environment, creating test fixtures with mocked LLMs, or establishing a rapid iteration workflow for LangChain apps. Trigger: "langchain dev setup", "langchain local development", "langchain testing", "langchain mock", "test langchain chains".

AI & Automation 2,926 stars 433 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# LangChain Local Dev Loop ## Overview Set up a productive local development workflow for LangChain: project structure, mocked LLMs for unit tests (no API calls), integration tests with real providers, and dev tooling. ## Project Structure ``` my-langchain-app/ ├── src/ │ ├── chains/ # LCEL chain definitions │ │ ├── summarize.ts │ │ └── rag.ts │ ├── tools/ # Tool definitions │ │ └── calculator.ts │ ├── agents/ # Agent configurations │ │ └── assistant.ts │ └── index.ts ├── tests/ │ ├── unit/ # Mocked tests (no API calls) │ │ └── chains.test.ts │ └── integration/ # Real API tests (CI gated) │ └── rag.test.ts ├── .env # API keys (git-ignored) ├── .env.example # Template for required vars ├── package.json ├── tsconfig.json └── vitest.config.ts ``` ## Step 1: Dev Dependencies ```bash set -euo pipefail npm install @langchain/core @langchain/openai langchain zod npm install -D vitest @types/node tsx dotenv typescript ``` ## Step 2: Vitest Configuration ```typescript // vitest.config.ts import { defineConfig } from "vitest/config"; export default defineConfig({ test: { include: ["tests/**/*.test.ts"], environment: "node", setupFiles: ["./tests/setup.ts"], testTimeout: 30000, }, }); ``` ```typescript // tests/setup.ts import "dotenv/config"; ``` ## Step 3: Unit Tests with Mocked LLM ```typescript // tests/unit/chains.test.ts import { describe,...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
1 years ago
Last Updated
yesterday
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category