Chuyển đến nội dung
Skillpedia
Triển khai và đám mây (DevOps)5.4k · #14869

remote-compute-ssh

Skill này làm gì

Skill này cho phép agent chạy các lệnh ngắn và công việc dài trên các máy chủ từ xa đã được phê duyệt, như máy GPU, qua SSH. Skill dành cho người cần thực hiện công việc nặng trên các máy mạnh hơn máy của họ.

Khi nào nên dùng

  • ✓Khi một công việc khoa học hoặc dữ liệu cần GPU hoặc nhiều bộ nhớ hơn máy của bạn.
  • ✓Khi bạn muốn một công việc chạy lâu trên máy chủ từ xa và báo lại khi hoàn tất.
  • ✓Khi bạn cần chọn một trong các máy tính đã bật để chạy một tác vụ.

Liên kết skill

https://github.com/aipoch/open-science/blob/main/resources/skills/remote-compute-ssh/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/aipoch/open-science/blob/main/resources/skills/remote-compute-ssh/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Bạn có thể chạy công việc huấn luyện này trên một trong các máy GPU đã bật của tôi và gửi kết quả cho tôi khi hoàn tất không?”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent kiểm tra máy tính nào đang được bật, rồi chạy các lệnh ngắn hoặc gửi công việc dài. Agent đọc tiến độ mà không phải chờ, và thu thập kết quả khi công việc kết thúc.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

This skill covers remote compute over SSH, including direct execution and Slurm submission: listing hosts, creating handles, running short remote commands (callCommand), reading/writing host knowledge docs, and the full async job lifecycle — submit → save job_id → read non-blocking snapshots by that ID → harvest → analysis turn → publish artifacts.

Where host.compute runs: host.compute lives ONLY on the control-plane REPL kernel — run every example below with the repl_execute tool (JavaScript), the same kernel that hosts host.mcp. The python/r data kernels have NO host.compute (SSH and approvals stay outside the sandbox workspace); calling it from a python/r cell will fail with host.compute is undefined.

Choose an execution location

Only Compute Hosts enabled for this Session are visible or callable. Discover them in one catalog; each entry has role selected or available. A non-empty selected pool is an execution instruction: run tool-backed task work on one or more selected hosts as the task requires. The pool has no priority and does not imply automatic multi-host scheduling. If no host is selected, choose from the available entries. Read details() only for candidates that need closer evaluation.

Never guess or reuse a provider id absent from the catalog. A user naming a disabled host does not make it callable; explain that it must first be enabled for this Session. If no eligible host is usable, explain the blocker and ask the user how to proceed.

const hosts = await host.compute.listHosts()
const selectedHosts = hosts.filter((host) => host.role === 'selected')
const candidates = selectedHosts.length > 0 ? selectedHosts : hosts

Each list item is a compact summary with provider_id, display_name, shape, execution_mode, status, and role (last_probe_ok, probe_failed, or not_probed). last_probe_ok means the most recent persisted Probe succeeded; it does not assert live connectivity. Knowledge documents and resource probe snapshots are deliberately excluded from discovery results.

API reference

// List this Session's enabled hosts as one role-bearing compact catalog
const hosts = await host.compute.listHosts()

// Compatibility discovery names remain available; both still hide disabled hosts.
const visibleHosts = await host.compute.listRegistered()
const selectedHosts = await host.compute.listPreferred()

// Create a handle to a specific host (no network call)
const c = host.compute.create('ssh:<alias>')

// Run a short remote command (throws on approval_denied / host_unreachable / timeout)
const result = await c.callCommand('<shell command>', '<one-line intent for the approval card>', {
  loginShell: true, // default: true — runs login profiles, then readable ~/.bashrc, before this command
  timeoutSeconds: 60 // optional — the host applies its own default (60s) when omitted
})
// result → { exit_code, stdout, stderr, truncated }

// Read the persisted operation instructions and the independent resource probe snapshot.
// doc is always the exact saved text (including '' before instructions are saved).
// probe is explicitly null when this host has never been probed.
const info = await host.compute.details('ssh:<alias>', { mode: 'read' })

// Append a note to the persisted host knowledge doc (agent writes; 32 KB cap enforced).
// Append changes only doc; it never copies or changes probe observations.
await host.compute.details('ssh:<alias>', {
  mode: 'append',
  text: '\n## Note\nlearned X on <date>'
})

// Alternatively, replace the entire host knowledge doc. Read again before replacing,
// especially if you appended above: oldText must match the persisted doc exactly.
const latest = await host.compute.details('ssh:<alias>', { mode: 'read' })
await host.compute.details('ssh:<alias>', {
  mode: 'replace',
  text: '<new full doc>',
  oldText: latest.doc
})

Treat doc as operation instructions and durable host knowledge. Treat probe as a dated observation: resource values may change, and detecting a scheduler does not authorize submitting a job or select an account, partition, or queue. On a document mismatch or details_conflict error, read again and merge your draft with the latest document before retrying. A resource-only probe refresh does not change doc or cause a replacement conflict. After writing, read again to verify the saved contents. A successful append or replace result is only { ok: true }. The write res

Câu hỏi thường gặp

Nó có dùng được mọi máy chủ tôi có không?

Không. Nó chỉ dùng các máy tính được bật cho phiên hiện tại.

Nó có chạy trong kernel dữ liệu Python và R không?

Không. Skill nói tính toán từ xa chỉ chạy trong REPL điều khiển, không chạy trong kernel dữ liệu Python hoặc R.

Điều gì xảy ra sau khi công việc hoàn tất?

Agent thu thập các đầu ra và có thể phân tích chúng, rồi chia sẻ kết quả mà bạn chọn.

Chi tiết

Mô tả gốc của tác giả

Evaluate and use SSH Remote Compute before choosing where to run GPU, high-memory, parallel, batch, model-inference, bioinformatics, or other long-running scientific work; supports short remote commands and asynchronous jobs with automatic harvest and analysis.

repo: aipoch/open-science

Độ phổ biến

Sao GitHub
5.4k
Vị trí xếp hạng
#14869
Giấy phép
Apache-2.0
Cập nhật
2/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự