modscode EN

modscode / 図鑑 / lens

lens

Review a repo's changes in a pane: the changed files with editor-style diagnostics (pyright, ruff, tsc, eslint, terraform), a diff view, a git graph, commits and stashes, and pull request comments. Run /lens [folder] [base].

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

何をするか

  • 欄・トーストを描く
  • /lens を足す
  • Edit・Write の呼び出しを見張る(止めることがある)
  • session.end・session.start・state.set・ui.scrollにフックする
  • ターンをまたいで自分の状態を持つ

良いところ

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

作り始めるためのコード

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

雛形(register.tsx)

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

// Drawn like lens by BuddyLim (pane, status, toast), as modscode read it from the mod's code:
// https://modscode.com/gallery/buddylim-lens/
// 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: "Lens" })
  on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
    const { Box, Text, Button } = $.ui.resolve(e)
    const nameOf = '…'
    const home = '…'
    const at = '…'
    const label = '…'
    const comparisonLabel = '…'
    const repo = '…'
    const agoOf = '…'
    const at2 = '…'
    const comparisonLabel2 = '…'
    const repo2 = '…'
    const agoOf2 = '…'
    const at3 = '…'
    const comparisonLabel3 = '…'
    const repo3 = '…'
    const agoOf3 = '…'
    const nameOf2 = '…'
    const home2 = '…'
    const at4 = '…'
    const comparisonLabel4 = '…'
    const repo4 = '…'
    const agoOf4 = '…'
    const at5 = '…'
    const comparisonLabel5 = '…'
    const repo5 = '…'
    const agoOf5 = '…'
    const at6 = '…'
    const comparisonLabel6 = '…'
    const repo6 = '…'
    const agoOf6 = '…'
    const nameOf3 = '…'
    const home3 = '…'
    const at7 = '…'
    const comparisonLabel7 = '…'
    const repo7 = '…'
    const agoOf7 = '…'
    const at8 = '…'
    const comparisonLabel8 = '…'
    const repo8 = '…'
    const agoOf8 = '…'
    const at9 = '…'
    const comparisonLabel9 = '…'
    const repo9 = '…'
    const agoOf9 = '…'
    return (
      <Box flexDirection="column">
        <Text>
          {" "}
        </Text>
        <Box flexDirection="column" borderStyle="round" borderColor="#ffab40">
          <Box flexDirection="column">
            <Text bold>
              Recently reviewed
            </Text>
            <Text dimColor wrap="truncate-end">
              This folder is not in a git repository. Pick a repo (its number), or name one: /lens ~/Code/my-repo
            </Text>
            <Text>
              {" "}
            </Text>
            <Text bold wrap="truncate-end">
              {nameOf}
              {" "}
              <Text dimColor>
                {home}
              </Text>
            </Text>
            <Box columnGap={1} height={1} overflow="hidden">
              <Text dimColor>
                {"        "}
                {at}
              </Text>
              <Button plain label={`${label}`} />
              <Text color="#ffab40" wrap="truncate-end">
                {comparisonLabel}
              </Text>
              <Text dimColor wrap="truncate-end">
                {repo}
                {" · "}
                {agoOf}
              </Text>
              <Box display="none">
                <Button plain label="✕ forget" />
              </Box>
            </Box>
            <Box columnGap={1} height={1} overflow="hidden">
              <Text dimColor>
                {"        "}
                {at2}
              </Text>
              <Button plain label={`${label}`} />
              <Text color="#ffab40" wrap="truncate-end">
                {comparisonLabel2}
              </Text>
              <Text dimColor wrap="truncate-end">
                {repo2}
                {" · "}
                {agoOf2}
              </Text>
              <Box display="none">
                <Button plain label="✕ forget" />
              </Box>
            </Box>
            <Box columnGap={1} height={1} overflow="hidden">
              <Text dimColor>
                {"        "}
                {at3}
              </Text>
              <Button plain label={`${label}`} />
              <Text color="#ffab40" wrap="truncate-end">
                {comparisonLabel3}
              </Text>
              <Text dimColor wrap="truncate-end">
                {repo3}
                {" · "}
                {agoOf3}
              </Text>
              <Box display="none">
                <Button plain label="✕ forget" />
              </Box>
            </Box>
            <Text bold wrap="truncate-end">
              {nameOf2}
              {" "}
              <Text dimColor>
                {home2}
              </Text>
            </Text>
            <Box columnGap={1} height={1} overflow="hidden">
              <Text dimColor>
                {"        "}
                {at4}
              </Text>
              <Button plain label={`${label}`} />
              <Text color="#ffab40" wrap="truncate-end">
                {comparisonLabel4}
              </Text>
              <Text dimColor wrap="truncate-end">
                {repo4}
                {" · "}
                {agoOf4}
              </Text>
              <Box display="none">
                <Button plain label="✕ forget" />
              </Box>
            </Box>
            <Box columnGap={1} height={1} overflow="hidden">
              <Text dimColor>
                {"        "}
                {at5}
              </Text>
              <Button plain label={`${label}`} />
              <Text color="#ffab40" wrap="truncate-end">
                {comparisonLabel5}
              </Text>
              <Text dimColor wrap="truncate-end">
                {repo5}
                {" · "}
                {agoOf5}
              </Text>
              <Box display="none">
                <Button plain label="✕ forget" />
              </Box>
            </Box>
            <Box columnGap={1} height={1} overflow="hidden">
              <Text dimColor>
                {"        "}
                {at6}
              </Text>
              <Button plain label={`${label}`} />
              <Text color="#ffab40" wrap="truncate-end">
                {comparisonLabel6}
              </Text>
              <Text dimColor wrap="truncate-end">
                {repo6}
                {" · "}
                {agoOf6}
              </Text>
              <Box display="none">
                <Button plain label="✕ forget" />
              </Box>
            </Box>
            <Text bold wrap="truncate-end">
              {nameOf3}
              {" "}
              <Text dimColor>
                {home3}
              </Text>
            </Text>
            <Box columnGap={1} height={1} overflow="hidden">
              <Text dimColor>
                {"        "}
                {at7}
              </Text>
              <Button plain label={`${label}`} />
              <Text color="#ffab40" wrap="truncate-end">
                {comparisonLabel7}
              </Text>
              <Text dimColor wrap="truncate-end">
                {repo7}
                {" · "}
                {agoOf7}
              </Text>
              <Box display="none">
                <Button plain label="✕ forget" />
              </Box>
            </Box>
            <Box columnGap={1} height={1} overflow="hidden">
              <Text dimColor>
                {"        "}
                {at8}
              </Text>
              <Button plain label={`${label}`} />
              <Text color="#ffab40" wrap="truncate-end">
                {comparisonLabel8}
              </Text>
              <Text dimColor wrap="truncate-end">
                {repo8}
                {" · "}
                {agoOf8}
              </Text>
              <Box display="none">
                <Button plain label="✕ forget" />
              </Box>
            </Box>
            <Box columnGap={1} height={1} overflow="hidden">
              <Text dimColor>
                {"        "}
                {at9}
              </Text>
              <Button plain label={`${label}`} />
              <Text color="#ffab40" wrap="truncate-end">
                {comparisonLabel9}
              </Text>
              <Text dimColor wrap="truncate-end">
                {repo9}
                {" · "}
                {agoOf9}
              </Text>
              <Box display="none">
                <Button plain label="✕ forget" />
              </Box>
            </Box>
          </Box>
        </Box>
        <Text>
          {" "}
        </Text>
        <Text>
          {" "}
        </Text>
        <Text>
          {" "}
        </Text>
      </Box>
    )
  })

  on('session.start', async ($, e, next) => {
    const named = '…'
    const count = '…'
    await $.ui.toast(`Lens: ${named} is not in a git repository`)
    await $.ui.toast(`Discarded the changes in ${count} file`)
    return next(e)
  })
}

