kid0317/crewai_mas_demo/memory-save
Claude Code and agent skill by kid0317/crewai_mas_demo
- community
Checking that the SKILL.md file is still in the repository.
Use this skill to persist important information from the conversation to workspace files so it survives across sessions. Activate proactively (without waiting for user to say "remember this") when: - User expresses a preference or habit ("I prefer...", "always...", "don't...") - User corrects Agent behavior and states how it should work instead - A key fact emerges that matters for future sessions (project milestone, decision made, important date, contact info) - User approves an approach ("let's do it this way going forward") - Agent needs to save a work product (report, spec, review result) to workspace Do NOT activate for: one-time tasks, Agent's own reasoning, info already in user.md.
Install
npx vskill@latest install kid0317/crewai_mas_demo/memory-saveSKILL.md
memory-save:将内容写入 workspace 文件
概述
将内容持久化写入沙盒中的指定文件路径,确保跨 session 保留。
邮箱文件路径: /mnt/shared/mailboxes/{role}.json(已挂载到沙盒)
常用路径说明
| 角色 | 个人工作区路径 | 共享工作区路径 | |
|---|---|---|---|
| Manager | /workspace/ | /mnt/shared/ | |
| PM | /workspace/ | /mnt/shared/ |
❌ 禁止使用的方式(会导致内容截断)
绝对禁止通过 sandbox_execute_bash 以命令行参数形式传递文件内容:
原因:内容经过 JSON→shell 双重序列化,特殊字符会导致内容被截断, 但程序可能仍然返回 errcode=0,导致无声地写入了残缺内容。
✅ 强制使用的方式:sandbox_file_operations write
必须使用 `sandbox_file_operations(action="write", ...)` 写入文件。 内容通过 MCP 协议以 JSON 字段直接传递,完全绕过 shell,不存在截断问题。
⚠️ 强制执行要求(CRITICAL)
- 必须调用 `sandbox_file_operations(action="write", ...)` 实际写入文件
- 禁止直接返回"成功",必须先写入再验证
- 写入后必须 read-back 验证文件大小,确认内容完整
- 写入字节数为 0 或远小于预期内容长度时,必须视为失败并重试
sandbox_execute_bash仅允许用于非内容操作(如mkdir -p、pip install),严禁通过 bash 传递文件内容
执行步骤
第一步:直接使用 sandbox_file_operations 写入
调用 sandbox_file_operations 工具,参数如下:
action:"write"path:目标文件绝对路径content:完整文件内容(直接传入多行字符串,无需任何转义)
示例:
第二步:read-back 验证(必须执行)
- ✅ 文件字节数与内容长度匹配 → 成功
- ❌ 文件内容被截断 → 重试写入
示例调用
Manager 写验收结论
PM 写产品规格文档
备用方案(仅当 sandbox_file_operations write 不可用时)
⚠️ 注意:content 内容中如包含三引号"""字符,需将其替换为\"\"\",避免 Python 字符串提前终止。
注意:不得使用 sandbox_execute_bash 命令行传递内容,即便是备用方案也禁止。
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/memory-save/SKILL.md
Popularity
- Repository stars
- 109
- Repository forks
- 57
- 7-day trend score
- 24
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 17 May 2026, 5 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/kid0317/crewai_mas_demo/memory-save)