Ripwire Reuse Firstのロゴ

Ripwire Reuse First

組織人気
redhat-et
ripwire-reuse-first

シンボルを1つ書くとき(「ちょっとした」1行のコードでも)、または依存関係を追加するときは、作り直す前に再利用できるものを探します。すでにある構成要素、手本にすべき既存のパターン、作り直すことになる重複、ベンダー同梱の依存関係を見つけます。インターフェースや機能全体を作る場合はbefore-you-buildを使います。--exemplarまたは--grepの呼び出しは最大1回です。

Add to TypingMind

概要

公開者redhat-et
リポジトリripwire
スキル名ripwire-reuse-first
スター
2.2K
フォーク
141
同梱ファイル
指示のみ
ライセンスApache-2.0
リンク
  • Markdown形式の指示

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

  • どのLLMでも利用可能

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

  • 指示だけで完結

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

  • オープンソース

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

インストール

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

1

TypingMindにインストール

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

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

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

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

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

TypingMindで使用

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

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

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

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

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

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

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

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

スキルの指示

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

Reuse before you write

Routing — pick the right door: • Starting a whole FEATURE (multi-symbol, needs a plan / interface / sizing) → ripwire-before-you-build. • The cross-cutting map-before-you-read token discipline for any read → ripwire-orient (map-before-you-read.md). • Judging whether what you wrote got better or worse before "done" → ripwire-quality-bar. • Not sure which skill? → ripwire-router.

The cheapest, simplest, most readable code is the code you don't write. Before authoring anything non-trivial, spend one ripwire call (on PATH) to find what already exists.

Retrieve by ROLE, never by raw similarity

This is the load-bearing rule, not a style preference: similarity-retrieved "here's similar code, paste it" measurably HURTS — up to −15% Pass@1 (arXiv:2503.20589). What helps is API/type-signature context (+17-20%) and dependency-graph-structured retrieval (+6 EM; enabled 5/6 multi-file edits vs 0/6 without a graph). ripwire's shape — signatures + call-graph + role-ranked exemplars — is the validated retrieval shape; "find me a similar-looking snippet" is the anti-pattern to avoid, even though it's the tempting first instinct.

Before you write a function / class / util

  1. Find the building block first — ripwire <dir> --for="<what you're about to build>" → ranked existing signatures (plus, when the code has them, the <lego> / <compose> HAS-A blocks — what a class already owns). If you can name the helper you suspect exists, query it verbatim (--for="parseByteSize") — --for auto-routes to name-exact retrieval and lands it at recall@1 ~99%. It also carries the quality lens (cx/ccx/in/churn/amp/tested) so you see which candidates are safe to extend. Often the thing exists — compose from it.
  2. Optionally get a style/shape exemplar — if the retrieval result leaves a local-idiom question, ripwire <dir> --exemplar=fn|method|class|struct|iface|var --legend=compact (a kind) or --exemplar="<task in words>" (the top match's kind is inferred) returns the repo's single best-in-class instance of that shape: highest fan-in, lowest cognitive complexity, tested=1 where possible — selected by ROLE, not text similarity. It returns the full body under <bodies>. Copy its shape (structure, error handling, naming), not its text — it is a model to imitate, not a relevant-code search.
  3. Find candidates by behavior/shape — ripwire <dir> --grep="<a word from the behavior>" --legend=compact, or a NARROWED graph query: --graph-query='and(file(all,"<area>"),kind(all,fn))'. (Bare kind(all,fn) is ranked by importance + capped at --top-k, so it's safe — but narrowing by file()/name()/callers() finds the relevant building block, not just the globally-important one.) → implementations to reuse or extend.
  4. Don't duplicate — ripwire <dir> --clones --legend=compact → if your intended body matches an existing one, call it instead. Rule of Three: extract a shared helper on the third occurrence, not the second — and prefer a little duplication over the wrong abstraction (a helper you bend with boolean flags is worse than two honest copies).

Before you add a dependency

  1. Is it already here? — ripwire <dir> --external-surface --legend=compact (what the tree already depends on; the default is a 100-row window with the sh builtins dropped and counted as builtins_excluded= — --include-builtins keeps them) and --uses=NAME (the import role). Reuse an in-tree dependency before adding a new one: a new dep is build weight, supply-chain surface, and one more thing every reader must learn — it has to earn its place.
  2. Before adding/vendoring a NEW dependency, map the candidate repo first — ripwire <git-url> (https:// or git@; shallow-clones to a temp cache dir, then maps it like any local tree — --refetch forces a fresh clone instead of reusing the cached one). Run --report/--hotspots/--deps on it before you commit to the dependency: is it actually small and well-factored, or a god-file waiting to become your problem?

When you do write

  • Match the local idiom — ripwire <dir> --for="<the area>" shows the surrounding naming, layout, and error-handling style. Mirror it so your diff reads like the file, not like a graft (cache-friendly for the reader and for KV-cache reuse).
  • Less code wins on every metric at once: lower complexity, fewer call edges, smaller blast radius, less to test, less to read. When in doubt, delete a parameter before adding one.

Then hand off to ripwire-quality-bar before you call it done.

よくある質問

AIスキル「Ripwire Reuse First」では何ができますか?

シンボルを1つ書くとき(「ちょっとした」1行のコードでも)、または依存関係を追加するときは、作り直す前に再利用できるものを探します。すでにある構成要素、手本にすべき既存のパターン、作り直すことになる重複、ベンダー同梱の依存関係を見つけます。インターフェースや機能全体を作る場合はbefore-you-buildを使います。--exemplarまたは--grepの呼び出しは最大1回です。

TypingMindでRipwire Reuse Firstを使うメリットは何ですか?

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

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

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

Ripwire Reuse Firstを使えるAIモデルはどれですか?

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

Ripwire Reuse Firstで使えるAIモデルの数に制限はありますか?

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

AIスキル「Ripwire Reuse First」は無料ですか?

はい。redhat-etがApache-2.0ライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

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

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

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

すべて見る

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

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