一键导入
my-skill
INVOKE THIS SKILL when building ANY Deep Agents application. Covers create_deep_agent(), harness architecture, SKILL.md format, and configuration options.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
INVOKE THIS SKILL when building ANY Deep Agents application. Covers create_deep_agent(), harness architecture, SKILL.md format, and configuration options.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Fetch, categorize, and summarize GitHub Trending projects across daily, weekly, and monthly spans. Use when a user asks for "trending projects", "latest hot repos", or a "summary of GitHub trends" to provide a structured, categorised report with full hyperlinking. Supports Markdown, HTML (Pinterest design), or both output formats, with optional Obsidian vault storage.
Turn a local folder or GitHub repository into an interactive browser-based course that explains how the codebase works for non-expert programmers and AI-assisted builders. Use when a user asks to make a course, tutorial, walkthrough, learning guide, codebase explanation, or interactive lesson from a project.
Converts a PRD or broad technical requirement into an AI-executable agile workflow with cards, checklists, branch-diff mapping, review gates, and a final comparison report. Use when the user wants PRD review, agile card decomposition, AI execution tracking, implementation branch review, or PRD-to-code traceability.
Two complementary Bezos heuristics in one skill. (A) Two-Way Door — classify decisions by reversibility; reversible = decide fast with 70% info, irreversible = decide slow with 90% info. (B) Regret Minimization — for life-defining choices, project to age 80 and pick what minimizes regret. Use Two-Way Door triggers on Chinese 决策瘫痪 / 反复纠结小事 / 开了三次会还没定 / 大事小事一样慢; Regret Min triggers on 离职 / 创业 / 移民 / 结婚 / 生育 / 转行 / 重大决定 / 这辈子. Especially when team applies identical heavy process to all decisions (need Two-Way), or when user faces once-in-a-decade pivot where rational analysis ties (need Regret Min). Do NOT misclassify One-Way as Two-Way (most expensive mistake), use Regret Min for daily decisions (age-80 view on "what to eat" is meaningless), or run Regret Min in heated emotion (cool 24-48h first to avoid romanticizing risk).
Use BEFORE selecting any other decision framework — Cynefin (kuh-NEV-in) classifies WHICH framework fits the current situation across 5 domains (Clear / Complicated / Complex / Chaotic / Confused). Triggers when user is about to apply a method and the fit feels off, asks meta-questions like "should we follow SOP or explore?", or when same approach that worked last time seems wrong now. Also use after failure when "the method was right but the situation didn't match", or when team argues over deterministic-plan-vs-experimentation. Especially valuable at the start of major decisions to avoid using the wrong hammer for the nail. Do NOT use for trivial classified decisions (don't run Cynefin for "what to eat for lunch"), true Chaotic situations needing immediate stabilizing action (act first, classify later), or teams unfamiliar with the model (use simpler known/unknown binary).
Use when user reports overwhelm from too many tasks, asks for week/sprint/OKR planning help, or describes spending 'all day firefighting' while long-term projects stall. Triggers on Chinese phrases 太多事 / 不知道先做哪个 / 排不过来 / 周计划 / sprint planning / 救火 / 优先级 / overwhelm / 焦虑 / 做不完 / todo 列表炸了, and explicit task triage requests. Especially valuable when waiting list has 15+ pending items, or when user says "重要的事一直推不动 / 都在做紧急的事". Do NOT use for small lists (<5 items just sort by deadline), team-level responsibility assignment (use RAPID/DACI from backlog), or when importance needs quantitative weighting (use weighted decision matrix).
| name | Deep Agents Core |
| description | INVOKE THIS SKILL when building ANY Deep Agents application. Covers create_deep_agent(), harness architecture, SKILL.md format, and configuration options. |
The agent harness provides these capabilities automatically - you configure, not implement.
| Use Deep Agents When | Use LangChain's create_agent When |
|---|---|
| Multi-step tasks requiring planning | Simple, single-purpose tasks |
| Large context requiring file management | Context fits in a single prompt |
| Need for specialized subagents | Single agent is sufficient |
| Persistent memory across sessions | Ephemeral, single-session work |
| If you need to... | Middleware | Notes |
|---|---|---|
| Track complex tasks | TodoListMiddleware | Default enabled |
| Manage file context | FilesystemMiddleware | Configure backend |
| Delegate work | SubAgentMiddleware | Add custom subagents |
| Add human approval | HumanInTheLoopMiddleware | Requires checkpointer |
| Load skills | SkillsMiddleware | Provide skill directories |
| Access memory | MemoryMiddleware | Requires Store instance |
@tool def get_weather(city: str) -> str: """Get the weather for a given city.""" return f"It is always sunny in {city}"
agent = create_deep_agent( model="claude-sonnet-4-5-20250929", tools=[get_weather], system_prompt="You are a helpful assistant" )
config = {"configurable": {"thread_id": "user-123"}} result = agent.invoke({ "messages": [{"role": "user", "content": "What's the weather in Tokyo?"}] }, config=config)
</python>
<typescript>
Create a basic deep agent with a custom tool and invoke it with a user message.
```typescript
import { createDeepAgent } from "deepagents";
import { tool } from "@langchain/core/tools";
import { z } from "zod";
const getWeather = tool(
async ({ city }) => `It is always sunny in ${city}`,
{ name: "get_weather", description: "Get weather for a city", schema: z.object({ city: z.string() }) }
);
const agent = await createDeepAgent({
model: "claude-sonnet-4-5-20250929",
tools: [getWeather],
systemPrompt: "You are a helpful assistant"
});
const config = { configurable: { thread_id: "user-123" } };
const result = await agent.invoke({
messages: [{ role: "user", content: "What's the weather in Tokyo?" }]
}, config);
Configure a deep agent with all available options including subagents, skills, and persistence.
```python
from deepagents import create_deep_agent
from deepagents.backends import FilesystemBackend
from langgraph.checkpoint.memory import MemorySaver
from langgraph.store.memory import InMemoryStore
agent = create_deep_agent( name="my-assistant", model="claude-sonnet-4-5-20250929", tools=[custom_tool1, custom_tool2], system_prompt="Custom instructions", subagents=[research_agent, code_agent], backend=FilesystemBackend(root_dir=".", virtual_mode=True), interrupt_on={"write_file": True}, skills=["./skills/"], checkpointer=MemorySaver(), store=InMemoryStore() )
</python>
<typescript>
Configure a deep agent with all available options including subagents, skills, and persistence.
```typescript
import { createDeepAgent, FilesystemBackend } from "deepagents";
import { MemorySaver, InMemoryStore } from "@langchain/langgraph";
const agent = await createDeepAgent({
name: "my-assistant",
model: "claude-sonnet-4-5-20250929",
tools: [customTool1, customTool2],
systemPrompt: "Custom instructions",
subagents: [researchAgent, codeAgent],
backend: new FilesystemBackend({ rootDir: ".", virtualMode: true }),
interruptOn: { write_file: true },
skills: ["./skills/"],
checkpointer: new MemorySaver(),
store: new InMemoryStore()
});
Every deep agent has access to:
write_todos - Track multi-step tasksls, read_file, write_file, edit_file, glob, greptask - Spawn specialized subagents
skills/
└── my-skill/
├── SKILL.md # Required: main skill file
├── examples.py # Optional: supporting files
└── templates/ # Optional: templates
---
name: my-skill
description: Clear, specific description of what this skill does
---
# Skill Name
## Overview
Brief explanation of the skill's purpose.
## When to Use
Conditions when this skill applies.
## Instructions
Step-by-step guidance for the agent.
| Skills | Memory (AGENTS.md) |
|---|---|
| On-demand loading | Always loaded at startup |
| Task-specific instructions | General preferences |
| Large documentation | Compact context |
| SKILL.md in directories | Single AGENTS.md file |
agent = create_deep_agent( backend=FilesystemBackend(root_dir=".", virtual_mode=True), skills=["./skills/"], checkpointer=MemorySaver() )
result = agent.invoke({ "messages": [{"role": "user", "content": "Use the python-testing skill"}] }, config={"configurable": {"thread_id": "session-1"}})
</python>
<typescript>
Set up an agent with skills directory and filesystem backend for on-demand skill loading.
```typescript
import { createDeepAgent, FilesystemBackend } from "deepagents";
import { MemorySaver } from "@langchain/langgraph";
const agent = await createDeepAgent({
backend: new FilesystemBackend({ rootDir: ".", virtualMode: true }),
skills: ["./skills/"],
checkpointer: new MemorySaver()
});
const result = await agent.invoke({
messages: [{ role: "user", content: "Use the python-testing skill" }]
}, { configurable: { thread_id: "session-1" } });
Load skill content into a Store backend for environments without filesystem access.
```python
from deepagents import create_deep_agent
from deepagents.backends import StoreBackend
from deepagents.backends.utils import create_file_data
from langgraph.store.memory import InMemoryStore
store = InMemoryStore()
..."""
store.put( namespace=("filesystem",), key="/skills/python-testing/SKILL.md", value=create_file_data(skill_content) )
agent = create_deep_agent( backend=lambda rt: StoreBackend(rt), store=store, skills=["/skills/"] )
</python>
</ex-skills-with-store-backend>
<boundaries>
### What Agents CAN Configure
- Model selection and parameters
- Additional custom tools
- System prompt customization
- Backend storage strategy
- Which tools require approval
- Custom subagents with specialized tools
### What Agents CANNOT Configure
- Core middleware removal (TodoList, Filesystem, SubAgent always present)
- The write_todos, task, or filesystem tool names
- The SKILL.md frontmatter format
</boundaries>
<fix-checkpointer-for-interrupts>
<python>
Interrupts require a checkpointer.
```python
# WRONG
agent = create_deep_agent(interrupt_on={"write_file": True})
# CORRECT
agent = create_deep_agent(interrupt_on={"write_file": True}, checkpointer=MemorySaver())
Interrupts require a checkpointer.
```typescript
// WRONG
const agent = await createDeepAgent({ interruptOn: { write_file: true } });
// CORRECT const agent = await createDeepAgent({ interruptOn: { write_file: true }, checkpointer: new MemorySaver() });
</typescript>
</fix-checkpointer-for-interrupts>
<fix-store-for-memory>
<python>
StoreBackend requires a Store instance for persistent memory across threads.
```python
# WRONG
agent = create_deep_agent(backend=lambda rt: StoreBackend(rt))
# CORRECT
agent = create_deep_agent(backend=lambda rt: StoreBackend(rt), store=InMemoryStore())
StoreBackend requires a Store instance for persistent memory across threads.
```typescript
// WRONG
const agent = await createDeepAgent({ backend: (config) => new StoreBackend(config) });
// CORRECT const agent = await createDeepAgent({ backend: (config) => new StoreBackend(config), store: new InMemoryStore() });
</typescript>
</fix-store-for-memory>
<fix-thread-id-for-conversations>
<python>
Use consistent thread_id to maintain conversation context across invocations.
```python
# WRONG: Each invocation is isolated
agent.invoke({"messages": [{"role": "user", "content": "Hi"}]})
agent.invoke({"messages": [{"role": "user", "content": "What did I say?"}]})
# CORRECT
config = {"configurable": {"thread_id": "user-123"}}
agent.invoke({"messages": [...]}, config=config)
agent.invoke({"messages": [...]}, config=config)
Use consistent thread_id to maintain conversation context across invocations.
```typescript
// WRONG: Each invocation is isolated
await agent.invoke({ messages: [{ role: "user", content: "Hi" }] });
await agent.invoke({ messages: [{ role: "user", content: "What did I say?" }] });
// CORRECT const config = { configurable: { thread_id: "user-123" } }; await agent.invoke({ messages: [...] }, config); await agent.invoke({ messages: [...] }, config);
</typescript>
</fix-thread-id-for-conversations>
<fix-frontmatter-required>
```markdown
# WRONG: Missing frontmatter in SKILL.md
# My Skill
This is my skill...
# CORRECT: Include YAML frontmatter
---
name: my-skill
description: Python testing best practices with pytest fixtures and mocking
---
# My Skill
This is my skill...
Skills require a proper backend to load from the filesystem.
```python
# WRONG: Skills won't load without proper backend
agent = create_deep_agent(skills=["./skills/"])
agent = create_deep_agent( backend=FilesystemBackend(root_dir=".", virtual_mode=True), skills=["./skills/"] )
</python>
</fix-backend-for-skills>
<fix-specific-skill-descriptions>
Use specific descriptions to help agents decide when to use a skill.
```markdown
# WRONG: Vague description
---
name: helper
description: Helpful skill
---
# CORRECT: Specific description
---
name: python-testing
description: Python testing best practices with pytest fixtures, mocking, and async patterns
---
Skills are not inherited by subagents - provide them explicitly.
```python
# WRONG: Custom subagents don't inherit skills
agent = create_deep_agent(
skills=["/main-skills/"],
subagents=[{"name": "helper", ...}] # No skills
)
agent = create_deep_agent( skills=["/main-skills/"], subagents=[{"name": "helper", "skills": ["/helper-skills/"], ...}] )
</python>
</fix-subagent-skills>