modscode EN

modscode / 図鑑 / podside

podside

A k9s-style Kubernetes pod pane that lives beside Claude Code

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

何をするか

  • 欄・プロンプトの上の帯・トーストを描く
  • /podside を足す
  • prompt.submit・session.end・session.start・ui.close ほか 1 個にフックする
  • ターンをまたいで自分の状態を持つ
  • プロセスを起こす

良いところ

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

作り始めるためのコード

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

雛形(register.tsx)

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

// Drawn like podside by Onur HOSGOR (pane, band, toast), as modscode read it from the mod's code:
// https://modscode.com/gallery/ohosgor-podside/
// 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: "podside" })
  on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
    const { Box, Text, Select, Input, Button } = $.ui.resolve(e)
    const nsLabel = '…'
    const mark = '…'
    const counts = '…'
    const mark2 = '…'
    const counts2 = '…'
    const mark3 = '…'
    const counts3 = '…'
    const context = '…'
    const namespace = '…'
    const query = '…'
    const map = '…'
    const ns = '…'
    const total = '…'
    const failing = '…'
    const ns2 = '…'
    const total2 = '…'
    const failing2 = '…'
    const ns3 = '…'
    const total3 = '…'
    const failing3 = '…'
    const above = '…'
    const below = '…'
    const err = '…'
    return (
      <Box flexDirection="column">
        <Box flexDirection="row" justifyContent="space-between">
          <Text>
            <Text color="#2DD4BF" bold>
              ◆ podside
            </Text>
            <Text dimColor>
              {"  "}
            </Text>
            <Text bold>
              kubectl
            </Text>
            <Text dimColor>
              {" / "}
            </Text>
            <Text bold>
              {nsLabel}
            </Text>
            <Text dimColor>
              {"  "}
            </Text>
          </Text>
          <Text>
            <Text>
              {mark}
              {" "}
              {counts}
              {"  "}
            </Text>
            <Text>
              {mark2}
              {" "}
              {counts2}
              {"  "}
            </Text>
            <Text>
              {mark3}
              {" "}
              {counts3}
              {"  "}
            </Text>
            <Text dimColor>
              sync failed
            </Text>
          </Text>
        </Box>
        <Box gap={2}>
          <Select label="context" value={`${context}`} />
          <Select label="namespace" value={`${namespace}`} options={[{"value":"_all","label":"all"},{"label":"‹option›"}]} />
          <Input label="search" placeholder="name or status" value={`${query}`} />
        </Box>
        <Text dimColor>
          ────────
        </Text>
        <Text dimColor>
          {"   "}
          {map}
        </Text>
        <Box>
          <Text bold>
            {ns}
          </Text>
          <Text dimColor>
            {"  "}
            {total}
            {" pods"}
          </Text>
          <Text color="#EF4444">
            {"  "}
            {failing}
            {" failing"}
          </Text>
        </Box>
        <Box>
          <Text bold>
            {ns2}
          </Text>
          <Text dimColor>
            {"  "}
            {total2}
            {" pods"}
          </Text>
          <Text color="#EF4444">
            {"  "}
            {failing2}
            {" failing"}
          </Text>
        </Box>
        <Box>
          <Text bold>
            {ns3}
          </Text>
          <Text dimColor>
            {"  "}
            {total3}
            {" pods"}
          </Text>
          <Text color="#EF4444">
            {"  "}
            {failing3}
            {" failing"}
          </Text>
        </Box>
        <Text dimColor>
          {"   "}
          {`↑ ${above} above  `}
          {`↓ ${below} below  `}
          j / k to move
        </Text>
        <Box flexDirection="column">
          <Text dimColor>
            ────────
          </Text>
          <Box columnGap={2} flexWrap="wrap">
            <Button plain hotkey="b" label="back" />
            <Button plain hotkey="l" label="logs" />
            <Button plain hotkey="d" label="describe" />
            <Button plain hotkey="a" label="ask Claude" />
            <Button plain hotkey="f" label="show all" />
            <Button plain hotkey="j" label="down" />
            <Button plain hotkey="k" label="up" />
            <Button plain hotkey="n" label="next namespace" />
            <Button plain hotkey="r" label="refresh" />
            <Button plain hotkey="h" label="hide help" />
          </Box>
          <Text color="#EF4444">
            {err}
          </Text>
          <Box flexDirection="column" marginTop={1}>
            <Text bold>
              How to use podside
            </Text>
            <Text>
              <Text color="#2DD4BF">
                Esc
              </Text>
              <Text dimColor>
                hand the keyboard back to the prompt; the pane stays open
              </Text>
            </Text>
            <Text>
              <Text color="#2DD4BF">
                j  k
              </Text>
              <Text dimColor>
                move the selection down or up (↑ ↓ and Tab work too)
              </Text>
            </Text>
            <Text>
              <Text color="#2DD4BF">
                l  d
              </Text>
              <Text dimColor>
                logs (following) or describe of the selected pod
              </Text>
            </Text>
            <Text>
              <Text color="#2DD4BF">
                a
              </Text>
              <Text dimColor>
                ask Claude to diagnose the selected pod
              </Text>
            </Text>
            <Text>
              <Text color="#2DD4BF">
                f  n
              </Text>
              <Text dimColor>
                failing pods only · next namespace
              </Text>
            </Text>
            <Text>
              <Text color="#2DD4BF">
                b  r
              </Text>
              <Text dimColor>
                back to the list · refresh now
              </Text>
            </Text>
            <Text>
              <Text color="#2DD4BF">
                search
              </Text>
              <Text dimColor>
                Tab to the search field and type to filter by name or status
              </Text>
            </Text>
            <Text>
              <Text color="#22C55E">
                {"● running "}
              </Text>
              <Text color="#F59E0B">
                {"◐ starting "}
              </Text>
              <Text color="#EF4444">
                {"✕ failing "}
              </Text>
              <Text dimColor>
                ○ completed
              </Text>
            </Text>
            <Text dimColor>
              While this pane is open, Claude sees the selected pod: just ask "why is this pod failing?"
            </Text>
          </Box>
        </Box>
      </Box>
    )
  })

  // the band above the prompt; what else goes there is drawn under it
  on('ui.render', { component: 'AbovePrompt' }, async ($, e, next) => {
    const { Box, Text, Button } = $.ui.resolve(e)
    const read = '…'
    const ok = '…'
    const bad = '…'
    return (
      <Box flexDirection="column">
        <Box gap={1}>
          <Text color="#2DD4BF">
            ◆
          </Text>
          <Text dimColor>
            {read}
            {" / "}
            all
          </Text>
          <Text color="#22C55E">
            {"● "}
            {ok}
          </Text>
          <Text color="#EF4444">
            {"✕ "}
            {bad}
          </Text>
          <Button label="open pane" plain dimColor />
        </Box>
        {await next(e)}
      </Box>
    )
  })

  on('session.start', async ($, e, next) => {
    await $.ui.toast(`Select a pod first`)
    await $.ui.toast(`Select a pod first`)
    return next(e)
  })
}

