modscode EN

modscode / 図鑑 / sprc-slurm-mods

sprc-slurm-mods

Claude Code mod for the sprc Slurm cluster: a live cluster/job dashboard pane, status line, job lifecycle tools, finish notifications and submit guardrails.

確かめやすいコードターミナル+デスクトップペインステータスライントーストBoxButtonText

何をするか

  • 欄・ステータス行・トーストを描く
  • /sprc を足す
  • mcp__sprc-slurm-mods__sprc_job・Bash の呼び出しを見張る(止めることがある)
  • prompt.submit・session.startにフックする
  • ターンをまたいで自分の状態を持つ

良いところ

  • ネットワークに出ない
  • TypeScript で書かれている
  • エラーを扱う
  • ファイルを書かない

作り始めるためのコード

2 種類あります。上のデザインから modscode が書いた雛形と、その Mod 自身のコードのうち描いている部分です。

雛形(register.tsx)

register.tsx
import type { Register } from 'claude-code'

// Drawn like sprc-slurm-mods by Max Bromberg (pane, status, toast), as modscode read it from the mod's code:
// https://modscode.com/gallery/platformx-students-sprc-slurm-mods/
// Written by modscode from that reading, not copied from the mod: use it as you like.
// Each value below stands for one the mod works out at run time; put in your own.
export const register: Register = on => {
  // the pane: open it with $.ui.open({ id: 'my-pane', title: "sprc" })
  on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
    const { Box, Text, Button } = $.ui.resolve(e)
    const usable = '…'
    const total = '…'
    const idle = '…'
    const error = '…'
    const name = '…'
    const state = '…'
    const name2 = '…'
    const state2 = '…'
    const name3 = '…'
    const state3 = '…'
    const length = '…'
    const state4 = '…'
    const id = '…'
    const name4 = '…'
    const bar = '…'
    const elapsed = '…'
    const limit = '…'
    const nodes = '…'
    const gpus = '…'
    const state5 = '…'
    const name5 = '…'
    const state6 = '…'
    const name6 = '…'
    const running = '…'
    const gpusRunning = '…'
    const pending = '…'
    const gpusPending = '…'
    const name7 = '…'
    const state7 = '…'
    const a = '…'
    const a2 = '…'
    const a3 = '…'
    const name8 = '…'
    const state8 = '…'
    const elapsed2 = '…'
    const a4 = '…'
    const a5 = '…'
    const a6 = '…'
    const name9 = '…'
    const state9 = '…'
    const elapsed3 = '…'
    const a7 = '…'
    const a8 = '…'
    const a9 = '…'
    const l = '…'
    const l2 = '…'
    const l3 = '…'
    return (
      <Box flexDirection="column">
        <Box flexDirection="row" justifyContent="space-between">
          <Text bold>
            {usable}
            /
            {total}
            {" GPUs free"}
            <Text dimColor>
              {" (+"}
              {idle}
              {" stranded)"}
            </Text>
          </Text>
          <Box flexDirection="row" gap={1}>
            <Text dimColor>
              0s ago
            </Text>
            <Button label="refresh" hotkey="r" plain />
          </Box>
        </Box>
        <Text color="red">
          {"Slurm: "}
          {error}
        </Text>
        <Box flexDirection="column" marginTop={1}>
          <Text dimColor bold>
            NODES
          </Text>
          <Box flexDirection="row" gap={1}>
            <Text>
              {name}
            </Text>
            <Text color="red">
              ■■■■■■■■
              □□□□□□□□
            </Text>
            <Text dimColor>
              cpu
            </Text>
            <Text color="red">
              ████████░░░░░░░░
            </Text>
            <Text dimColor>
              mem
            </Text>
            <Text>
              ████████░░░░░░░░
            </Text>
            <Text color="red" wrap="truncate-end">
              {state}
            </Text>
          </Box>
          <Box flexDirection="row" gap={1}>
            <Text>
              {name2}
            </Text>
            <Text color="red">
              ■■■■■■■■
              □□□□□□□□
            </Text>
            <Text dimColor>
              cpu
            </Text>
            <Text color="red">
              ████████░░░░░░░░
            </Text>
            <Text dimColor>
              mem
            </Text>
            <Text>
              ████████░░░░░░░░
            </Text>
            <Text color="red" wrap="truncate-end">
              {state2}
            </Text>
          </Box>
          <Box flexDirection="row" gap={1}>
            <Text>
              {name3}
            </Text>
            <Text color="red">
              ■■■■■■■■
              □□□□□□□□
            </Text>
            <Text dimColor>
              cpu
            </Text>
            <Text color="red">
              ████████░░░░░░░░
            </Text>
            <Text dimColor>
              mem
            </Text>
            <Text>
              ████████░░░░░░░░
            </Text>
            <Text color="red" wrap="truncate-end">
              {state3}
            </Text>
          </Box>
        </Box>
        <Box flexDirection="column" marginTop={1}>
          <Text dimColor bold>
            {"YOUR JOBS "}
            {`(${length} running · ${length} pending)`}
          </Text>
          <Text dimColor>
            none queued or running
          </Text>
          <Box flexDirection="column">
            <Box flexDirection="row" gap={1}>
              <Text>
                {state4}
              </Text>
              <Button label={`${id}`} plain />
              <Text wrap="truncate-end">
                {"★ "}
                {name4}
              </Text>
            </Box>
            <Text dimColor wrap="truncate-end">
              {"      "}
              {`${bar} ${elapsed}/${limit} on ${nodes} · ${gpus} GPU`}
            </Text>
          </Box>
          <Box flexDirection="column">
            <Box flexDirection="row" gap={1}>
              <Text>
                {state5}
              </Text>
              <Button label={`${id}`} plain />
              <Text wrap="truncate-end">
                {"★ "}
                {name5}
              </Text>
            </Box>
            <Text dimColor wrap="truncate-end">
              {"      "}
              {`${bar} ${elapsed}/${limit} on ${nodes} · ${gpus} GPU`}
            </Text>
          </Box>
          <Box flexDirection="column">
            <Box flexDirection="row" gap={1}>
              <Text>
                {state6}
              </Text>
              <Button label={`${id}`} plain />
              <Text wrap="truncate-end">
                {"★ "}
                {name6}
              </Text>
            </Box>
            <Text dimColor wrap="truncate-end">
              {"      "}
              {`${bar} ${elapsed}/${limit} on ${nodes} · ${gpus} GPU`}
            </Text>
          </Box>
          <Text dimColor>
            +
            {length}
            {" more"}
          </Text>
        </Box>
        <Box flexDirection="column" marginTop={1}>
          <Text dimColor bold>
            EVERYONE ELSE
          </Text>
          <Text>
            {running}
            {" running ("}
            {gpusRunning}
            {" GPU) · "}
            {pending}
            {" pending ("}
            {gpusPending}
            {" GPU)"}
          </Text>
        </Box>
        <Box flexDirection="column" marginTop={1}>
          <Box flexDirection="row" justifyContent="space-between">
            <Text dimColor bold>
              RECENTLY FINISHED
            </Text>
            <Button label="clear" plain />
          </Box>
          <Box flexDirection="column">
            <Box flexDirection="row" gap={1}>
              <Text color="red">
                ✗
              </Text>
              <Button label={`${id}`} plain />
              <Text wrap="truncate-end">
                {name7}
                {" "}
                {state7}
                {" "}
                {elapsed}
              </Text>
            </Box>
            <Text dimColor wrap="truncate-end">
              {"   → "}
              {a}
            </Text>
            <Text dimColor wrap="truncate-end">
              {"   → "}
              {a2}
            </Text>
            <Text dimColor wrap="truncate-end">
              {"   → "}
              {a3}
            </Text>
          </Box>
          <Box flexDirection="column">
            <Box flexDirection="row" gap={1}>
              <Text color="red">
                ✗
              </Text>
              <Button label={`${id}`} plain />
              <Text wrap="truncate-end">
                {name8}
                {" "}
                {state8}
                {" "}
                {elapsed2}
              </Text>
            </Box>
            <Text dimColor wrap="truncate-end">
              {"   → "}
              {a4}
            </Text>
            <Text dimColor wrap="truncate-end">
              {"   → "}
              {a5}
            </Text>
            <Text dimColor wrap="truncate-end">
              {"   → "}
              {a6}
            </Text>
          </Box>
          <Box flexDirection="column">
            <Box flexDirection="row" gap={1}>
              <Text color="red">
                ✗
              </Text>
              <Button label={`${id}`} plain />
              <Text wrap="truncate-end">
                {name9}
                {" "}
                {state9}
                {" "}
                {elapsed3}
              </Text>
            </Box>
            <Text dimColor wrap="truncate-end">
              {"   → "}
              {a7}
            </Text>
            <Text dimColor wrap="truncate-end">
              {"   → "}
              {a8}
            </Text>
            <Text dimColor wrap="truncate-end">
              {"   → "}
              {a9}
            </Text>
          </Box>
        </Box>
        <Box flexDirection="column" marginTop={1}>
          <Text dimColor bold>
            COURSE BUDGET
          </Text>
          <Text wrap="truncate-end">
            {l}
          </Text>
          <Text wrap="truncate-end">
            {l2}
          </Text>
          <Text wrap="truncate-end">
            {l3}
          </Text>
        </Box>
      </Box>
    )
  })

  on('session.start', async ($, e, next) => {
    const id = '…'
    const state = '…'
    const elapsed = '…'
    const nodes = '…'
    await $.ui.status(`sprc ▸ Slurm unreachable`)
    await $.ui.toast(`✗ job ${id} ${state} (${elapsed})`)
    await $.ui.toast(`▶ job ${id} started on ${nodes}`)
    return next(e)
  })
}

