本文へ移動
cccskills
無料GitHub で公開

ssh-connection-import

Use when implementing or debugging onetcli SSH connection importers, including OpenSSH config, known_hosts, candidate file manifests, local composite installs, SSH auth_method JSON decode errors such as unknown variant kind, or preview scans that show available sources but return zero records.

日本語の概要は準備中です。原文の説明を表示しています。

feigeCode/navopスター 1,936(GitHub 1,936 + cccskills 0)

実行スコア 未検証

インストール方法を見る

含まれるファイル(4)

  • SKILL.md4.8 KB
  • agents/openai.yaml197 B
  • references/openssh-sources.md2.6 KB
  • references/ssh-protocol-debugging.md2.5 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

SSH Connection Import

Overview

Build and debug SSH importers against the host protocol first. Most failures are not parsing failures; they are mismatches between manifest visibility, candidate file access, WASM output JSON, and connection-import-protocol decode rules.

For shared WASM component structure, manifests, packaging, and host runtime work, also use connection-import-wasm.

References

NeedReference
OpenSSH config and known_hosts parsing rulesOpenSSH Sources
SSH protocol JSON, auth methods, and preview failuresSSH Protocol Debugging

Protocol Contract

Inspect the host protocol before defining extension structs:

  • Host model: ../onetcli/crates/connection-import-protocol/src/model.rs
  • Importer output must serialize to the host's serde shape, not a local convenience shape.

For SSH auth, match SshImportAuthMethod with #[serde(rename_all = "snake_case")]:

VariantJSON shape
AutoPublicKey"auto_public_key"
Agent"agent"
PrivateKey{"private_key":{"key_path":"...","passphrase":null}}
Password{"password":{"password":null}} or an omitted secret when not importing passwords

Never emit {"kind":"auto_public_key"}. The host error unknown variant kind, expected one of password, private_key, private_key_material, agent, auto_public_key means the importer used internally tagged JSON that the host protocol does not accept.

Add a focused serialization test for each auth variant the importer emits:

let value = serde_json::to_value(&record).unwrap();
assert_eq!(value["ssh"]["auth_method"], "auto_public_key");

OpenSSH Sources

Declare platform candidates and fs:read:* permissions for both primary config and fallback discovery:

SourcemacOS/LinuxWindows
OpenSSH config~/.ssh/config%USERPROFILE%/.ssh/config
known hosts fallback~/.ssh/known_hosts%USERPROFILE%/.ssh/known_hosts

Use known_hosts only as host discovery. It rarely contains username or auth metadata, so emit host-only records with empty username, parsed port, and AutoPublicKey.

Parsing rules for known_hosts:

  • Parse plain hosts, comma-separated aliases, and bracketed ports like [example.com]:2222.
  • Skip hashed hosts starting with |, wildcard or negated patterns, and marker lines such as @cert-authority.
  • Ignore key material after the host pattern column.
  • See OpenSSH Sources before extending parser behavior.

Debug Flow

When the UI shows the source as available but OpenSSH returns no rows, trace the full path:

  1. Confirm the installed composite manifest contributes the importer and the current platform.
  2. Confirm each candidate file path expands correctly (~/..., %USERPROFILE%/...) and has matching fs:read:* permission.
  3. Confirm the file exists on the user's machine. ~/.ssh/config may be absent while ~/.ssh/known_hosts exists.
  4. Run importer unit tests for parser behavior and serialized JSON shape.
  5. Check host logs for connection import preview failed. Decode errors mean the source was read and the WASM component returned JSON, but the host rejected the protocol shape.

Treat "可导入" or "available" in the UI as manifest/source visibility only. It does not prove preview records decoded successfully.

Local Packaging

Verify and install the composite extension before host UI testing:

rtk cargo test -p openssh_config_importer_wasm
rtk cargo build --release -p openssh_config_importer_wasm --target wasm32-wasip2
rtk node scripts/release-driver.mjs openssh-config-importer 0.1.0 --target universal --artifact-dir /tmp/onetcli-composite-local/openssh-config

The local install target is:

~/.config/one-hub/extensions/composite/com.onetcli.importer.openssh-config

The installed folder must contain extension.json and wasm/openssh_config_importer_wasm.wasm.

Common Mistakes

MistakeFix
Defining SSH auth as { kind, ... }Serialize exactly like connection-import-protocol::SshImportAuthMethod.
Only scanning ~/.ssh/configAdd known_hosts fallback because many local machines have no config file.
Treating known_hosts aliases as full configsEmit conservative host-only records and skip ambiguous patterns.
Debugging only extension code after a UI zero-row resultInspect host decode logs and candidate file reads.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

コメント

ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。

まだコメントはありません。最初のコメントを書いてみませんか。

送信するとすぐに公開されます。メールアドレスや電話番号などの個人情報は書かないでください。URL は 2 つまでです。

0 / 1000 文字

このフォームは reCAPTCHA で保護されており、Google のプライバシーポリシーと利用規約が適用されます。

同じリポジトリのスキル

Use when implementing, debugging, packaging, or host-enabling onetcli WASM connection importers such as DBeaver, Navicat, Navicat Lite, Termius, connection-import.wit components, wasm32-wasip2 importers, composite extension manifests, local importer visibility, or connection import UI freezes.

日本語の概要は準備中です。原文の説明を表示しています。

feigeCode/navop1,9362026年10月26日 更新

gpui

無料

GPUI framework knowledge covering actions/keybindings, async/background tasks, context management (App/Window/Context<T>/AsyncApp), custom elements (low-level Element trait), entity state management, event system, focus handling, global state, layout/styling (flexbox/CSS-like), and testing. Use when working with any GPUI framework concept, building GPUI applications, or needing guidance on GPUI-specific APIs and patterns.

日本語の概要は準備中です。原文の説明を表示しています。

feigeCode/navop1,9362026年10月26日 更新

How to use the gpui-component UI library in GPUI applications, and the normative Design and Coding Guides that govern it. Use when building UIs with gpui-component components (Button, Input, Select, Dialog, Tabs, Sidebar, List, Table, etc.), setting up the library, handling component state or theming, finding the right component for a UI need, and also when designing layouts, spacing, visual hierarchy, or interaction states, writing interface copy, or making application architecture, state-ownership, or public API decisions.

日本語の概要は準備中です。原文の説明を表示しています。

feigeCode/navop1,9362026年10月26日 更新

Use when designing, implementing, reviewing, or debugging onetcli IPC database drivers, driver.json manifests, extension-protocol wire methods, schema metadata, DDL builders, import/export, packaging, or cross-language driver runtimes.

日本語の概要は準備中です。原文の説明を表示しています。

feigeCode/navop1,9362026年10月26日 更新

navop

無料

Use terminal commands to discover and operate resources exposed by a running Navop desktop application through its host-authoritative Public MCP runtime.

日本語の概要は準備中です。原文の説明を表示しています。

feigeCode/navop1,9362026年10月26日 更新

Use when working in the Navop repository on CHANGELOG.md, version-tag preparation, GitHub Releases, or R2 updater release notes, especially when bilingual Chinese and English notes must be generated, reviewed, synchronized, published, or verified.

日本語の概要は準備中です。原文の説明を表示しています。

feigeCode/navop1,9362026年10月26日 更新

feigeCode のスキルをすべて見る

このスキルの問題を報告する