Contexereのロゴ

Contexere

コミュニティ
fajarhide
contexere

Use when installing, verifying or configuring Contexere, when command output carries an `[OMNI: ...]` or `[CONTEXERE: ...]` marker, or when output looks shorter than expected. Contexere is a local hook that shortens shell output before the model reads it and hands back a handle for what it cut.

概要

公開者fajarhide
リポジトリcontexere
スキル名contexere
スター
378
フォーク
36
同梱ファイル
指示のみ
ライセンスApache-2.0
リンク
  • Markdown形式の指示

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

  • どのLLMでも利用可能

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

  • 指示だけで完結

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

  • オープンソース

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

インストール

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

1

TypingMindにインストール

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

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

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

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

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

TypingMindで使用

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

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

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

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

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

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

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

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

スキルの指示

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

Contexere

Contexere runs on the machine, as a hook the agent host calls. It rewrites the output of a shell tool call before the model reads it, and every cut it makes leaves a marker and a handle to fetch the bytes back. No account, no telemetry, nothing about the machine leaves it.

Install

brew install fajarhide/tap/contexere
contexere init

Without Homebrew, take the release archive for the platform from https://github.com/fajarhide/contexere/releases, pull the line for that archive out of the SHA256SUMS published beside it into a file of its own, and verify it with sha256sum -c <that file>, or shasum -a 256 -c <that file> on macOS. Then untar and put the binary on the path. Two things decide whether the check is worth anything. The manifest line has to reach the tool as a file rather than a pipe, because a grep that matches nothing sends an empty stream and macOS reads that as a pass, so a mistyped archive name would install unverified. And the verification has to gate the untar with &&, because a shell running pasted lines carries on past a failed one.

Do not name a host you have not established you are running in. With no terminal to draw its menu on, which is the case when an agent runs it, contexere init configures the host it is running inside and prints which one it picked. If it cannot name the host, a plain shell for instance, it stops and lists the flags rather than installing somewhere nobody asked for. Only then pick one: --claude, --cursor, --codex, --gemini and the rest under contexere init --help. contexere init --all takes every supported host and also writes a .vscode/mcp.json in the working directory.

The hooks land in that host's own configuration, and the host has to restart before they run, so say that rather than reporting the install as active.

An install made under the old name keeps working until 0.9.0. Run contexere init for each host to move its hooks and MCP entry to the new name; contexere doctor lists whatever still uses the old one.

Verify

contexere doctor

A healthy install names the binary, the config directory, the database, and one line per host:

  Binary:         contexere v0.8.5 [LATEST]
  Config dir:     /home/me/.contexere/ [OK]
  Database:       /home/me/.contexere/omni.db (0 distillations, 0 sessions) [OK]

 Agent Integrations:
  Claude Code: Full, 5 checks [OK]

Full is the line to check: it means this host applies the rewrite, so the model reads shortened output. MCP-only means memory and session state and no shell distillation. contexere doctor --fix repairs what it can, and reports what it could not rather than claiming success.

Reading a marker

A marker means bytes were cut and can be fetched back. Do not treat the shortened output as the whole output, and do not write a file back from output that carries one.

The markers still start with [OMNI and name omni retrieve. From 0.9.0 they start with [CONTEXERE and name contexere retrieve. Read [CONTEXERE: ...] exactly as the [OMNI: ...] line of the same shape below, and match on both prefixes in anything that looks for a marker.

markerwhat happened
[OMNI: 40 lines omitted, omni retrieve <handle> for full output]the distiller kept the signal and archived the rest
[OMNI: 40 lines already shown, omni retrieve <handle>]those lines are in this session's context already
[OMNI: identical to the 40 lines already shown, omni retrieve <handle>]the whole re-run matched an earlier one
[OMNI: 40 lines not shown here, omni retrieve <handle>]another session in this project saw them and this one never did, so retrieve before relying on them
[OMNI: identical to 40 lines from an earlier session, none shown here, omni retrieve <handle>]the whole reply matched an earlier session's, and none of it arrived here
[OMNI: 2 sensitive value(s) redacted]values under a key that names a credential

Pull the full bytes with the handle the marker prints:

contexere retrieve <handle>

The contexere_retrieve MCP tool does the same without a shell (omni_retrieve on an install not yet moved to the new name). Reach for either whenever the answer depends on what was cut: a count, an exact line, or a file being rewritten from what was read.

When output looks wrong rather than short

Corrupted output, a success reported for something that failed, or a marker written into a file is a bug, not compression. Capture the command and its output and file it at https://github.com/fajarhide/contexere/issues, then get a clean copy by running the command through contexere exec with the pipeline off:

CONTEXERE_PASSTHROUGH=1 contexere exec <the command>

よくある質問

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

Use when installing, verifying or configuring Contexere, when command output carries an `[OMNI: ...]` or `[CONTEXERE: ...]` marker, or when output looks shorter than expected. Contexere is a local hook that shortens shell output before the model reads it and hands back a handle for what it cut.

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

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

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

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

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

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

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

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

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

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

AIスキルとは何ですか?

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

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

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

すべて見る

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

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