Mod 自身のコード

Mod のライセンス(MIT)に従って載せています。全文は下にあります。写すときは著作権表示を残してください。

plugins/sprc-slurm-mods/hooks/register.tsx 473〜504 行 · ペイン
  on('ui.render', { component: 'Pane', requestId: PANE }, async ($, e) => {
    const el = $.ui.resolve(e)
    const columns = e.props.bodyColumns
    const v = await read($, view)
    const snap = await read($, snapshot)
    const follows = await read($, followed)
    const now = await $.clock.now()
    if (!(await read($, isEnabled))) {
      const { Text } = el
      return <Text dimColor>Slurm is not available on this machine.</Text>
    }
    if (v.kind === 'job') {
      return JobView(el, {
        id: v.id,
        detail: await read($, detail),
        snap,
        isFollowed: follows.some(f => f.id === v.id),
        columns,
        logRows: Math.max(5, (e.viewport?.rows ?? 40) - 24),
        actions: actionsFor($),
      })
    }
    return Overview(el, {
      snap,
      finished: await read($, finished),
      followed: follows,
      budget: await read($, budget),
      now,
      columns,
      actions: actionsFor($),
    })
  })
plugins/sprc-slurm-mods/hooks/ui.tsx 231〜331 行 · ペイン
export function JobView(
  el: El,
  props: {
    id: string
    detail: JobDetail | null
    snap: Snapshot | null
    isFollowed: boolean
    columns: number
    logRows: number
    actions: Actions
  },
) {
  const { Box, Text, Button } = el
  const { id, detail, isFollowed, actions, logRows } = props
  const f = detail?.id === id ? detail.fields : {}
  const r = detail?.id === id ? detail.report : undefined
  const state = f['JobState'] ?? r?.state ?? '…'
  const isLive = !!f['JobState'] && !/COMPLETED|FAILED|CANCELLED|TIMEOUT|OUT_OF_MEMORY/.test(state)
  const runTime = durationSeconds(f['RunTime'] ?? '')
  const limit = durationSeconds(f['TimeLimit'] ?? '')
  const submit = f['SubmitTime']
  const start = f['StartTime']
  const waitSecs =
    submit && start && start !== 'Unknown' && state !== 'PENDING'
      ? (Date.parse(start) - Date.parse(submit)) / 1000
      : NaN

  return (
    <Box flexDirection="column">
      <Box flexDirection="row" gap={2}>
        <Button key="back" label="← back" hotkey="b" plain onPress={actions.back} />
        <Button key="refresh" label="refresh" hotkey="r" plain onPress={actions.refresh} />
        <Button
          key="follow"
          label={isFollowed ? '★ following' : '☆ follow'}
          hotkey="f"
          plain
          onPress={() => actions.toggleFollow(id)}
        />
        {isLive && <Button key="cancel" label="scancel" plain onPress={() => actions.cancel(id)} />}
      </Box>
      <Box marginTop={1} flexDirection="row" gap={1}>
        <Text bold>job {id}</Text>
        <Text color={isBad(state) ? 'red' : state === 'RUNNING' ? 'green' : 'yellow'}>{state}</Text>
        <Text wrap="truncate-end">{f['JobName'] ?? r?.name ?? ''}</Text>
      </Box>
      {!detail || detail.id !== id ? (
        <Text dimColor>Loading…</Text>
      ) : (
        <Box flexDirection="column">
          {state === 'PENDING' && f['Reason'] && (
            <Text color="yellow">
              pending: {explainReason(f['Reason'])}
              {start && start !== 'Unknown' ? ` · est. start ${clock(start)}` : ''}
            </Text>
          )}
          {state === 'RUNNING' && Number.isFinite(limit) && (
            <Text>
              {bar(runTime / limit, 16)} {formatDuration(runTime)} / {formatDuration(limit)} on {f['NodeList']}
            </Text>
          )}
          <Text dimColor wrap="truncate-end">
            submitted {clock(submit ?? '?')}
            {Number.isFinite(waitSecs) ? ` · queued ${formatDuration(waitSecs)} · started ${clock(start!)}` : ''}
            {f['EndTime'] && f['EndTime'] !== 'Unknown' && !isLive ? ` · ended ${clock(f['EndTime'])}` : ''}
            {f['Restarts'] && f['Restarts'] !== '0' ? ` · requeued ${f['Restarts']}×` : ''}
          </Text>
          {DETAIL_FIELDS.filter(([k]) => f[k]).map(([k, label]) => (
            <Text wrap="truncate-start">
              <Text dimColor>{label.padEnd(9)}</Text>
              {f[k]}
            </Text>
          ))}
          {r && (
            <Box flexDirection="column" marginTop={1}>
              <Text dimColor bold>
                EFFICIENCY
              </Text>
              <Text>
                CPU {pct(r.cpuEff)} of {r.cpus} · mem {r.maxRss}/{r.reqMem} ({pct(r.memEff)}) · time {r.elapsed} of{' '}
                {r.limit} ({pct(r.timeEff)}) · exit {r.exitCode}
              </Text>
              {r.advice.map(a => (
                <Text color="cyan">→ {a}</Text>
              ))}
            </Box>
          )}
          <Box flexDirection="column" marginTop={1}>
            <Text dimColor bold>
              LOG (last {Math.min(logRows, detail.log.length)} lines)
            </Text>
            {detail.log.length === 0 && <Text dimColor>(empty or not yet created)</Text>}
            {detail.log.slice(-logRows).map(l => (
              <Text wrap="truncate-end">{l || ' '}</Text>
            ))}
          </Box>
        </Box>
      )}
    </Box>
  )
}
plugins/sprc-slurm-mods/hooks/ui.tsx 71〜193 行 · ペイン
export function Overview(
  el: El,
  props: {
    snap: Snapshot | null
    finished: readonly JobReport[]
    followed: readonly Followed[]
    budget: Budget | null
    now: number
    columns: number
    actions: Actions
  },
) {
  const { Box, Text, Button } = el
  const { snap, finished, followed, budget, now, columns, actions } = props
  if (!snap) return <Text dimColor>Reading cluster state…</Text>
  const followedIds = new Set(followed.map(f => f.id))
  const gpus = gpuTotals(snap.nodes)
  const nameW = Math.max(8, columns - 34)
  const running = snap.mine.filter(j => j.state === 'R' || j.state === 'CG')
  const pending = snap.mine.filter(j => j.state !== 'R' && j.state !== 'CG')
  const shown = [...running, ...pending].slice(0, 10)

  return (
    <Box flexDirection="column">
      <Box flexDirection="row" justifyContent="space-between">
        <Text bold>
          {gpus.usable}/{gpus.total} GPUs free
          {gpus.idle > gpus.usable ? <Text dimColor> (+{gpus.idle - gpus.usable} stranded)</Text> : null}
        </Text>
        <Box flexDirection="row" gap={1}>
          <Text dimColor>{ago(now, snap.at)}</Text>
          <Button key="refresh" label="refresh" hotkey="r" plain onPress={actions.refresh} />
        </Box>
      </Box>
      {snap.error && <Text color="red">Slurm: {snap.error}</Text>}

      <Box flexDirection="column" marginTop={1}>
        <Text dimColor bold>
          NODES
        </Text>
        {snap.nodes.map(n => {
          const cpu = n.cpusTotal ? n.cpusAlloc / n.cpusTotal : 0
          const mem = n.memTotalMb ? n.memAllocMb / n.memTotalMb : 0
          const isOut = /drain|down|fail|maint/i.test(n.state)
          return (
            <Box key={`node-${n.name}`} flexDirection="row" gap={1}>
              <Text>{n.name}</Text>
              <Text color={n.gpusUsed >= n.gpus ? 'red' : nodeUsable(n) === 0 ? 'yellow' : 'green'}>
                {'■'.repeat(n.gpusUsed)}
                {'□'.repeat(Math.max(0, n.gpus - n.gpusUsed))}
              </Text>
              <Text dimColor>cpu</Text>
              <Text color={cpu > 0.9 ? 'red' : undefined}>{bar(cpu, 6)}</Text>
              <Text dimColor>mem</Text>
              <Text>{bar(mem, 4)}</Text>
              <Text color={isOut ? 'red' : undefined} dimColor={!isOut} wrap="truncate-end">
                {n.state}
              </Text>
            </Box>
          )
        })}
      </Box>

      <Box flexDirection="column" marginTop={1}>
        <Text dimColor bold>
          YOUR JOBS {snap.mine.length ? `(${running.length} running · ${pending.length} pending)` : ''}
        </Text>
        {snap.mine.length === 0 && <Text dimColor>none queued or running</Text>}
        {shown.map(j => JobLine(el, j, nameW, followedIds.has(j.id), actions))}
        {snap.mine.length > shown.length && <Text dimColor>+{snap.mine.length - shown.length} more</Text>}
      </Box>

      <Box flexDirection="column" marginTop={1}>
        <Text dimColor bold>
          EVERYONE ELSE
        </Text>
        <Text>
          {snap.others.running} running ({snap.others.gpusRunning} GPU) · {snap.others.pending} pending (
          {snap.others.gpusPending} GPU)
        </Text>
      </Box>

      {finished.length > 0 && (
        <Box flexDirection="column" marginTop={1}>
          <Box flexDirection="row" justifyContent="space-between">
            <Text dimColor bold>
              RECENTLY FINISHED
            </Text>
            <Button key="clear-finished" label="clear" plain onPress={actions.clearFinished} />
          </Box>
          {finished.slice(0, 6).map(r => (
            <Box key={`fin-${r.id}`} flexDirection="column">
              <Box flexDirection="row" gap={1}>
                <Text color={isBad(r.state) ? 'red' : 'green'}>{isBad(r.state) ? '✗' : '✓'}</Text>
                <Button key={`open-fin-${r.id}`} label={r.id} plain onPress={() => actions.open(r.id)} />
                <Text wrap="truncate-end">
                  {shorten(r.name, nameW)} {r.state} {r.elapsed}
                </Text>
              </Box>
              {r.advice.slice(0, 1).map(a => (
                <Text dimColor wrap="truncate-end">
                  {'   → '}
                  {a}
                </Text>
              ))}
            </Box>
          ))}
        </Box>
      )}

      {budget && budget.lines.length > 0 && (
        <Box flexDirection="column" marginTop={1}>
          <Text dimColor bold>
            COURSE BUDGET
          </Text>
          {budget.lines.map(l => (
            <Text wrap="truncate-end">{l}</Text>
          ))}
        </Box>
      )}
    </Box>
  )
}
plugins/sprc-slurm-mods/hooks/ui.tsx 195〜218 行 · ペイン
function JobLine(el: El, j: JobRow, nameW: number, isFollowed: boolean, actions: Actions) {
  const { Box, Text, Button } = el
  const isRun = j.state === 'R'
  const used = durationSeconds(j.elapsed)
  const limit = durationSeconds(j.limit)
  return (
    <Box key={`job-${j.id}`} flexDirection="column">
      <Box flexDirection="row" gap={1}>
        <Text color={STATE_COLOR[j.state]}>{j.state.padEnd(2)}</Text>
        <Button key={`open-${j.id}`} label={j.id} plain onPress={() => actions.open(j.id)} />
        <Text wrap="truncate-end">
          {isFollowed ? '★ ' : ''}
          {shorten(j.name, nameW)}
        </Text>
      </Box>
      <Text dimColor wrap="truncate-end">
        {'      '}
        {isRun
          ? `${bar(used / limit, 8)} ${j.elapsed}/${j.limit} on ${j.nodes}${j.gpus ? ` · ${j.gpus} GPU` : ''}`
          : `${explainReason(j.reason)}${j.start && j.start !== 'N/A' ? ` · est. start ${clock(j.start)}` : ''}`}
      </Text>
    </Box>
  )
}
ライセンスの全文(MIT)
MIT License

