Wrapのロゴ

Wrap

コミュニティ
somnus0x
wrap

Write a compact session handoff so you can /clear and continue in a fresh, cheap context — the new session auto-loads it via a SessionStart hook. Use when the user says "wrap", "wrap up", "handoff and clear", "fresh session", "clear context", "reset context", or after the context-nudge HUD/hook warns (≥250K context or cold cache) at a natural boundary (post/feature/project done).

概要

公開者somnus0x
リポジトリagt-skill-pack
スキル名wrap
スター
74
フォーク
17
同梱ファイル
3
ライセンスApache-2.0
リンク
  • Markdown形式の指示

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

  • どのLLMでも利用可能

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

  • 3個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

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

インストール

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

1

TypingMindにインストール

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

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

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

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

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

TypingMindで使用

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

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

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

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

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

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

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

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

スキルの指示

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

Wrap — handoff, then /clear

Why: a long main loop re-reads its whole context every call, so a short reply typed into a huge chat after an idle gap costs the same as a long one. One cold resume at 800K context runs $5–10 at list price. A ~50-line brief carries what matters at a fraction of that.

You cannot run /clear yourself — your job is to make clearing lossless, then tell the user to type it.

Steps

  1. Path: python3 ~/.claude/hooks/session-handoff.py --path → the one handoff file for this cwd. Overwrite it; never write elsewhere (never into the repo).
  2. Gather receipts, not memory (one batch of read-only calls): git status --short, git branch --show-current, git log --oneline -5, branches ahead of origin — skip if not a git repo. Re-read any file you are about to cite.
  3. Write the brief — terse, ≤ 60 lines, only what the next session can't cheaply re-derive from the repo:
markdown
# Wrap — <cwd basename> — <YYYY-MM-DD HH:MM>
**Next:** <the single next action; use $ARGUMENTS if given>

## State
- Doing: <task in 1-2 lines>  · Branch: <b> · Uncommitted: <files or "clean">
- Done this session: <bullets, each with file:line or commit sha>

## Decisions (locked — don't relitigate)
- <decision> — because <why>

## Open
- <question / blocker / thing the user still has to decide>

## Gotchas
- <non-obvious things that cost time this session: wrong turns, corrected facts, tool quirks>

## Resume
- Files to read first: <paths>
- Commands: <exact commands to re-run / verify>

Rules: corrected facts go in Gotchas (e.g. "the staging DB is NOT a copy of prod"). No secrets, no key values. Don't paste code — point to file:line. Don't restate CLAUDE.md. 4. Surface stranded work: if this session created/modified files that are uncommitted, or a branch is ahead of origin, say so in one line — don't commit unless asked. 5. Hand over — reply with exactly:

  • the handoff path and line count,
  • Type /clear — the next session loads this automatically. (also loads on a fresh claude start in this directory within 24h),
  • if the next task is a taste/design call, suggest /model after the clear; otherwise stay on the default.

If the user wants to keep going in the same session instead, suggest /compact with the Next line as the focus.


Install the other half

The skill writes the brief. A SessionStart hook is what loads it back after /clear — without it you get a note that never returns. install.sh only copies this file, so fetch the three scripts yourself:

bash
mkdir -p ~/.claude/hooks
BASE=https://raw.githubusercontent.com/somnus0x/agt-skill-pack/main/skills/wrap/hooks
curl -sL $BASE/session-handoff.py -o ~/.claude/hooks/session-handoff.py
curl -sL $BASE/context-nudge.py   -o ~/.claude/hooks/context-nudge.py
curl -sL $BASE/statusline.sh      -o ~/.claude/hooks/statusline.sh
chmod +x ~/.claude/hooks/statusline.sh

Then merge into ~/.claude/settings.json:

json
{
  "env": { "CLAUDE_CODE_AUTO_COMPACT_WINDOW": "400000" },
  "hooks": {
    "UserPromptSubmit": [{ "hooks": [{ "type": "command",
      "command": "python3 ~/.claude/hooks/context-nudge.py", "timeout": 5 }] }],
    "SessionStart": [{ "matcher": "clear|startup", "hooks": [{ "type": "command",
      "command": "python3 ~/.claude/hooks/session-handoff.py", "timeout": 5 }] }]
  },
  "statusLine": { "type": "command",
    "command": "~/.claude/hooks/statusline.sh", "refreshInterval": 30 }
}

What each piece does:

  • session-handoff.py — SessionStart hook. On /clear (or a fresh start in the same directory within 24h) it injects the brief as context, then renames it .consumed.md so it never loads twice. Handoffs live in ~/.claude/session-handoffs/, outside any repo.
  • context-nudge.py — UserPromptSubmit hook plus a HUD line. Warns when the cache has gone cold at ≥150K context (this turn rewrites ~$X) and once per 250K step.
  • statusline.sh — optional, and Mac-shaped. It chains the claude-hud plugin and then appends the nudge line, with a hardcoded Homebrew node path. If you don't use claude-hud, replace the first half with your own statusline command, or point statusLine straight at python3 ~/.claude/hooks/context-nudge.py --hud.

CLAUDE_CODE_AUTO_COMPACT_WINDOW is the part that works without you. It compacts before the main loop passes 400K, so the habit doesn't have to hold.

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

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

Write a compact session handoff so you can /clear and continue in a fresh, cheap context — the new session auto-loads it via a SessionStart hook. Use when the user says "wrap", "wrap up", "handoff and clear", "fresh session", "clear context", "reset context", or after the context-nudge HUD/hook warns (≥250K context or cold cache) at a natural boundary (post/feature/project done).

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

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

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

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/somnus0x/agt-skill-pack/tree/main/skills/wrapを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

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

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

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

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

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

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

AIスキルとは何ですか?

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

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

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

すべて見る

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

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