Stashのロゴ

Stash

コミュニティ
hamr0
stash

Stash session context [name]

概要

公開者hamr0
リポジトリliteagents
スキル名stash
スター
27
フォーク
4
同梱ファイル
指示のみ
ライセンスApache-2.0
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

    hamr0がGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキルStashをTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/hamr0/liteagents/tree/main/packages/ampcode/skills/stash
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/hamr0/liteagents.git /tmp/liteagents
mkdir -p .claude/skills
cp -r /tmp/liteagents/packages/ampcode/skills/stash .claude/skills/stash
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでStashを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあると、モデルが自動的にStashを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Stashは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、未使用のスキルにはコストがかかりません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Save session context for compaction recovery or handoffs.

Guardrails

  • Write only what the brief contains. The subagent expands the brief into a file; it does not research, re-derive, or infer. Every fact, number, SHA, path, and identifier in the stash comes from the brief verbatim — never invent, never round, never fill a gap with a plausible guess. Missing detail stays missing.
  • Escalate, never assume. Anything the subagent cannot do, cannot verify, or that this spec does not cover → report it back to the orchestrator (the main session) rather than improvising. Never widen scope beyond writing the file and counting the backlog.
  • Explicitly select your tool's mid tier. State the tier on the spawn — do not omit it and rely on a default. An omitted tier inherits the parent's tier, which is not the same thing as the balanced one. Pick the judgment-capable tier that is cheaper and faster than your top reasoning tier. Not the cheapest/fastest tier: on judgment work it measurably degrades (misclassification rates several times higher). Choose by tier, not by a vendor model name copied from this file — names drift, and this command ships to several tools.
  • Background dispatch where supported. Run the write-up subagent in the background (non-blocking) so the session isn't held up waiting on formatting/file I/O. Fall back to writing inline (today's behavior) if your tool has no subagent or background-dispatch mechanism.

What it does

  1. Drafts a compact brief of current conversation context, key decisions, active work in progress, and findings/insights — done inline, since only the running session holds full conversation context

  2. Hands the brief to a subagent on the mid-tier model (see Guardrails) to expand into the full stash file at .amp/stash/<name>.md, dispatched in the background where the tool supports it. Falls back to writing inline if subagent/background dispatch isn't available

  3. Enables context restoration after compaction

  4. Consolidation nudge — whichever actor wrote the file (the subagent, or the session itself on the inline fallback) counts the unprocessed backlog after saving. $ROOT is the absolute repo root — the same one the stash file was just written under. Resolve it with git rev-parse --show-toplevel. Run these two lines verbatim. Do not substitute a cwd-relative path (the write-up subagent's cwd is not guaranteed to be the repo root) and do not discover the manifest with a * glob over the remember dir (.processed is a dotfile, and globs skip dotfiles):

    bash
    find "$ROOT/.amp/stash/" -maxdepth 1 -name '*.md' ! -name '.*' 2>/dev/null | wc -l   # total
    if [ -f "$ROOT/.amp/remember/.processed" ]; then grep -c '' "$ROOT/.amp/remember/.processed"; else echo 0; fi   # processed

    unprocessed = total − processed. Use grep -c '', not wc -l: a manifest whose last entry has no trailing newline undercounts by one under wc -l.

    If $ROOT cannot be resolved, report the backlog as UNKNOWN and name the path that failed — never substitute 0. Substituting 0 maximizes the apparent backlog and fires the nudge on every stash. A resolvable $ROOT with no .processed file is a genuine 0.

    If unprocessed >= 5, end with one line, carrying the raw numbers so a miscount is visible without re-deriving it:

    📝 N unprocessed stashes (T total − P consolidated) — run /remember to fold them into memory.

    No counter is stored — the count is derived each time, and running /remember updates .processed, so the backlog drops on its own. Just emit the nudge; never run /remember automatically.

When to use

  • Before long-running tasks that may trigger compaction
  • When handing off work to another agent or session
  • After completing major investigation or analysis
  • Before taking a break from complex multi-step work

Commands

bash
# Stash with auto-generated name
/stash

# Stash with custom name
/stash "feature-auth-investigation"

# List available stashes
ls .amp/stash/

# Restore from stash
cat .amp/stash/<name>.md

Reference

  • Stashes stored in .amp/stash/ (project-local)
  • Automatically includes: timestamp, active plan, recent decisions
  • Maximum context retention with minimal token usage
  • When dispatched in the background, the "Stashed to X" confirmation and consolidation nudge arrive as the subagent's completion notification rather than inline in the same turn

よくある質問

AIスキル「Stash」では何ができますか?

Stash session context [name]

TypingMindでStashを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Stashはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにStashをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/hamr0/liteagents/tree/main/packages/ampcode/skills/stashを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

Stashを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストが合致したときにこのスキルを読み込めます。

Stashは何個のAIモデルで使えますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもStashを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Stash」は無料ですか?

はい。hamr0がGitHubでApache-2.0ライセンスの下で公開しています。支払いが必要なのは、利用したトークンに対する、ご自身が契約するAIプロバイダーへの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