modscode EN

modscode / 図鑑 / gh-pane

gh-pane

A docked pane of the session repo's issues and PRs in run order, with buttons that fill the next command, plus two for this session's merge gate: send the merge reply, then clear and run the next command.

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

何をするか

  • プロンプトの上の帯・欄・トーストを描く
  • /gh-pane を足す
  • Bash の呼び出しを見張る(止めることがある)
  • prompt.submit・session.end・session.start・turn.complete ほか 1 個にフックする
  • ターンをまたいで自分の状態を持つ

良いところ

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

作り始めるためのコード

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

雛形(register.tsx)

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

// Drawn like gh-pane by Ahmed Gharib (pane, band, toast), as modscode read it from the mod's code:
// https://modscode.com/gallery/gharib89-claude-mods-gh-pane/
// 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 band above the prompt; what else goes there is drawn under it
  on('ui.render', { component: 'AbovePrompt' }, async ($, e, next) => {
    const { Box, Button, Text } = $.ui.resolve(e)
    const buttonIcon = '…'
    const pr = '…'
    const text = '…'
    return (
      <Box flexDirection="column">
        <Box gap={2}>
          <Button plain label={`Hide gh-pane ${buttonIcon}`} />
          <Button hotkey="m" label={`merge PR #${pr}`} />
          <Text color="cyan">
            {`merging PR #${pr}…`}
          </Text>
          <Button hotkey="n" label={`clear + ${text}`} />
        </Box>
        {await next(e)}
      </Box>
    )
  })

  // the pane: open it with $.ui.open({ id: 'my-pane', title: "gh-pane" })
  on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
    const { Box, Text, Button, Link } = $.ui.resolve(e)
    const prs = '…'
    const prCap = '…'
    const ready = '…'
    const length = '…'
    const stale = '…'
    const repo = '…'
    const kind = '…'
    const n = '…'
    const title = '…'
    const done = '…'
    const total = '…'
    const tag = '…'
    const url = '…'
    const label = '…'
    const pad = '…'
    const text = '…'
    const title2 = '…'
    const tag2 = '…'
    const pad2 = '…'
    const text2 = '…'
    const title3 = '…'
    const tag3 = '…'
    const pad3 = '…'
    const text3 = '…'
    const ref = '…'
    const title4 = '…'
    const tag4 = '…'
    const ref2 = '…'
    const blockers = '…'
    const pad4 = '…'
    const text4 = '…'
    const ref3 = '…'
    const title5 = '…'
    const tag5 = '…'
    const ref4 = '…'
    const blockers2 = '…'
    const pad5 = '…'
    const text5 = '…'
    const ref5 = '…'
    const title6 = '…'
    const tag6 = '…'
    const ref6 = '…'
    const blockers3 = '…'
    const pad6 = '…'
    const text6 = '…'
    const title7 = '…'
    const tag7 = '…'
    const pad7 = '…'
    const text7 = '…'
    const ref7 = '…'
    const title8 = '…'
    const tag8 = '…'
    const ref8 = '…'
    const blockers4 = '…'
    const pad8 = '…'
    const text8 = '…'
    const ref9 = '…'
    const title9 = '…'
    const tag9 = '…'
    const ref10 = '…'
    const blockers5 = '…'
    const pad9 = '…'
    const text9 = '…'
    const ref11 = '…'
    const title10 = '…'
    const tag10 = '…'
    const ref12 = '…'
    const blockers6 = '…'
    const pad10 = '…'
    const text10 = '…'
    const title11 = '…'
    const tag11 = '…'
    const pad11 = '…'
    const text11 = '…'
    const ref13 = '…'
    const title12 = '…'
    const tag12 = '…'
    const ref14 = '…'
    const blockers7 = '…'
    const pad12 = '…'
    const text12 = '…'
    const ref15 = '…'
    const title13 = '…'
    const tag13 = '…'
    const ref16 = '…'
    const blockers8 = '…'
    const pad13 = '…'
    const text13 = '…'
    const ref17 = '…'
    const title14 = '…'
    const tag14 = '…'
    const ref18 = '…'
    const blockers9 = '…'
    const pad14 = '…'
    const text14 = '…'
    const title15 = '…'
    const tag15 = '…'
    const pad15 = '…'
    const text15 = '…'
    const title16 = '…'
    const tag16 = '…'
    const pad16 = '…'
    const text16 = '…'
    const ref19 = '…'
    const title17 = '…'
    const tag17 = '…'
    const ref20 = '…'
    const blockers10 = '…'
    const pad17 = '…'
    const text17 = '…'
    const ref21 = '…'
    const title18 = '…'
    const tag18 = '…'
    const ref22 = '…'
    const blockers11 = '…'
    const pad18 = '…'
    const text18 = '…'
    const ref23 = '…'
    const title19 = '…'
    const tag19 = '…'
    const ref24 = '…'
    const blockers12 = '…'
    const pad19 = '…'
    const text19 = '…'
    const title20 = '…'
    const tag20 = '…'
    const pad20 = '…'
    const text20 = '…'
    const ref25 = '…'
    const title21 = '…'
    const tag21 = '…'
    const ref26 = '…'
    const blockers13 = '…'
    const pad21 = '…'
    const text21 = '…'
    const ref27 = '…'
    const title22 = '…'
    const tag22 = '…'
    const ref28 = '…'
    const blockers14 = '…'
    const pad22 = '…'
    const text22 = '…'
    const ref29 = '…'
    const title23 = '…'
    const tag23 = '…'
    const ref30 = '…'
    const blockers15 = '…'
    const pad23 = '…'
    const text23 = '…'
    return (
      <Box flexDirection="column">
        <Box gap={1}>
          <Text color="yellow">
            {`PR cap ${prs}/${prCap} · ready now: ${ready} · runs: ${length} active · ${stale} stale`}
          </Text>
          <Button plain label="↻" />
        </Box>
        <Box flexDirection="column" marginTop={1}>
          <Box gap={1}>
            <Text dimColor>
              ▾
            </Text>
            <Text>
              <Link href={`https://github.com/${repo}/${kind}/${n}`} label={`#${n}`} />
              {" "}
              {title}
            </Text>
            <Text dimColor>
              {`████████ ${done}/${total}`}
            </Text>
            <Text>
              {tag}
              <Link href={`https://github.com/${repo}/pull/${n}`} label={`#${n}`} />
              {", "}
              <Link href={`${url}`} label={`${label}`} />
              {", "}
              <Link href={`${url}`} label={`${label}`} />
              {", "}
              <Link href={`${url}`} label={`${label}`} />
            </Text>
            <Button plain label="ship" />
            <Button plain label="next" />
            <Button plain label="close" />
            <Button plain label="triage" />
          </Box>
          <Box gap={1}>
            <Text dimColor>
              {pad}
            </Text>
            <Text color="red">
              {text}
            </Text>
            <Button plain label="release" />
          </Box>
          <Text dimColor>
            {`  ├ ✓ ${done} done`}
          </Text>
          <Box gap={1}>
            <Text dimColor>
              {"  └"}
            </Text>
            <Text>
              <Link href={`https://github.com/${repo}/${kind}/${n}`} label={`#${n}`} />
              {" "}
              {title2}
            </Text>
            <Text dimColor>
              {`████████ ${done}/${total}`}
            </Text>
            <Text>
              {tag2}
              <Link href={`https://github.com/${repo}/pull/${n}`} label={`#${n}`} />
              {", "}
              <Link href={`${url}`} label={`${label}`} />
              {", "}
              <Link href={`${url}`} label={`${label}`} />
              {", "}
              <Link href={`${url}`} label={`${label}`} />
            </Text>
            <Button plain label="ship" />
            <Button plain label="next" />
            <Button plain label="close" />
            <Button plain label="triage" />
          </Box>
          <Box gap={1}>
            <Text dimColor>
              {pad2}
            </Text>
            <Text color="red">
              {text2}
            </Text>
            <Button plain label="release" />
          </Box>
          <Text dimColor>
            {`    ├ ✓ ${done} done`}
          </Text>
          <Box gap={1}>
            <Text dimColor>
              {"    └"}
            </Text>
            <Text>
              <Link href={`https://github.com/${repo}/${kind}/${n}`} label={`#${n}`} />
              {" "}
              {title3}
            </Text>
            <Text dimColor>
              {`████████ ${done}/${total}`}
            </Text>
            <Text>
              {tag3}
              <Link href={`https://github.com/${repo}/pull/${n}`} label={`#${n}`} />
              {", "}
              <Link href={`${url}`} label={`${label}`} />
              {", "}
              <Link href={`${url}`} label={`${label}`} />
              {", "}
              <Link href={`${url}`} label={`${label}`} />
            </Text>
            <Button plain label="ship" />
            <Button plain label="next" />
            <Button plain label="close" />
            <Button plain label="triage" />
          </Box>
          <Box gap={1}>
            <Text dimColor>
              {pad3}
            </Text>
            <Text color="red">
              {text3}
            </Text>
            <Button plain label="release" />
          </Box>
          <Text dimColor>
            {`      ├ ✓ ${done} done`}
          </Text>
          <Box gap={1}>
            <Text dimColor>
              {"      └"}
            </Text>
            <Text>
              {ref}
              {" "}
              {title4}
            </Text>
            <Text dimColor>
              {`████████ ${done}/${total}`}
            </Text>
            <Text>
              {tag4}
              {ref2}
              {blockers}
            </Text>
            <Button plain label="ship" />
            <Button plain label="next" />
            <Button plain label="close" />
            <Button plain label="triage" />
          </Box>
          <Box gap={1}>
            <Text dimColor>
              {pad4}
            </Text>
            <Text color="red">
              {text4}
            </Text>
            <Button plain label="release" />
          </Box>
          <Text dimColor>
            {`        ├ ✓ ${done} done`}
          </Text>
          <Box gap={1}>
            <Text dimColor>
              {"      └"}
            </Text>
            <Text>
              {ref3}
              {" "}
              {title5}
            </Text>
            <Text dimColor>
              {`████████ ${done}/${total}`}
            </Text>
            <Text>
              {tag5}
              {ref4}
              {blockers2}
            </Text>
            <Button plain label="ship" />
            <Button plain label="next" />
            <Button plain label="close" />
            <Button plain label="triage" />
          </Box>
          <Box gap={1}>
            <Text dimColor>
              {pad5}
            </Text>
            <Text color="red">
              {text5}
            </Text>
            <Button plain label="release" />
          </Box>
          <Text dimColor>
            {`        ├ ✓ ${done} done`}
          </Text>
          <Box gap={1}>
            <Text dimColor>
              {"      └"}
            </Text>
            <Text>
              {ref5}
              {" "}
              {title6}
            </Text>
            <Text dimColor>
              {`████████ ${done}/${total}`}
            </Text>
            <Text>
              {tag6}
              {ref6}
              {blockers3}
            </Text>
            <Button plain label="ship" />
            <Button plain label="next" />
            <Button plain label="close" />
            <Button plain label="triage" />
          </Box>
          <Box gap={1}>
            <Text dimColor>
              {pad6}
            </Text>
            <Text color="red">
              {text6}
            </Text>
            <Button plain label="release" />
          </Box>
          <Text dimColor>
            {`        ├ ✓ ${done} done`}
          </Text>
          <Box gap={1}>
            <Text dimColor>
              {"    └"}
            </Text>
            <Text>
              <Link href={`https://github.com/${repo}/${kind}/${n}`} label={`#${n}`} />
              {" "}
              {title7}
            </Text>
            <Text dimColor>
              {`████████ ${done}/${total}`}
            </Text>
            <Text>
              {tag7}
              <Link href={`https://github.com/${repo}/pull/${n}`} label={`#${n}`} />
              {", "}
              <Link href={`${url}`} label={`${label}`} />
              {", "}
              <Link href={`${url}`} label={`${label}`} />
              {", "}
              <Link href={`${url}`} label={`${label}`} />
            </Text>
            <Button plain label="ship" />
            <Button plain label="next" />
            <Button plain label="close" />
            <Button plain label="triage" />
          </Box>
          <Box gap={1}>
            <Text dimColor>
              {pad7}
            </Text>
            <Text color="red">
              {text7}
            </Text>
            <Button plain label="release" />
          </Box>
          <Text dimColor>
            {`      ├ ✓ ${done} done`}
          </Text>
          <Box gap={1}>
            <Text dimColor>
              {"      └"}
            </Text>
            <Text>
              {ref7}
              {" "}
              {title8}
            </Text>
            <Text dimColor>
              {`████████ ${done}/${total}`}
            </Text>
            <Text>
              {tag8}
              {ref8}
              {blockers4}
            </Text>
            <Button plain label="ship" />
            <Button plain label="next" />
            <Button plain label="close" />
            <Button plain label="triage" />
          </Box>
          <Box gap={1}>
            <Text dimColor>
              {pad8}
            </Text>
            <Text color="red">
              {text8}
            </Text>
            <Button plain label="release" />
          </Box>
          <Text dimColor>
            {`        ├ ✓ ${done} done`}
          </Text>
          <Box gap={1}>
            <Text dimColor>
              {"      └"}
            </Text>
            <Text>
              {ref9}
              {" "}
              {title9}
            </Text>
            <Text dimColor>
              {`████████ ${done}/${total}`}
            </Text>
            <Text>
              {tag9}
              {ref10}
              {blockers5}
            </Text>
            <Button plain label="ship" />
            <Button plain label="next" />
            <Button plain label="close" />
            <Button plain label="triage" />
          </Box>
          <Box gap={1}>
            <Text dimColor>
              {pad9}
            </Text>
            <Text color="red">
              {text9}
            </Text>
            <Button plain label="release" />
          </Box>
          <Text dimColor>
            {`        ├ ✓ ${done} done`}
          </Text>
          <Box gap={1}>
            <Text dimColor>
              {"      └"}
            </Text>
            <Text>
              {ref11}
              {" "}
              {title10}
            </Text>
            <Text dimColor>
              {`████████ ${done}/${total}`}
            </Text>
            <Text>
              {tag10}
              {ref12}
              {blockers6}
            </Text>
            <Button plain label="ship" />
            <Button plain label="next" />
            <Button plain label="close" />
            <Button plain label="triage" />
          </Box>
          <Box gap={1}>
            <Text dimColor>
              {pad10}
            </Text>
            <Text color="red">
              {text10}
            </Text>
            <Button plain label="release" />
          </Box>
          <Text dimColor>
            {`        ├ ✓ ${done} done`}
          </Text>
          <Box gap={1}>
            <Text dimColor>
              {"    └"}
            </Text>
            <Text>
              <Link href={`https://github.com/${repo}/${kind}/${n}`} label={`#${n}`} />
              {" "}
              {title11}
            </Text>
            <Text dimColor>
              {`████████ ${done}/${total}`}
            </Text>
            <Text>
              {tag11}
              <Link href={`https://github.com/${repo}/pull/${n}`} label={`#${n}`} />
              {", "}
              <Link href={`${url}`} label={`${label}`} />
              {", "}
              <Link href={`${url}`} label={`${label}`} />
              {", "}
              <Link href={`${url}`} label={`${label}`} />
            </Text>
            <Button plain label="ship" />
            <Button plain label="next" />
            <Button plain label="close" />
            <Button plain label="triage" />
          </Box>
          <Box gap={1}>
            <Text dimColor>
              {pad11}
            </Text>
            <Text color="red">
              {text11}
            </Text>
            <Button plain label="release" />
          </Box>
          <Text dimColor>
            {`      ├ ✓ ${done} done`}
          </Text>
          <Box gap={1}>
            <Text dimColor>
              {"      └"}
            </Text>
            <Text>
              {ref13}
              {" "}
              {title12}
            </Text>
            <Text dimColor>
              {`████████ ${done}/${total}`}
            </Text>
            <Text>
              {tag12}
              {ref14}
              {blockers7}
            </Text>
            <Button plain label="ship" />
            <Button plain label="next" />
            <Button plain label="close" />
            <Button plain label="triage" />
          </Box>
          <Box gap={1}>
            <Text dimColor>
              {pad12}
            </Text>
            <Text color="red">
              {text12}
            </Text>
            <Button plain label="release" />
          </Box>
          <Text dimColor>
            {`        ├ ✓ ${done} done`}
          </Text>
          <Box gap={1}>
            <Text dimColor>
              {"      └"}
            </Text>
            <Text>
              {ref15}
              {" "}
              {title13}
            </Text>
            <Text dimColor>
              {`████████ ${done}/${total}`}
            </Text>
            <Text>
              {tag13}
              {ref16}
              {blockers8}
            </Text>
            <Button plain label="ship" />
            <Button plain label="next" />
            <Button plain label="close" />
            <Button plain label="triage" />
          </Box>
          <Box gap={1}>
            <Text dimColor>
              {pad13}
            </Text>
            <Text color="red">
              {text13}
            </Text>
            <Button plain label="release" />
          </Box>
          <Text dimColor>
            {`        ├ ✓ ${done} done`}
          </Text>
          <Box gap={1}>
            <Text dimColor>
              {"      └"}
            </Text>
            <Text>
              {ref17}
              {" "}
              {title14}
            </Text>
            <Text dimColor>
              {`████████ ${done}/${total}`}
            </Text>
            <Text>
              {tag14}
              {ref18}
              {blockers9}
            </Text>
            <Button plain label="ship" />
            <Button plain label="next" />
            <Button plain label="close" />
            <Button plain label="triage" />
          </Box>
          <Box gap={1}>
            <Text dimColor>
              {pad14}
            </Text>
            <Text color="red">
              {text14}
            </Text>
            <Button plain label="release" />
          </Box>
          <Text dimColor>
            {`        ├ ✓ ${done} done`}
          </Text>
          <Box gap={1}>
            <Text dimColor>
              {"  └"}
            </Text>
            <Text>
              <Link href={`https://github.com/${repo}/${kind}/${n}`} label={`#${n}`} />
              {" "}
              {title15}
            </Text>
            <Text dimColor>
              {`████████ ${done}/${total}`}
            </Text>
            <Text>
              {tag15}
              <Link href={`https://github.com/${repo}/pull/${n}`} label={`#${n}`} />
              {", "}
              <Link href={`${url}`} label={`${label}`} />
              {", "}
              <Link href={`${url}`} label={`${label}`} />
              {", "}
              <Link href={`${url}`} label={`${label}`} />
            </Text>
            <Button plain label="ship" />
            <Button plain label="next" />
            <Button plain label="close" />
            <Button plain label="triage" />
          </Box>
          <Box gap={1}>
            <Text dimColor>
              {pad15}
            </Text>
            <Text color="red">
              {text15}
            </Text>
            <Button plain label="release" />
          </Box>
          <Text dimColor>
            {`    ├ ✓ ${done} done`}
          </Text>
          <Box gap={1}>
            <Text dimColor>
              {"    └"}
            </Text>
            <Text>
              <Link href={`https://github.com/${repo}/${kind}/${n}`} label={`#${n}`} />
              {" "}
              {title16}
            </Text>
            <Text dimColor>
              {`████████ ${done}/${total}`}
            </Text>
            <Text>
              {tag16}
              <Link href={`https://github.com/${repo}/pull/${n}`} label={`#${n}`} />
              {", "}
              <Link href={`${url}`} label={`${label}`} />
              {", "}
              <Link href={`${url}`} label={`${label}`} />
              {", "}
              <Link href={`${url}`} label={`${label}`} />
            </Text>
            <Button plain label="ship" />
            <Button plain label="next" />
            <Button plain label="close" />
            <Button plain label="triage" />
          </Box>
          <Box gap={1}>
            <Text dimColor>
              {pad16}
            </Text>
            <Text color="red">
              {text16}
            </Text>
            <Button plain label="release" />
          </Box>
          <Text dimColor>
            {`      ├ ✓ ${done} done`}
          </Text>
          <Box gap={1}>
            <Text dimColor>
              {"      └"}
            </Text>
            <Text>
              {ref19}
              {" "}
              {title17}
            </Text>
            <Text dimColor>
              {`████████ ${done}/${total}`}
            </Text>
            <Text>
              {tag17}
              {ref20}
              {blockers10}
            </Text>
            <Button plain label="ship" />
            <Button plain label="next" />
            <Button plain label="close" />
            <Button plain label="triage" />
          </Box>
          <Box gap={1}>
            <Text dimColor>
              {pad17}
            </Text>
            <Text color="red">
              {text17}
            </Text>
            <Button plain label="release" />
          </Box>
          <Text dimColor>
            {`        ├ ✓ ${done} done`}
          </Text>
          <Box gap={1}>
            <Text dimColor>
              {"      └"}
            </Text>
            <Text>
              {ref21}
              {" "}
              {title18}
            </Text>
            <Text dimColor>
              {`████████ ${done}/${total}`}
            </Text>
            <Text>
              {tag18}
              {ref22}
              {blockers11}
            </Text>
            <Button plain label="ship" />
            <Button plain label="next" />
            <Button plain label="close" />
            <Button plain label="triage" />
          </Box>
          <Box gap={1}>
            <Text dimColor>
              {pad18}
            </Text>
            <Text color="red">
              {text18}
            </Text>
            <Button plain label="release" />
          </Box>
          <Text dimColor>
            {`        ├ ✓ ${done} done`}
          </Text>
          <Box gap={1}>
            <Text dimColor>
              {"      └"}
            </Text>
            <Text>
              {ref23}
              {" "}
              {title19}
            </Text>
            <Text dimColor>
              {`████████ ${done}/${total}`}
            </Text>
            <Text>
              {tag19}
              {ref24}
              {blockers12}
            </Text>
            <Button plain label="ship" />
            <Button plain label="next" />
            <Button plain label="close" />
            <Button plain label="triage" />
          </Box>
          <Box gap={1}>
            <Text dimColor>
              {pad19}
            </Text>
            <Text color="red">
              {text19}
            </Text>
            <Button plain label="release" />
          </Box>
          <Text dimColor>
            {`        ├ ✓ ${done} done`}
          </Text>
          <Box gap={1}>
            <Text dimColor>
              {"    └"}
            </Text>
            <Text>
              <Link href={`https://github.com/${repo}/${kind}/${n}`} label={`#${n}`} />
              {" "}
              {title20}
            </Text>
            <Text dimColor>
              {`████████ ${done}/${total}`}
            </Text>
            <Text>
              {tag20}
              <Link href={`https://github.com/${repo}/pull/${n}`} label={`#${n}`} />
              {", "}
              <Link href={`${url}`} label={`${label}`} />
              {", "}
              <Link href={`${url}`} label={`${label}`} />
              {", "}
              <Link href={`${url}`} label={`${label}`} />
            </Text>
            <Button plain label="ship" />
            <Button plain label="next" />
            <Button plain label="close" />
            <Button plain label="triage" />
          </Box>
          <Box gap={1}>
            <Text dimColor>
              {pad20}
            </Text>
            <Text color="red">
              {text20}
            </Text>
            <Button plain label="release" />
          </Box>
          <Text dimColor>
            {`      ├ ✓ ${done} done`}
          </Text>
          <Box gap={1}>
            <Text dimColor>
              {"      └"}
            </Text>
            <Text>
              {ref25}
              {" "}
              {title21}
            </Text>
            <Text dimColor>
              {`████████ ${done}/${total}`}
            </Text>
            <Text>
              {tag21}
              {ref26}
              {blockers13}
            </Text>
            <Button plain label="ship" />
            <Button plain label="next" />
            <Button plain label="close" />
            <Button plain label="triage" />
          </Box>
          <Box gap={1}>
            <Text dimColor>
              {pad21}
            </Text>
            <Text color="red">
              {text21}
            </Text>
            <Button plain label="release" />
          </Box>
          <Text dimColor>
            {`        ├ ✓ ${done} done`}
          </Text>
          <Box gap={1}>
            <Text dimColor>
              {"      └"}
            </Text>
            <Text>
              {ref27}
              {" "}
              {title22}
            </Text>
            <Text dimColor>
              {`████████ ${done}/${total}`}
            </Text>
            <Text>
              {tag22}
              {ref28}
              {blockers14}
            </Text>
            <Button plain label="ship" />
            <Button plain label="next" />
            <Button plain label="close" />
            <Button plain label="triage" />
          </Box>
          <Box gap={1}>
            <Text dimColor>
              {pad22}
            </Text>
            <Text color="red">
              {text22}
            </Text>
            <Button plain label="release" />
          </Box>
          <Text dimColor>
            {`        ├ ✓ ${done} done`}
          </Text>
          <Box gap={1}>
            <Text dimColor>
              {"      └"}
            </Text>
            <Text>
              {ref29}
              {" "}
              {title23}
            </Text>
            <Text dimColor>
              {`████████ ${done}/${total}`}
            </Text>
            <Text>
              {tag23}
              {ref30}
              {blockers15}
            </Text>
            <Button plain label="ship" />
            <Button plain label="next" />
            <Button plain label="close" />
            <Button plain label="triage" />
          </Box>
          <Box gap={1}>
            <Text dimColor>
              {pad23}
            </Text>
            <Text color="red">
              {text23}
            </Text>
            <Button plain label="release" />
          </Box>
          <Text dimColor>
            {`        ├ ✓ ${done} done`}
          </Text>
          <Box gap={1}>
            <Text dimColor>
              {"    └"}
            </Text>
            <Text>
              <Link href={`https://github.com/${repo}/${kind}/${n}`} label={`#${n}`} />
            </Text>
          </Box>
        </Box>
      </Box>
    )
  })

  on('session.start', async ($, e, next) => {
    const messageOf = '…'
    const text = '…'
    await $.ui.toast(`gh-pane did not refresh: ${messageOf}`)
    await $.ui.toast(`In the prompt: ${text}  (Enter sends it)`)
    return next(e)
  })
}

Mod 自身のコード

読んだコミットにライセンスの全文が見つからなかったため、ソースの場所へのリンクだけにしています。

コードが呼ぶもの

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

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

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

コードから読めること

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

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

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

入れる

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

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

/plugin marketplace add Gharib89/claude-mods
/plugin install gh-pane@claude-mods

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

Claude に聞く

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

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

Claude から探す: MCP コネクタ

似たデザイン