name: langchain-chat-prompt-template
description: Guide to using ChatPromptTemplate and MessagesPlaceholder in LangChain for conversational AI. Use when building chatbots, conversational interfaces, or AI assistants that need to maintain conversation history.
AI 编码 Prompt Skill
描述
This is handy because you don’t need to manually construct message objects — the template handles it...
类型
类型: AI 编码
评分: 60/100
Prompt
This is handy because you don’t need to manually construct message objects — the template handles it for you. When you’re working with chat-based models, you often want to include conversation history (or some sequence of messages). MessagesPlaceholder acts as a stand-in for a dynamic list of messages you’ll provide at runtime. Imagine we’re building a career coach bot that remembers previous questions and answers: from langchain_core.prompts import ChatPromptTemplate, MessagesPlaceholder from langchain_core.messages import HumanMessage, AIMessage chat_prompt = ChatPromptTemplate.fro
1---2name: modbender-skill-library-mcp-langchain-chat-prompt-template3description: ---4---5---6name: langchain-chat-prompt-template7description: Guide to using ChatPromptTemplate and MessagesPlaceholder in LangChain for conversational AI. Use when building chatbots, conversational interfaces, or AI assistants that need to maintain conversation history.8---910# AI 编码 Prompt Skill1112## 描述13This is handy because you don’t need to manually construct message objects — the template handles it...1415## 类型16- 类型: AI 编码17- 评分: 60/1001819## Prompt20```21This is handy because you don’t need to manually construct message objects — the template handles it for you. When you’re working with chat-based models, you often want to include conversation history (or some sequence of messages). MessagesPlaceholder acts as a stand-in for a dynamic list of messages you’ll provide at runtime. Imagine we’re building a career coach bot that remembers previous questions and answers: from langchain_core.prompts import ChatPromptTemplate, MessagesPlaceholder from langchain_core.messages import HumanMessage, AIMessage chat_prompt = ChatPromptTemplate.fro22```2324## 来源信息25- 来源: N/A26- 原始链接: https://mirascope.com/blog/langchain-prompt-template27- 作者: N/A28- 互动: 0 赞2930## 元数据31- 收集时间: 2026-01-30T20:48:50.62504132- Prompt 类型: AI 编码33- 质量分数: 60/1003435---3637*Skill generated by Clawdbot*3839---40> Source: [modbender/skill-library-mcp](https://github.com/modbender/skill-library-mcp) — distributed by [TomeVault](https://tomevault.io).41<!-- tomevault:4.0:skill_md:2026-06-16 -->
Run npx skillmds@latest add tomevault-io/modbender-skill-library-mcp-langchain-chat-prompt-template in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
--- It is listed under AI & ML on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Independent scanners report: SkillSpector: PASS, Skill Scanner: PASS. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
tomevault-io (@tomevault-io) published this skill. Their other Agent Skills are listed on their SkillMD profile.