Mod 自身のコード

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

hooks/register.tsx 1509〜1668 行 · ペイン
  on('ui.render', { component: 'Pane', requestId: PANE }, async ($, e) => {
    const kit = kitOf($.ui.resolve(e))
    const { Text } = kit
    const now = settledView(await read($, view))
    const stored = await read($, scan)
    const found = settledScan(stored)

    if (now.repo === '') {
      return frame(
        kit,
        false,
        settings.sidePadding,
        recentsScreen(
          kit,
          { recents: await read($, recents), now: await $.clock.now() },
          {
            open: one => void openReview($, one.repo, undefined),
            forget: one => void forgetReview($, one.repo),
          },
        ),
      )
    }

    const { repo, target } = now
    const history = historyOf(repo)
    const compared = comparisonOf(now, found, history)
    const { isComparing } = compared
    // The request whose comments show: the one under review, or else the
    // open request of the branch checked out.
    const ofBranch =
      target === '' && branchRequest?.repo === repo && branchRequest.branch === found.head
        ? branchRequest
        : undefined
    const requestTyped = compared.requestTyped || (ofBranch?.typed ?? '')
    const requestLabel = (compared.request.split(' → ')[0] ?? '') || (ofBranch?.label ?? '')
    // The request's comments, as the forge has them, on the files of the
    // folder under review: a forge's paths are from the repo's root, the
    // pane's from that folder. A comment on the request as a whole keeps its
    // empty path.
    const reviewed =
      requestTyped !== '' && commentsCache?.key === `${repo}\n${requestTyped}`
        ? commentsCache
        : undefined
    const requestComments = (reviewed?.comments ?? []).flatMap(one =>
      one.path === ''
        ? [one]
        : one.path.startsWith(reviewed?.prefix ?? '')
          ? [{ ...one, path: one.path.slice((reviewed?.prefix ?? '').length) }]
          : [],
    )
    // The ledger mod's review findings, where it is loaded and has a run, join
    // them: each shows on its line as a thread does. Reading the run here
    // draws the pane again when it changes.
    const ledgerRun = await $.state.get(LEDGER_RUN).then(
      got => got.value,
      () => undefined,
    )
    const sessionRoot = await $.session.cwd().catch(() => '')
    const comments = [
      ...requestComments,
      ...findingComments(
        ledgerRun,
        repo,
        sessionRoot,
        found.files.map(one => one.path),
      ),
    ]
    // The comparison border takes a cell on each side, which the screens that
    // size their own window leave out of their width and height.
    const inset = isComparing ? 2 : 0
    // While a scan runs: a mark that turns. Reading its frame subscribes the
    // drawing only then, so an idle pane stays still.
    const busyMark =
      found.status === 'running' ? (SPINNER[(await read($, spin)) % SPINNER.length] ?? '') : ''
    const inChanged = changedDiags(found)

    // A scan from before the line counts and graph existed has neither: ask
    // for a fresh one, which the timer picks up.
    if (stored.stats === undefined && found.status !== 'running') {
      job ??= { isProject: false }
    }

    const shell: Shell = {
      columns: (e.props.bodyColumns ?? 80) - inset - 2 * settings.sidePadding,
      rows: (e.props.scroll?.bodyRows ?? e.viewport?.rows ?? 30) - inset,
      inset,
      padding: settings.sidePadding,
      repoName: repo.split('/').pop() ?? '',
      // git lists the main checkout first; any other is a worktree of it.
      worktreeOf:
        found.worktrees.length > 1 && found.worktrees[0]?.isCurrent === false
          ? (found.worktrees[0].path.split('/').pop() ?? '')
          : '',
      headName: compared.headName,
      side: compared.side,
      against: compared.against,
      request: compared.request,
      reviewing: requestLabel,
      isComparing,
      isScanning: found.status === 'running',
      busyMark,
      pending: found.pending,
      checked: found.checked,
      toCheck: found.toCheck,
      // Shown while the language server reads the open file: its colours,
      // outline and hints come after the file itself.
      working:
        now.screen === 'file' && insightFor === now.file && now.commit === ''
          ? 'language server reading this file…'
          : '',
      isProjectChecked: found.isProjectChecked,
      notes: found.notes,
      totals: totalsOf(found, inChanged),
    }
    // A screen that draws its own window (`isOwn`) needs the pane held one
    // row down (see `frame`): asked for here, done by the timer once the
    // screen has been drawn.
    const framed = (screen: RenderChildren, isOwn = false) => {
      if (isOwn) {
        wantPin = (e.props.scroll?.offset ?? 1) !== 1
      }

      return frame(kit, isComparing, settings.sidePadding, screen, isOwn)
    }

    // What several screens' actions are made of.
    const set = (change: (last: View) => View): void => void update($, view, change)
    const rescan = (): void => {
      job = { isProject: false }
    }
    const help = (): void => set(last => ({ ...last, isHelp: true }))

    if (now.isHelp) {
      return framed(
        helpScreen(kit, shell, now.screen, {
          close: () => set(last => ({ ...last, isHelp: false })),
        }),
      )
    }

    // Opens a file of the working tree at a line: a definition, a use, an
    // outline entry. A library's file is read from where it is installed,
    // outside what git tracks.
    const openAt = async (path: string, line: number): Promise<void> => {
      await loadSource($, repo, path)
      await update(
        $,
        view,
        (last): View => ({
          ...last,
          screen: 'file',
          file: path,
          commit: '',
          origin: 'tree',
          top: Math.max(1, line - 3),
          cursor: -1,
          isDiff: false,
          isPreview: false,
          symbol: NO_SYMBOL,
          crumb: NO_CRUMB,
hooks/screens/frame.tsx 186〜222 行 · ペイン
export const frame = (
  { Box, Text }: Kit,
  isComparing: boolean,
  padding: number,
  screen: RenderChildren,
  isOwn = false,
) => {
  const framed = isComparing ? (
    <Box
      key="pin"
      flexDirection="column"
      borderStyle="round"
      borderColor={COMPARE_COLOR}
      paddingX={padding}
    >
      {screen}
    </Box>
  ) : (
    <Box key="pin" flexDirection="column" paddingX={padding}>
      {screen}
    </Box>
  )

  if (!isOwn) {
    return framed
  }

  return (
    <Box flexDirection="column">
      <Text> </Text>
      {framed}
      <Text> </Text>
      <Text> </Text>
      <Text> </Text>
    </Box>
  )
}
hooks/screens/recents.tsx 17〜95 行 · ペイン
export const recentsScreen = (
  { Box, Button, Text }: Kit,
  model: { recents: readonly Recent[]; now: number },
  actions: RecentsActions,
) => {
  // A path under the person's home folder reads from `~`.
  const short = (repo: string): string => repo.replace(/^\/(Users|home)\/[^/]+\//, '~/')
  const nameOf = (path: string): string => path.split('/').pop() ?? path

  if (model.recents.length === 0) {
    return (
      <Box flexDirection="column">
        <Text bold>Nothing to review here</Text>
        <Text dimColor>
          This folder is not inside a git repository, and no repo has been reviewed yet.
        </Text>
        <Text dimColor>Name one: /lens ~/Code/my-repo [base branch or commit]</Text>
      </Box>
    )
  }

  // The first nine reviews, in the order drawn, answer to their number.
  let drawn = 0
  const row = (one: Recent, label: string, indent: number) => {
    const at = drawn

    drawn += 1

    return (
      <Box key={`recent:${one.repo}`} columnGap={1} height={1} overflow="hidden">
        <Text dimColor>
          {' '.repeat(indent)}
          {at < 9 ? String(at + 1) : ' '}
        </Text>
        <Button
          plain
          key={`open:${one.repo}`}
          {...(at < 9 ? { hotkey: String(at + 1) } : {})}
          label={label}
          onPress={() => actions.open(one)}
        />
        <Text color="#ffab40" wrap="truncate-end">
          {comparisonLabel(one)}
        </Text>
        <Text dimColor wrap="truncate-end">
          {short(one.repo)} · {agoOf(one.at, model.now)}
        </Text>
        <Box display="none" hover={{ display: 'flex' }}>
          <Button plain key={`forget:${one.repo}`} label="✕ forget" onPress={() => actions.forget(one)} />
        </Box>
      </Box>
    )
  }

  return (
    <Box flexDirection="column">
      <Text bold>Recently reviewed</Text>
      <Text dimColor wrap="truncate-end">
        This folder is not in a git repository. Pick a repo (its number), or name one: /lens
        ~/Code/my-repo
      </Text>
      <Text> </Text>
      {groupRecents(model.recents).flatMap(({ home, reviews }) =>
        // A repo reviewed in one place is one row; one with worktrees is a
        // heading and a row for each, the main checkout named as such.
        reviews.length === 1 && reviews[0]?.repo === home
          ? reviews.map(one => row(one, nameOf(one.repo), 0))
          : [
              <Text bold wrap="truncate-end">
                {nameOf(home)} <Text dimColor>{short(home)}</Text>
              </Text>,
              ...reviews.map(one =>
                row(one, one.repo === home ? 'main checkout' : `worktree ${nameOf(one.repo)}`, 2),
              ),
            ],
      )}
    </Box>
  )
}
hooks/screens/help.tsx 136〜159 行 · ペイン
export const helpScreen = (kit: Kit, shell: Shell, screen: View['screen'], actions: HelpActions) => {
  const { Box, Button, Text } = kit

  return (
    <Box flexDirection="column">
      {statusLine(kit, shell)}
      <Box>
        <Button plain key="help" hotkey="h" label="close" onPress={actions.close} />
      </Box>
      {HELP[screen].flatMap(([heading, rows]) => [
        <Text> </Text>,
        <Text bold>{heading}</Text>,
        ...rows.map(([key, what]) => (
          <Box>
            <Box flexShrink={0} width={12}>
              <Text color="cyan">{key}</Text>
            </Box>
            <Text>{what}</Text>
          </Box>
        )),
      ])}
    </Box>
  )
}
hooks/screens/frame.tsx 132〜159 行 · ペイン
export const statusLine = ({ Text }: Kit, shell: Shell) => (
  <Text dimColor wrap="truncate-end">
    {/* A worktree says so first and in colour: its files are not the main
        checkout's, which is easy to forget once inside it. */}
    {shell.worktreeOf === '' ? (
      ''
    ) : (
      <Text color={WORKTREE_COLOR} dimColor={false} bold>
        {WORKTREE_ICON} worktree of {shell.worktreeOf} ·{' '}
      </Text>
    )}
    {shell.repoName} · {shell.request === '' ? shell.side : shell.request}
    {shell.request !== ''
      ? ''
      : shell.isComparing
        ? ` vs ${shell.against}`
        : ' · uncommitted changes'}
    {shell.request === '' && shell.reviewing !== '' ? ` · ${shell.reviewing}` : ''}
    {shell.isScanning
      ? ` · ${shell.busyMark} ${shell.pending.length === 0 ? 'reading changes' : `checking: ${shell.pending.join(', ')}`}`
      : ''}
    {shell.isScanning && shell.toCheck > shell.checked && shell.checked > 0
      ? ` · ${shell.checked} of ${shell.toCheck} files checked`
      : ''}
    {shell.working === '' ? '' : ` · ${shell.working}`}
    {shell.isProjectChecked ? ' · whole project checked' : ''}
  </Text>
)
hooks/screens/list.tsx 19〜83 行 · ペイン
export const listScreen = (kit: Kit, shell: Shell, shown: Listing, actions: ListActions) => {
  const { Box, Button, Text } = kit

  return (
    <Box flexDirection="column">
      {statusLine(kit, shell)}
      <Box columnGap={2}>
        <Button plain key="back" hotkey="b" label="back" onPress={actions.back} />
        {shown.prompt !== '' && (
          <Button
            plain
            key="list-send"
            hotkey="n"
            label="send list to prompt"
            onPress={actions.sendList}
          />
        )}
        {helpButton(kit, actions.help)}
      </Box>
      <Text bold wrap="truncate-end">
        {shown.title}
      </Text>
      {shown.rows.map((row, at) =>
        row.path === '' ? (
          <Text color="cyan" wrap="truncate-end">
            {row.label}
          </Text>
        ) : row.tail !== undefined ? (
          // A name to jump to. The name itself is what is pressed; a Button
          // takes no colour, so its kind's colour is on the mark before it
          // (ƒ, C, v), with any indent kept ahead of that.
          <Box height={1} overflow="hidden">
            <Text color={(row.color ?? '') === '' ? undefined : row.color}>
              {row.label.slice(0, row.label.length - row.label.trimStart().length)}
              {row.mark ?? ''}{' '}
            </Text>
            <Button
              plain
              key={`row:${at}`}
              label={row.label.trimStart()}
              onPress={() => actions.open(row.path, row.line)}
            />
            <Text dimColor>
              {'  '}
              line {row.line}
              {row.tail === '' ? '' : ` · ${row.tail}`}
            </Text>
          </Box>
        ) : (
          <Box height={1} overflow="hidden">
            <Button
              plain
              key={`row:${at}`}
              label={row.label.slice(0, Math.max(20, shell.columns - 2))}
              onPress={() => actions.open(row.path, row.line)}
            />
          </Box>
        ),
      )}
      {shown.rows.length >= LIST_ROWS && (
        <Text dimColor>Only the first {LIST_ROWS} are listed.</Text>
      )}
    </Box>
  )
}
ライセンスの全文(MIT)
MIT License

Copyright (c) 2026 Kuang Tar Lim

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.

コードが呼ぶもの

プログラム起動ファイル読み取りツール呼び出し保存

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

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

コードから読めること

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

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

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

入れる

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

リポジトリの .claude-plugin/marketplace.json にこの Mod が載っていないため、入れる手順は出せません。コードとして読むか、作者の README に従ってください。

Claude に聞く

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

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

Claude から探す: MCP コネクタ

似たデザイン