1. Habit
  2. Skills
  3. LangChain Fundamentals skill
langchain-ai · 17K installs

LangChain Fundamentals skill
Runs by itself, PR touches agent code.

LangChain agents built the current way.

Install the LangChain Fundamentals skill and make it a habit: follow https://gethabit.dev/skills/langchain-ai/langchain-fundamentals.md

  1. 1Copy
  2. 2Paste into Claude Code, Codex or Cursor
  3. 3It runs by itself

17K installs1K starsMIT licenceSource on GitHub ↗

LangChain Fundamentals

by langchain-ai · 17K installs

The skill

The langchain fundamentals skill shows developers how to build LangChain agents with create_agent, define tools with @tool or tool(), add middleware for human approval and error handling, and get structured output.

Only when you ask.

The habit

LangChain agents built the current way.

↻ Runs by itselfPR touches agent code

How the habit works.
You don't have to.

Three questionsWhen does it start? How does it check its work? What does it remember?

One run, step by step.
Then it stops.

Stop ruleStops after one pull request and at most 10 agent files per run.

  1. 01

    Find agents

    The agent lists the agent and tool definitions in the change.

  2. 02

    Check construction

    Agents must use create_agent(), with middleware for custom flows.

  3. 03

    Check tools

    Each @tool or tool() needs a specific description and its Args.

  4. 04

    Check memory

    Agents that must remember need a checkpointer such as MemorySaver and a thread_id.

  5. 05

    Check limits

    invoke calls need recursion_limit so a run cannot loop forever.

  6. 06

    Check results

    Code reads the last entry of result messages, not result.content.

  7. 07

    Run tests

    It runs the test suite and logs the findings.

What it may do.
Nothing more.

Safe by defaultIt writes only in its own folder and asks you before anything goes out.

Is it for you?
Use it when it fits.

Quick checkRead both lists. If the left one sounds like you, the LangChain Fundamentals skill helps.

Use it when

  • ✓ Building a new LangChain agent
  • ✓ Defining tools for an agent
  • ✓ Adding approval middleware

Skip it when

  • – You use another agent framework
  • – You only need a single model call

Questions

LangChain Fundamentals skill, answered.

What about human approval in my agent?

The skill covers HumanInTheLoopMiddleware for approval flows. It needs a checkpointer and a thread_id.

Does it check structured output?

It knows response_format and with_structured_output(), but the hard checks focus on construction, tools, memory and limits.

Which models work?

create_agent accepts model strings or model instances, so the check does not depend on the provider.

How do I install the LangChain Fundamentals skill?

Copy the prompt at the top into your agent. It installs the skill from langchain-ai/langchain-skills and sets up the habit. Or run npx skills add langchain-ai/langchain-skills --skill langchain-fundamentals.

Is the LangChain Fundamentals skill free?

Yes. It is published under MIT. Habit is free too.

LangChain Fundamentals. Now as a habit.

Install the LangChain Fundamentals skill and make it a habit: follow https://gethabit.dev/skills/langchain-ai/langchain-fundamentals.md

  • Free
  • No account
  • Undo in one line

All langchain-ai skills →More code skills →

Works in

  • Claude Code
  • Codex
  • Cursor
  • ChatGPT
  • Claude app

Made by langchain-ai, published under MIT. Habit links to the original and never changes it. Is this your skill?

Copying didn't work here. Select the line and copy it by hand.