Copyright (c) 2026 Max Bromberg

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

コードが呼ぶもの

プログラム起動環境変数Claude を動かすツール呼び出し保存

コードから読み取ったデザイン

読み取ったコミットのソースから描いたもので、動かした結果ではありません。一覧は 3 回描き、条件はデスクトップアプリで描く最初の分岐を取り、動かしたときにだけ決まる値は仮の例(点線の下線)にするか省きます。色と書体はこのサイトのものです。

コードから読めること

2026-10-06 に読んだコミット 97d8a8667019 のソースから。最初のまとまりが載せる条件で、残りは自分で判断するための材料です。後のコミットは、次に読むまで見ていません。

載せる条件: 確かめやすいコード
入口を読んだhooks/hooks.json が名指すモジュールをすべて読んだ。plugins/sprc-slurm-mods/hooks/register.tsx
解析できるすべてのファイルが TypeScript か JavaScript として解析できる。4 ファイルを解析
コードが Mod の中で完結import は Mod 自身のファイルかエンジンのモジュールだけ。パッケージも require もない。コードはすべて Mod の中
読める圧縮した行・eval・new Function・計算した道の import()・符号化した塊がない。圧縮・eval・符号化した塊なし
呼び出しが見える通信とプログラム起動はその場で $.http.fetch・$.process.run と書き、他へ渡さない。外への呼び出しはすべてその場の $ で
入れる前に自分で判断する材料
描く場所コードから読んだ、描く先。ターミナル・デスクトップアプリ・両方・何も描かない(フックだけ: 見張りやプロンプトの書き換え)のどれか。出すだけで、外す理由にはしない。ターミナルとデスクトップアプリに同じように描く
入れる手順リポジトリ自身の .claude-plugin/marketplace.json にこの Mod が載っていて、ページに書いた手順でそのマーケットプレイスから入れられるか。リポジトリの .claude-plugin/marketplace.json に載っており、そこから入れられる
Windows のプログラム$.process で起動するプログラムが Windows にあるか(tail・date・open・osascript・/usr/… などは無い)。Windows にないプログラムを使わない
通信fetch の送り先(https のホスト)がコードに書いてあるか。通信なし
プログラム起動するプログラムの名前がコードに書いてあり、シェル・インタプリタ・通信用の道具でないか。plugins/sprc-slurm-mods/hooks/register.tsx:132 実行時に決まるプログラム; plugins/sprc-slurm-mods/hooks/register.tsx:603 bash(シェル・インタプリタ)
読んで送るファイルや環境変数を読み、かつ通信するか。通信しない
ソースの鍵ソースに API キーや秘密鍵らしきものがあるか。ソースに鍵なし
ライセンスオープンなライセンス(MIT・Apache-2.0・BSD・ISC・Unlicense・0BSD・CC0)で全文があれば、modscode にコードを載せる。違えばリンクだけ。MIT

コードの文面を読んだだけで、安全の審査ではありません。動かしてはおらず、起動するプログラムの中で何が起きるかも見えません。入れる前の確認はあなたの役目です。 載せる条件

入れる

入れる前に、必ず自分で確かめてください。Mod はサンドボックスなしで、あなたの権限で動きます。modscode はこのコードの安全を保証しません。下のコードを読み(またはフォルダーで claude plugin validate .)、触るものを見て、読んだコミットを入れてください。

リポジトリがそのままマーケットプレイスです。このマーケットプレイスを足し(ターミナルでは次のコマンド、デスクトップアプリではプラグインの設定)、そこから Mod を入れます。

/plugin marketplace add platformx-students/sprc-plugins
/plugin install sprc-slurm-mods@sprc-plugins

入るのはマーケットプレイスの最新のコミットで、ここで読んだもの(97d8a8667019)と違うことがあります。入れる前に見比べてください。

Claude に聞く

modscode のコネクタを入れると、Claude がこのデザイン・コードが触るもの・コードを読んで、それをもとに作れます。たとえば:

modscode のデザイン「platformx-students-sprc-slurm-mods」をコードごと読んで、同じようなペインを作って

Claude から探す: MCP コネクタ

似たデザイン