Community写作与编辑github.com

DDDFXYqiming/Agent_Extensions

Agent Skills & DeepSeek Harness (DSH) 扩展库:通用智能体技能(General_skills)+ DSH 标准插件(dsh-plugin),开箱即用的 AI Agent 能力增强集合。

Agent_Extensions 是什么?

Agent_Extensions is a Claude Code agent skill that agent Skills & DeepSeek Harness (DSH) 扩展库:通用智能体技能(General_skills)+ DSH 标准插件(dsh-plugin),开箱即用的 AI Agent 能力增强集合。.

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add DDDFXYqiming/Agent_Extensions

Installed? Explore more 写作与编辑 skills: steipete/notion, langchain-ai/langchain, bytedance/podcast-generation · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

Memory Management (DSH Edition)

Cross-session long-term memory: L1 index injection (visible every turn) + L2 environment facts + L3 task experience.

Trigger Timing

Reading (When to Look Up Memory)

  • At the start of a new task: if the task involves the local environment, tool configuration, specific tech stacks, or similar things done before → first memory_list to see what's available, then memory_read to retrieve relevant entries
  • When encountering difficulties / hitting obstacles: memory_read to check if there is a relevant SOP (keyword match against sops/ filenames or facts section)
  • Memory index in model prompt (memory:index): L1 existence index visible every turn — when related trigger words are seen, actively call memory_read/memory_list to get details

Writing (When to Consolidate Memory)

When a task is completed (or a phase is completed) and there is information validated by successful actions, call memory_write:

Can Write (must include evidence):

  • Environment-specific facts: paths, configurations, measured parameters, tool behavior (→ entry_type: fact)
  • Complex task experience: pain points that required multiple retries to succeed, hidden preconditions, stable steps (→ entry_type: sop)
  • General hard rules (→ also possible via memory_write sop or directly suggest maintaining [RULES])

Forbidden to Write (writing would be pollution):

  • ❌ Information without verification evidence (no action, no memory)
  • ❌ Model's inherent knowledge, reasoned guesses, unverified assumptions
  • ❌ Ephemeral state: timestamps, PIDs, temporary paths, one-time IDs
  • ❌ General common sense, log records, details of reasoning steps

Index Synchronization

  • memory_write automatically syncs the L1 index; manual operation is usually unnecessary
  • After manually modifying facts.md / sops/ files → memory_index to rebuild the index
  • When the index exceeds 30 lines: trim [RULES] (word-level edits, do NOT overwrite the full text)

Storage Layout

<home>/.dsh/memory/
├── memory_management_sop.md   L0 meta-rules (how to manage memory)
├── index.txt                  L1 index (≤30 lines: L2/L3 existence list + RULES)
├── facts.md                   L2 environment facts (## SECTION)
├── sops/*.md                  L3 task experience
└── file_access_stats.json     read frequency statistics

Tools

ToolPurpose
memory_listList all memory (facts + sops + index line count)
memory_readRead specified memory (index / fact topic / sop filename)
memory_writeWrite memory (fact/sop, evidence required)
memory_indexRebuild the L1 index automatic section

Principles

  1. Action Verification: No Execution, No Memory. Only write information that has been successfully verified.
  2. Minimum Sufficiency: Keep content as short as possible; only record information whose forgetting would lead to costly retries.
  3. Do Not Delete or Alter Verified Facts: You may compress or migrate, but never discard.
  4. Active Writing: Memory writes are always initiated by the model/user; the system will never automatically modify configurations or install plugins.

相关技能