$npx -y skills add langchain-ai/deepagents --skill rememberReview the current conversation and capture valuable knowledge — best practices, coding conventions, architecture decisions, workflows, and user feedback — into persistent memory (AGENTS.md) or reusable skills. Use when the user says: (1) remember this, (2) save what we learned,
| 1 | Review our conversation and capture valuable knowledge. Focus especially on **best practices** we discussed or discovered—these are the most important things to preserve. |
| 2 | |
| 3 | ## Step 1: Identify Best Practices and Key Learnings |
| 4 | |
| 5 | Scan the conversation for: |
| 6 | |
| 7 | ### Best Practices (highest priority) |
| 8 | - **Patterns that worked well** - approaches, techniques, or solutions we found effective |
| 9 | - **Anti-patterns to avoid** - mistakes, gotchas, or approaches that caused problems |
| 10 | - **Quality standards** - criteria we established for good code, documentation, or processes |
| 11 | - **Decision rationale** - why we chose one approach over another |
| 12 | |
| 13 | ### Other Valuable Knowledge |
| 14 | - Coding conventions and style preferences |
| 15 | - Project architecture decisions |
| 16 | - Workflows and processes we developed |
| 17 | - Tools, libraries, or techniques worth remembering |
| 18 | - Feedback I gave about your behavior or outputs |
| 19 | |
| 20 | ## Step 2: Decide Where to Store Each Learning |
| 21 | |
| 22 | For each best practice or learning, choose the right destination: |
| 23 | |
| 24 | ### -> Memory (AGENTS.md) for preferences and guidelines |
| 25 | Use memory when the knowledge is: |
| 26 | - A preference or guideline (not a multi-step process) |
| 27 | - Something to always keep in mind |
| 28 | - A simple rule or pattern |
| 29 | |
| 30 | **Global** (`~/.deepagents/agent/AGENTS.md`): Universal preferences across all projects |
| 31 | **Project** (`.deepagents/AGENTS.md`): Project-specific conventions and decisions |
| 32 | |
| 33 | ### -> Skill for reusable workflows and methodologies |
| 34 | **Create a skill when** we developed: |
| 35 | - A multi-step process worth reusing |
| 36 | - A methodology for a specific type of task |
| 37 | - A workflow with best practices baked in |
| 38 | - A procedure that should be followed consistently |
| 39 | |
| 40 | Skills are more powerful than memory entries because they can encode **how** to do something well, not just **what** to remember. |
| 41 | |
| 42 | ## Step 3: Create Skills for Significant Best Practices |
| 43 | |
| 44 | If we established best practices around a workflow or process, capture them in a skill. |
| 45 | |
| 46 | **Example:** If we discussed best practices for code review, create a `code-review` skill that encodes those practices into a reusable workflow. |
| 47 | |
| 48 | ### Skill Location |
| 49 | `~/.deepagents/agent/skills/<skill-name>/SKILL.md` |
| 50 | |
| 51 | ### Skill Structure |
| 52 | ``` |
| 53 | skill-name/ |
| 54 | ├── SKILL.md (required - main instructions with best practices) |
| 55 | ├── scripts/ (optional - executable code) |
| 56 | ├── references/ (optional - detailed documentation) |
| 57 | └── assets/ (optional - templates, examples) |
| 58 | ``` |
| 59 | |
| 60 | ### SKILL.md Format |
| 61 | ```markdown |
| 62 | --- |
| 63 | name: skill-name |
| 64 | description: "What this skill does AND when to use it. Include triggers like 'when the user asks to X' or 'when working with Y'. This description determines when the skill activates." |
| 65 | --- |
| 66 | |
| 67 | # Skill Name |
| 68 | |
| 69 | ## Overview |
| 70 | Brief explanation of what this skill accomplishes. |
| 71 | |
| 72 | ## Best Practices |
| 73 | Capture the key best practices upfront: |
| 74 | - Best practice 1: explanation |
| 75 | - Best practice 2: explanation |
| 76 | |
| 77 | ## Process |
| 78 | Step-by-step instructions (imperative form): |
| 79 | 1. First, do X |
| 80 | 2. Then, do Y |
| 81 | 3. Finally, do Z |
| 82 | |
| 83 | ## Common Pitfalls |
| 84 | - Pitfall to avoid and why |
| 85 | - Another anti-pattern we discovered |
| 86 | ``` |
| 87 | |
| 88 | ### Key Principles |
| 89 | 1. **Encode best practices prominently** - Put them near the top so they guide the entire workflow |
| 90 | 2. **Concise is key** - Only include non-obvious knowledge. Every paragraph should justify its token cost. |
| 91 | 3. **Clear triggers** - The description determines when the skill activates. Be specific. |
| 92 | 4. **Imperative form** - Write as commands: "Create a file" not "You should create a file" |
| 93 | 5. **Include anti-patterns** - What NOT to do is often as valuable as what to do |
| 94 | |
| 95 | ## Step 4: Update Memory for Simpler Learnings |
| 96 | |
| 97 | For preferences, guidelines, and simple rules that don't warrant a full skill: |
| 98 | |
| 99 | ```markdown |
| 100 | ## Best Practices |
| 101 | - When doing X, always Y because Z |
| 102 | - Avoid A because it leads to B |
| 103 | ``` |
| 104 | |
| 105 | Use `edit_file` to update existing files or `write_file` to create new ones. |
| 106 | |
| 107 | ## Step 5: Summarize Changes |
| 108 | |
| 109 | List what you captured and where you stored it: |
| 110 | - Skills created (with key best practices encoded) |
| 111 | - Memory entries added (with location) |