Introduction¶
When conducting programming sessions with agents like DeepSeek Harness (DSH), Claude Code, or Cursor, screenshots, validation scripts, temporary downloads, and intermediate artifacts often pile up at the top level of the working directory. After a few days, there are hundreds of top-level entries and several GB in size, yet you dare not delete them—the mess isn’t just about size, but granularity: small files sit alongside source code and documents at the same level, making it unclear which images are still useful. Another common issue is finalizing names before starting work. Since sessions may cover multiple topics, folder names may not match the actual content weeks later.
Below is an introduction to the community plugin dsh-session-artifacts (GitHub: feely0208/dsh-session-artifacts, Maintainer: feely0208, Category: Memory). It turns “a dedicated folder for every session, rename based on actual content upon completion, and refresh index” into a repeatable workflow. It is distributed as a skill plugin with DSH, but the three scripts are pure bash and do not depend on DSH, allowing them to be used directly in other agent environments.
What is This¶
Session Artifact Aggregation and Naming: By default, under ~/会话产物 (can be overridden via the SESS_ROOT environment variable), a dedicated directory is created for each session. Screenshots, scripts, temporary files, etc., within the session are placed in this directory rather than scattered across the workspace root, /tmp, or the $HOME root. Upon completion, sess-rename.sh is used to rename the folder based on the actual completed content (the script retains the original date prefix), followed by sess-index.sh to generate or refresh INDEX.md for easier post-hoc retrieval.
The npm package name is @deepwhale-cn/dsh-session-artifacts, current version 0.1.0, license MIT; requires DSH >=0.1.0-rc.6 (see package.json).
Two Problems It Solves¶
Scattered Artifacts¶
When multiple sessions share a working directory, the top level mixes massive amounts of screenshots, multiple session artifact directories, and actual source code and build tools. These files are often not in version control, and deleting them incorrectly is unrecoverable, resulting in a situation where “the whole directory is left there but nobody dares to touch it.”
Names Don’t Match Content¶
Naming is often completed “before starting work,” while content is only determined “after finishing work”; for single sessions with multiple topics or handovers weeks later, it is difficult to recall exactly what was done just by looking at the folder name. The plugin’s approach is two-stage naming: use a rough temporary name when starting, and rename based on the main thread upon completion. The folder name serves as the index key, the README.md within the session directory lists the full inventory, and INDEX.md acts as the master table.
Core Features¶
1. Aggregation: One Folder Per Session¶
Directory structure example (from README):
~/会话产物/
2026-10-11-律师端UI定稿与v0.1.12发版/
2026-10-10-深鲸画布上架插件市场/
2026-10-09-鸿蒙涉外文书排版/
INDEX.md
_归档/
2. Naming: Temporary Name → Cleanup Rename¶
| Stage | Action |
|---|---|
| When starting | sess.sh <keyword> creates the folder; a rough name is fine |
| When finishing | Review the actual session content, sess-rename.sh --apply <old> <new> to rename |
3. Indexing¶
sess-index.sh refreshes INDEX.md. The table includes date, session name, size, file count, summary, etc., facilitating searches months later.
Installation and Activation¶
As a DSH Plugin¶
Installation command (from README):
dsh plugin add @deepwhale-cn/dsh-session-artifacts
After installation, restart DSH, and the skill is automatically available.
The plugin runs under the permissions of the current DSH process; it is recommended to verify the source code and MIT license on the GitHub repository before installation to ensure compliance with your environment policies.
Using Only Bash Scripts¶
The three scripts are located in the repository’s bin/: sess.sh, sess-rename.sh, sess-index.sh. The README explains that bin/*.sh can be copied to a directory in your PATH (e.g., /usr/local/bin/). They can be used independently even without DSH installed.
Typical Usage¶
When the session needs to save files for the first time, create a dedicated folder (idempotent; repeated calls on the same day reuse the same directory):
DIR=$(sess.sh 律师端辉光)
echo "$DIR"
# → e.g. /Users/you/会话产物/2026-10-11-律师端辉光
Rename based on actual content upon completion (retains date prefix):
sess-rename.sh --apply 律师端辉光 律师端UI定稿与v0.1.12发版
Refresh index:
sess-index.sh
# → Refreshed ~/会话产物/INDEX.md
Command Quick Reference¶
| Command | Function |
|---|---|
sess.sh <topic> |
Create or reuse today’s directory and print the path |
SESS_NEW=1 sess.sh <topic> |
Force creation of a new one on the same day (suffix -2, -3, etc.) |
sess-rename.sh --list |
List all session folders |
sess-rename.sh --apply <old> <new> |
Rename (fuzzy matching; refuses duplicates) |
sess-rename.sh --apply <old> <new> --dry |
Preview the rename result |
sess-index.sh |
Refresh INDEX.md |
Naming suggestions (from README): Verb + Object, prioritize the main thread; multiple parallel topics can use +; do not stuff in dates (the script retains them); avoid generic words like “work,” “misc,” “temp.” For multi-topic sessions, take the main thread for the folder name and write details in the session directory’s README.md.
Applicable Scenarios and Notes¶
Suitable for: Teams or individuals who have used agents for programming long-term, have high volumes of session output files, and need to leave traces or handovers by time and topic; scenarios in law, finance, medical, etc., that require traceable work records. Organized, searchable session directories can serve as audit-friendly infrastructure.
Environment: DeepSeek Harness (plugin installed), Claude Code / Codex / Cursor (scripts only), macOS / Linux; Windows requires WSL or Git Bash (scripts use bash arrays and [[ ]]).
Notes: The artifact root directory defaults to ~/会话产物, which can be changed using SESS_ROOT. The scripts operate on the local file system with permissions consistent with the user running DSH or executing the scripts; please review the repository code yourself before installing the plugin or copying scripts.
Conclusion¶
dsh-session-artifacts uses extremely low-cost commands to break down “scattered artifacts” and “can’t remember” into three steps: aggregation, completion renaming, and index refreshing. It can serve as a DSH Memory category skill plugin, or the three bash scripts can be used independently in any agent workflow.
- Community Directory Page: https://www.skillhub.cn/plugins/feely0208/dsh-session-artifacts
- Source Code and Full Documentation: https://github.com/feely0208/dsh-session-artifacts
The DSH ecosystem adopts the philosophy of “everything is a plugin”; community directories like SkillHub are independent sites and have no official affiliation with DeepSeek / High-Flyer.