Imported skill _utils from langchain
Scanned 9/2/2026
Install to Claude Code
npx -y skills add majiayu000/claude-skill-registry --skill utils-bitwikiorg-skills-md-ae28fa79 --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Utils Bitwikiorg Skills Md Ae28fa79?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/majiayu000-utils-bitwikiorg-skills-md-ae28fa79)More formats (shields.io, HTML) on the badges page.
---
description: Imported skill _utils from langchain
name: _utils
signature: a23cbada440b01243619a6debd625a3c62c8b7271c74dc4b30fa58576e4b7f6d
source: /a0/tmp/skills_research/langchain/libs/deepagents/deepagents/middleware/_utils.py
---
"""Utility functions for middleware."""
from langchain_core.messages import SystemMessage
def append_to_system_message(
system_message: SystemMessage | None,
text: str,
) -> SystemMessage:
"""Append text to a system message.
Args:
system_message: Existing system message or None.
text: Text to add to the system message.
Returns:
New SystemMessage with the text appended.
"""
new_content: list[str | dict[str, str]] = list(system_message.content_blocks) if system_message else []
if new_content:
text = f"\n\n{text}"
new_content.append({"type": "text", "text": text})
return SystemMessage(content=new_content)
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!