Mod 自身のコード

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

hooks/register.tsx 362〜521 行 · ペイン
  on('ui.render', { component: 'Pane', requestId: PANE }, async ($, e) => {
    const els = $.ui.resolve(e)
    const { Box, Text, Button } = els
    // The mobile surface has no Select or Input; skip those controls there
    const Select = 'Select' in els ? els.Select : undefined
    const Input = 'Input' in els ? els.Input : undefined

    const width = Math.max(56, e.props.bodyColumns ?? 100)
    // Docked beside the transcript the pane has a fixed height; inline it grows up to a limit
    const paneRows =
      e.props.placement === 'dock'
        ? (e.props.scroll?.bodyRows ?? 40)
        : Math.max(14, Math.floor((e.viewport?.rows ?? 40) * 0.6))
    const all = await read($, pods)
    const sel = await read($, selected)
    const mode = await read($, view)
    const context = await read($, ctx)
    const namespace = await read($, ns)
    const err = await read($, error)
    const synced = await read($, syncedAt)
    const query = (await read($, filter)).toLowerCase()
    const isFailingOnly = await read($, onlyFailing)
    const showHelp = await read($, isHelpOpen)
    // Lines the bottom bar takes: rule, actions (two when narrow), error, hint or help
    const footerLines = 2 + (width < 100 ? 1 : 0) + (err ? 1 : 0) + (showHelp ? 13 : 1)
    const { k8s } = await read($, info)
    const now = await $.clock.now()
    const nsLabel = namespace === ALL ? 'all namespaces' : namespace

    const counts: Record<Health, number> = { ok: 0, warn: 0, bad: 0, done: 0 }
    for (const pod of all) counts[health(pod)] += 1

    const rule = <Text dimColor>{'─'.repeat(width)}</Text>

    // ── Top bar: wordmark, where you are, health totals ───────────────────
    const isWide = width >= 110
    const topBar = (
      <Box flexDirection={isWide ? 'row' : 'column'} justifyContent="space-between">
        <Text>
          <Text color={P.accent} bold>◆ podside</Text>
          <Text dimColor>{'  '}</Text>
          <Text bold>{context || 'kubectl'}</Text>
          <Text dimColor> / </Text>
          <Text bold>{nsLabel}</Text>
          {k8s ? <Text dimColor>{'  '}{k8s}</Text> : null}
        </Text>
        <Text>
          {(['ok', 'warn', 'bad', 'done'] as const).map(state => (
            <Text color={GLYPH[state].color} dimColor={GLYPH[state].dim}>
              {GLYPH[state].mark} {counts[state]}{'  '}
            </Text>
          ))}
          <Text dimColor>
            {err ? 'sync failed' : synced ? `synced ${ago(now, synced)} ago` : 'loading…'}
          </Text>
        </Text>
      </Box>
    )

    // ── Help: a one-line hint always, the full guide until the user hides it ──
    const hint = (
      <Text dimColor>
        {e.props.isFocused
          ? 'j k select a pod · Esc back to the prompt · h help'
          : 'Click the pane or press ctrl+x then Tab to use it · h help'}
      </Text>
    )
    const helpRow = (keys: string, text: string) => (
      <Text>
        <Text color={P.accent}>{fit(keys, 12)}</Text>
        <Text dimColor>{text}</Text>
      </Text>
    )
    const help = (
      <Box flexDirection="column" marginTop={1}>
        <Text bold>How to use podside</Text>
        {e.props.isFocused
          ? helpRow('Esc', 'hand the keyboard back to the prompt; the pane stays open')
          : helpRow('ctrl+x Tab', 'give the keyboard to the pane (or click it)')}
        {helpRow('j  k', 'move the selection down or up (↑ ↓ and Tab work too)')}
        {helpRow('l  d', 'logs (following) or describe of the selected pod')}
        {helpRow('a', 'ask Claude to diagnose the selected pod')}
        {helpRow('f  n', 'failing pods only · next namespace')}
        {helpRow('b  r', 'back to the list · refresh now')}
        {helpRow('search', 'Tab to the search field and type to filter by name or status')}
        <Text>
          <Text color={GLYPH.ok.color}>● running  </Text>
          <Text color={GLYPH.warn.color}>◐ starting  </Text>
          <Text color={GLYPH.bad.color}>✕ failing  </Text>
          <Text dimColor>○ completed</Text>
        </Text>
        <Text dimColor>
          While this pane is open, Claude sees the selected pod: just ask "why is this pod failing?"
        </Text>
      </Box>
    )

    // ── Bottom bar: every action, one key each ─────────────────────────────
    const action = (hotkey: string, label: string, onPress: () => void) => (
      <Button key={`do:${hotkey}`} plain hotkey={hotkey} label={label} onPress={onPress} />
    )
    const bottomBar = (
      <Box flexDirection="column">
        {rule}
        <Box columnGap={2} flexWrap="wrap">
          {mode !== 'list' && action('b', 'back', () => void update($, view, () => 'list'))}
          {action('l', 'logs', () => void loadDetail($, 'logs'))}
          {action('d', 'describe', () => void loadDetail($, 'describe'))}
          {action('a', 'ask Claude', () => void askClaude($))}
          {mode === 'list' &&
            action('f', isFailingOnly ? 'show all' : 'failing only', () =>
              void update($, onlyFailing, v => !v),
            )}
          {mode === 'list' && action('j', 'down', () => void moveSelection($, 1))}
          {mode === 'list' && action('k', 'up', () => void moveSelection($, -1))}
          {mode === 'list' && action('n', 'next namespace', () => void nextNamespace($))}
          {action('r', 'refresh', () => void refreshPods($))}
          {action('h', showHelp ? 'hide help' : 'help', () => void toggleHelp($))}
        </Box>
        {err && <Text color={P.bad}>{fit(err, width)}</Text>}
        {showHelp ? help : hint}
      </Box>
    )

    // ── Logs / describe ───────────────────────────────────────────────────
    if (mode !== 'list') {
      const raw = (await read($, detail)).split('\n')
      // Logs stay pinned to the newest lines; describe reads from the top
      const room = Math.max(5, paneRows - 3 - footerLines)
      const lines = mode === 'logs' ? raw.slice(-room) : raw.slice(0, 400)
      return (
        <Box flexDirection="column">
          {topBar}
          <Text>
            <Text color={P.accent}>▌</Text>
            <Text bold> {sel ?? ''}</Text>
            <Text dimColor>
              {'  '}
              {mode === 'logs' ? 'logs · following' : 'describe'}
            </Text>
          </Text>
          {rule}
          {lines.map(line => {
            const m = mode === 'describe' ? /^(\s*)([^:]{1,40}:)(.*)$/.exec(line) : null
            return m ? (
              <Text>
                <Text dimColor>{m[1]}{m[2]}</Text>
                <Text>{fit(m[3] ?? '', width - (m[1]?.length ?? 0) - (m[2]?.length ?? 0))}</Text>
              </Text>
            ) : (
              <Text>{fit(line, width)}</Text>
            )
          })}
          {bottomBar}
        </Box>
      )
    }

    // ── Pod list, grouped by namespace ─────────────────────────────────────
    const controls = (
hooks/register.tsx 660〜678 行 · バンド
  on('ui.render', { component: 'AbovePrompt' }, async ($, e, next) => {
    if (e.props.hasSurvey || !(await read($, isActive)) || (await read($, error))) return next(e)
    const list = await read($, pods)
    const bad = list.filter(p => health(p) === 'bad').length
    const ok = list.filter(p => health(p) === 'ok').length
    const namespace = await read($, ns)
    const { Box, Text, Button } = $.ui.resolve(e)
    return (
      <Box gap={1}>
        <Text color={P.accent}>◆</Text>
        <Text dimColor>
          {await read($, ctx)} / {namespace === ALL ? 'all' : namespace}
        </Text>
        <Text color={P.ok}>● {ok}</Text>
        {bad > 0 && <Text color={P.bad}>✕ {bad}</Text>}
        <Button key="open" label="open pane" plain dimColor onPress={() => void openPane($)} />
      </Box>
    )
  })
ライセンスの全文(Apache-2.0)
                                 Apache License
                           Version 2.0, January 2004
                        http://www.apache.org/licenses/

   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

   1. Definitions.

      "License" shall mean the terms and conditions for use, reproduction,
      and distribution as defined by Sections 1 through 9 of this document.

      "Licensor" shall mean the copyright owner or entity authorized by
      the copyright owner that is granting the License.

      "Legal Entity" shall mean the union of the acting entity and all
      other entities that control, are controlled by, or are under common
      control with that entity. For the purposes of this definition,
      "control" means (i) the power, direct or indirect, to cause the
      direction or management of such entity, whether by contract or
      otherwise, or (ii) ownership of fifty percent (50%) or more of the
      outstanding shares, or (iii) beneficial ownership of such entity.

      "You" (or "Your") shall mean an individual or Legal Entity
      exercising permissions granted by this License.

      "Source" form shall mean the preferred form for making modifications,
      including but not limited to software source code, documentation
      source, and configuration files.

      "Object" form shall mean any form resulting from mechanical
      transformation or translation of a Source form, including but
      not limited to compiled object code, generated documentation,
      and conversions to other media types.

      "Work" shall mean the work of authorship, whether in Source or
      Object form, made available under the License, as indicated by a
      copyright notice that is included in or attached to the work
      (an example is provided in the Appendix below).

      "Derivative Works" shall mean any work, whether in Source or Object
      form, that is based on (or derived from) the Work and for which the
      editorial revisions, annotations, elaborations, or other modifications
      represent, as a whole, an original work of authorship. For the purposes
      of this License, Derivative Works shall not include works that remain
      separable from, or merely link (or bind by name) to the interfaces of,
      the Work and Derivative Works thereof.

      "Contribution" shall mean any work of authorship, including
      the original version of the Work and any modifications or additions
      to that Work or Derivative Works thereof, that is intentionally
      submitted to Licensor for inclusion in the Work by the copyright owner
      or by an individual or Legal Entity authorized to submit on behalf of
      the copyright owner. For the purposes of this definition, "submitted"
      means any form of electronic, verbal, or written communication sent
      to the Licensor or its representatives, including but not limited to
      communication on electronic mailing lists, source code control systems,
      and issue tracking systems that are managed by, or on behalf of, the
      Licensor for the purpose of discussing and improving the Work, but
      excluding communication that is conspicuously marked or otherwise
      designated in writing by the copyright owner as "Not a Contribution."

      "Contributor" shall mean Licensor and any individual or Legal Entity
      on behalf of whom a Contribution has been received by Licensor and
      subsequently incorporated within the Work.

   2. Grant of Copyright License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      copyright license to reproduce, prepare Derivative Works of,
      publicly display, publicly perform, sublicense, and distribute the
      Work and such Derivative Works in Source or Object form.

   3. Grant of Patent License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      (except as stated in this section) patent license to make, have made,
      use, offer to sell, sell, import, and otherwise transfer the Work,
      where such license applies only to those patent claims licensable
      by such Contributor that are necessarily infringed by their
      Contribution(s) alone or by combination of their Contribution(s)
      with the Work to which such Contribution(s) was submitted. If You
      institute patent litigation against any entity (including a
      cross-claim or counterclaim in a lawsuit) alleging that the Work
      or a Contribution incorporated within the Work constitutes direct
      or contributory patent infringement, then any patent licenses
      granted to You under this License for that Work shall terminate
      as of the date such litigation is filed.

   4. Redistribution. You may reproduce and distribute copies of the
      Work or Derivative Works thereof in any medium, with or without
      modifications, and in Source or Object form, provided that You
      meet the following conditions:

      (a) You must give any other recipients of the Work or
          Derivative Works a copy of this License; and

      (b) You must cause any modified files to carry prominent notices
          stating that You changed the files; and

      (c) You must retain, in the Source form of any Derivative Works
          that You distribute, all copyright, patent, trademark, and
          attribution notices from the Source form of the Work,
          excluding those notices that do not pertain to any part of
          the Derivative Works; and

      (d) If the Work includes a "NOTICE" text file as part of its
          distribution, then any Derivative Works that You distribute must
          include a readable copy of the attribution notices contained
          within such NOTICE file, excluding those notices that do not
          pertain to any part of the Derivative Works, in at least one
          of the following places: within a NOTICE text file distributed
          as part of the Derivative Works; within the Source form or
          documentation, if provided along with the Derivative Works; or,
          within a display generated by the Derivative Works, if and
          wherever such third-party notices normally appear. The contents
          of the NOTICE file are for informational purposes only and
          do not modify the License. You may add Your own attribution
          notices within Derivative Works that You distribute, alongside
          or as an addendum to the NOTICE text from the Work, provided
          that such additional attribution notices cannot be construed
          as modifying the License.

      You may add Your own copyright statement to Your modifications and
      may provide additional or different license terms and conditions
      for use, reproduction, or distribution of Your modifications, or
      for any such Derivative Works as a whole, provided Your use,
      reproduction, and distribution of the Work otherwise complies with
      the conditions stated in this License.

   5. Submission of Contributions. Unless You explicitly state otherwise,
      any Contribution intentionally submitted for inclusion in the Work
      by You to the Licensor shall be under the terms and conditions of
      this License, without any additional terms or conditions.
      Notwithstanding the above, nothing herein shall supersede or modify
      the terms of any separate license agreement you may have executed
      with Licensor regarding such Contributions.

   6. Trademarks. This License does not grant permission to use the trade
      names, trademarks, service marks, or product names of the Licensor,
      except as required for reasonable and customary use in describing the
      origin of the Work and reproducing the content of the NOTICE file.

   7. Disclaimer of Warranty. Unless required by applicable law or
      agreed to in writing, Licensor provides the Work (and each
      Contributor provides its Contributions) on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
      implied, including, without limitation, any warranties or conditions
      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
      PARTICULAR PURPOSE. You are solely responsible for determining the
      appropriateness of using or redistributing the Work and assume any
      risks associated with Your exercise of permissions under this License.

   8. Limitation of Liability. In no event and under no legal theory,
      whether in tort (including negligence), contract, or otherwise,
      unless required by applicable law (such as deliberate and grossly
      negligent acts) or agreed to in writing, shall any Contributor be
      liable to You for damages, including any direct, indirect, special,
      incidental, or consequential damages of any character arising as a
      result of this License or out of the use or inability to use the
      Work (including but not limited to damages for loss of goodwill,
      work stoppage, computer failure or malfunction, or any and all
      other commercial damages or losses), even if such Contributor
      has been advised of the possibility of such damages.

   9. Accepting Warranty or Additional Liability. While redistributing
      the Work or Derivative Works thereof, You may choose to offer,
      and charge a fee for, acceptance of support, warranty, indemnity,
      or other liability obligations and/or rights consistent with this
      License. However, in accepting such obligations, You may act only
      on Your own behalf and on Your sole responsibility, not on behalf
      of any other Contributor, and only if You agree to indemnify,
      defend, and hold each Contributor harmless for any liability
      incurred by, or claims asserted against, such Contributor by reason
      of your accepting any such warranty or additional liability.

   END OF TERMS AND CONDITIONS

   APPENDIX: How to apply the Apache License to your work.

      To apply the Apache License to your work, attach the following
      boilerplate notice, with the fields enclosed by brackets "[]"
      replaced with your own identifying information. (Don't include
      the brackets!)  The text should be enclosed in the appropriate
      comment syntax for the file format. We also recommend that a
      file or class name and description of purpose be included on the
      same "printed page" as the copyright notice for easier
      identification within third-party archives.

   Copyright [yyyy] [name of copyright owner]

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.

コードが呼ぶもの

プログラム起動Claude を動かす保存

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

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

コードから読めること

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

載せる条件: 確かめやすいコード
入口を読んだhooks/hooks.json が名指すモジュールをすべて読んだ。hooks/register.tsx
解析できるすべてのファイルが TypeScript か JavaScript として解析できる。1 ファイルを解析
コードが 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 のホスト)がコードに書いてあるか。通信なし
プログラム起動するプログラムの名前がコードに書いてあり、シェル・インタプリタ・通信用の道具でないか。kubectl(通信する)
読んで送るファイルや環境変数を読み、かつ通信するか。通信するが、ファイルも環境変数も読まない
ソースの鍵ソースに API キーや秘密鍵らしきものがあるか。ソースに鍵なし
ライセンスオープンなライセンス(MIT・Apache-2.0・BSD・ISC・Unlicense・0BSD・CC0)で全文があれば、modscode にコードを載せる。違えばリンクだけ。Apache-2.0

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

入れる

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

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

/plugin marketplace add ohosgor/podside
/plugin install podside@podside

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

Claude に聞く

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

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

Claude から探す: MCP コネクタ

似たデザイン