Hai Architectureのロゴ

Hai Architecture

コミュニティ
hylarucoder
hai-architecture

リポジトリ全体の実行時パスから、範囲を限定したモジュールや設計の判断まで、アーキテクチャとソフトウェア変更の複雑さを調査します。「系统太绕」「复杂度审计」「调用链/配置太散」「架构审查」「模块边界」「拆分合并」や、リポジトリの変更が難しい理由を調べる場合に使用します。全体調査モードか範囲限定の設計モードを選び、追跡した根拠、複雑さの中心、代替案、最初の検証方法を提示します。原因不明の不具合にはhai-debug、変更やローカルなコードの問題点のレビューにはcode-review-and-qualityを使用してください。

Add to TypingMind

概要

公開者hylarucoder
リポジトリhai-stack
スキル名hai-architecture
スター
284
フォーク
15
同梱ファイル
12
リンク
  • Markdown形式の指示

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

  • どのLLMでも利用可能

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

  • 12個の同梱ファイル

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

  • オープンソース

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

インストール

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

1

TypingMindにインストール

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

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

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

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

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

TypingMindで使用

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

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

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

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

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

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

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

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

スキルの指示

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

Hai Architecture

For Chinese readers, see SKILL.zh_CN.md. The English SKILL.md is the execution source of truth.

Purpose

Review existing architecture or guide one design decision through the lens of managing complexity. Find the boundary where change amplification, cognitive load, or unknown unknowns concentrate, then recommend the smallest structural move that makes the system easier to understand and change.

Select the work mode

  • Global investigation: the cause or boundary of change friction is unclear, or the request spans a repository/large subsystem. Read references/global-audit.md and follow its entrypoint, call-chain, state/config, and test tracing procedure. Converge on important paths after mapping the entrypoint families; do not substitute a local smell review.
  • Bounded review/design: a module, package boundary, or design choice is already identified. Follow the workflow below, inspecting its direct callers, contracts, and tests.
  • A request can move from global investigation into a bounded decision. Reuse collected evidence; do not rerun two full reviews or ask the user to choose an internal mode.

Evidence gate

Before making an architecture claim:

  1. Read every cited file in this session and cite real file:line locations.
  2. Trace callers and implementations before asserting a call chain or blast radius; name the search.
  3. Read ADRs, dependency rules, architecture tests, and public contracts that declare intended boundaries.
  4. Compare a module's public surface with the complexity it actually hides before calling it deep or shallow.
  5. Label inference as unverified instead of presenting it as evidence.

A fabricated finding costs more trust than several missed findings. Prefer one verified painful center over a checklist of plausible smells.

Core judgments

Find the painful center

Start with the boundary or call chain under review. Ask where a common change crosses owners, requires several layers of knowledge, mixes lifecycle/persistence/execution concerns, or makes it unclear what else must change. Local naming or style issues matter only when they reveal that deeper force.

Prefer deep modules

A useful module hides significant, related complexity behind a small, stable interface. Do not split because a file is long or merge because files are adjacent. Split when the new boundary hides information; merge when separate pieces share hidden knowledge and must be understood together.

For each layer or new shape, ask:

  • Does the caller know less?
  • Does this layer own a rule or invariant?
  • Does it make illegal states harder to express?
  • Can downstream change stop here?
  • Does a conversion add meaning, constraints, or ownership?

If every answer is no, the layer is probably a pass-through tax. Do not create a new shape merely because data crossed a function.

Compare real alternatives

For a nontrivial decision, compare at least two materially different options. Explain why the current design, a further split, a merge, or a generic abstraction is rejected when each is plausible. For key recommendations, include a concise red-team misuse, blue-team defense, and residual risk.

Read references/principles.md when the decision needs the full lens catalog, error-boundary guidance, complexity vocabulary, or adversarial-review detail.

Workflow

Review existing code

  1. State the reviewed boundary and the request's scale.
  2. Pass the evidence gate: read implementation, callers, contracts, tests, and relevant decisions.
  3. Draw a simple current map of actors/modules, dependency or state flow, and the intended hiding boundary.
  4. Locate the highest-leverage complexity center.
  5. Select only the relevant lenses from references/principles.md; do not score every lens by default.
  6. Apply the deep-module and layer-cost tests.
  7. Check relevant red flags in references/red-flags.md; use references/worked-example.md when calibrating a difficult finding or false positive.
  8. Write a proportional report with evidence-backed findings ordered by impact.

Guide a design decision

  1. Clarify the goal, boundary, current constraints, and contracts that must survive.
  2. Map the current chain before proposing changes.
  3. Design at least two fundamentally different options.
  4. Compare business fit, boundary clarity, module depth, migration cost, operational risk, and rejected alternatives.
  5. Recommend one option, state residual risk, and name the first proof point.

Scale

  • Quick: one bounded question. Return the map, conclusion, evidence, main tradeoff, and next step.
  • Standard: one package or call chain. Use the full markdown template.
  • Full: multiple boundaries explicitly requested by the user. Map broadly, then converge on the painful center; increase evidence breadth without multiplying boilerplate.

The evidence gate applies at every scale. Do not make a quick question perform a full audit, and do not call a repository-wide sweep complete after reading one attractive file.

Output

Match the user's language and keep code identifiers unchanged. For standard/full Markdown reviews, fill references/output-template.md in bounded mode; use references/global-output-template.md in global mode; for a quick answer, preserve its decision fields without emitting empty sections. When the user explicitly asks for HTML, also read references/html-report.md. Language-specific guidance is available in references/go-patterns.md and references/typescript-patterns.md.

Use a different skill when

  • An unexplained malfunction needing reproduction and causal evidence → hai-debug.
  • One React component's API, data flow, effects, or rerenders → react-component-diagnosis.
  • Local naming, duplication, function, or style smells → code-review-and-quality or hai-naming.
  • Product requirements rather than technical design → hai-prd.

Not this skill

Do not use it as a formatter, feature-completeness audit, generic test advisor, or performance review unless performance architecture is the explicit decision. Keep the focus on design quality as it affects complexity.

同梱ファイル

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

よくある質問

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

リポジトリ全体の実行時パスから、範囲を限定したモジュールや設計の判断まで、アーキテクチャとソフトウェア変更の複雑さを調査します。「系统太绕」「复杂度审计」「调用链/配置太散」「架构审查」「模块边界」「拆分合并」や、リポジトリの変更が難しい理由を調べる場合に使用します。全体調査モードか範囲限定の設計モードを選び、追跡した根拠、複雑さの中心、代替案、最初の検証方法を提示します。原因不明の不具合にはhai-debug、変更やローカルなコードの問題点のレビューにはcode-review-and-qualityを使用してください。

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

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

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

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

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

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

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

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

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

hylarucoderがGitHubで公開しています。ライセンス条件はリポジトリでご確認ください。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

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

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

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

すべて見る

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

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