modscode EN

modscode / 図鑑 / codecraft

codecraft

A Minecraft-inspired HUD for Claude Code: hearts for context, armor for safety nets, XP for verified work, and 60 advancements that persist across sessions

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

何をするか

  • 欄・プロンプトの上の帯・トーストを描く
  • /inventory・/advancements を足す
  • ツールの呼び出しを見張る(止めることがある)
  • classic.SessionStart・classic.Stop・classic.UserPromptSubmit・session.compact ほか 4 個にフックする
  • ターンをまたいで自分の状態を持つ

良いところ

  • ネットワークに出ない
  • TypeScript で書かれている
  • デスクトップ専用の分岐がある
  • エラーを扱う

作り始めるためのコード

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

雛形(register.tsx)

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

// Drawn like codecraft by mkpvishnu (pane, band, toast), as modscode read it from the mod's code:
// https://modscode.com/gallery/mkpvishnu-codecraft/
// 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: "Advancements" })
  on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
    const { Box, Text, Button } = $.ui.resolve(e)
    const label = '…'
    const label2 = '…'
    const label3 = '…'
    const title = '…'
    const facts = '…'
    const how = '…'
    const title2 = '…'
    const how2 = '…'
    const title3 = '…'
    const how3 = '…'
    const title4 = '…'
    const how4 = '…'
    const size = '…'
    const length = '…'
    const hidden = '…'
    const value = '…'
    const icon = '…'
    return (
      <Box flexDirection="column">
        <Box flexDirection="row" flexWrap="wrap" columnGap={1}>
          <Text color="#000000" backgroundColor="#FFAA00" bold>
            {label}
          </Text>
          <Text color="#000000" backgroundColor="#FFAA00" bold>
            {label2}
          </Text>
          <Text color="#000000" backgroundColor="#FFAA00" bold>
            {label3}
          </Text>
        </Box>
        <Box flexDirection="column" marginTop={1}>
          <Box flexDirection="row">
            <Text color="#C6C6C6" bold wrap="truncate">
              {title}
            </Text>
            <Text color="#55FF55" wrap="truncate">
              {`  ${facts}`}
            </Text>
          </Box>
          <Text color="#AAAAAA" wrap="truncate">
            {how}
          </Text>
          <Box position="absolute" top={0} left={0} flexDirection="column" display="none">
            <Box flexDirection="row">
              <Text color="#C6C6C6" bold wrap="truncate">
                {title2}
              </Text>
              <Text color="#55FF55" wrap="truncate">
                {`  ${facts}`}
              </Text>
            </Box>
            <Text color="#AAAAAA" wrap="truncate">
              {how2}
            </Text>
          </Box>
          <Box position="absolute" top={0} left={0} flexDirection="column" display="none">
            <Box flexDirection="row">
              <Text color="#C6C6C6" bold wrap="truncate">
                {title3}
              </Text>
              <Text color="#55FF55" wrap="truncate">
                {`  ${facts}`}
              </Text>
            </Box>
            <Text color="#AAAAAA" wrap="truncate">
              {how3}
            </Text>
          </Box>
          <Box position="absolute" top={0} left={0} flexDirection="column" display="none">
            <Box flexDirection="row">
              <Text color="#C6C6C6" bold wrap="truncate">
                {title4}
              </Text>
              <Text color="#55FF55" wrap="truncate">
                {`  ${facts}`}
              </Text>
            </Box>
            <Text color="#AAAAAA" wrap="truncate">
              {how4}
            </Text>
          </Box>
        </Box>
        <Box flexDirection="row" columnGap={1}>
          <Button hotkey="p" plain>
            Previous
          </Button>
          <Button hotkey="n" plain>
            Next
          </Button>
          <Text color="#AAAAAA" wrap="truncate">
            {`· ${size}/${length} made · ${hidden} hidden in this tab`}
          </Text>
        </Box>
        <Box flexDirection="row">
          <Box width={4} height={2}>
          </Box>
          <Box width={4} height={2}>
          </Box>
          <Box width={4} height={2}>
          </Box>
        </Box>
        <Box flexDirection="row">
          <Box width={4} height={2}>
          </Box>
          <Box width={4} height={2}>
          </Box>
          <Box width={4} height={2}>
          </Box>
        </Box>
        <Box flexDirection="row">
          <Box width={4} height={2}>
          </Box>
          <Box width={4} height={2}>
          </Box>
          <Box width={4} height={2}>
          </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 } = $.ui.resolve(e)
    const label = '…'
    const filled = '…'
    const empty = '…'
    const parts = '…'
    const verifiedText = '…'
    return (
      <Box flexDirection="column">
        <Box flexDirection="row" gap={3}>
          <Box flexDirection="column">
            <Box flexDirection="row">
              <Text color="#C6C6C6">
                ⛨⛨⛨⛨⛨⛨⛨⛨
              </Text>
              <Text color="#555555">
                ⛨⛨⛨⛨⛨⛨⛨⛨
              </Text>
            </Box>
            <Box flexDirection="row" justifyContent="space-between">
              <Box flexDirection="row" />
              <Box flexDirection="row" />
            </Box>
            <Box flexDirection="row" gap={1}>
              <Text color="#80FF20" bold>
                {label}
              </Text>
              <Box flexDirection="row">
                <Text color="#80FF20">
                  {filled}
                </Text>
                <Text color="#555555">
                  {empty}
                </Text>
              </Box>
            </Box>
          </Box>
          <Box flexDirection="column">
            <Text color="#555555">
              {parts}
            </Text>
            <Text color="#FFAA00">
              low health · /compact
            </Text>
            <Box flexDirection="row" gap={2}>
              <Text>
                {verifiedText}
              </Text>
              <Text color="#AAAAAA">
                {"☠ "}
                0
              </Text>
            </Box>
          </Box>
        </Box>
        <Box flexDirection="row" gap={1} />
        {await next(e)}
      </Box>
    )
  })

  on('session.start', async ($, e, next) => {
    const after = '…'
    const made = '…'
    const icon = '…'
    const title = '…'
    await $.ui.toast(`Level up! You are now level ${after}`)
    await $.ui.toast(`${made}  ${icon} ${title}`)
    return next(e)
  })
}

Mod 自身のコード

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

codecraft/hooks/register.tsx 969〜1128 行 · ペイン
  on('ui.render', { component: 'Pane', requestId: 'advancements' }, async ($, e) => {
    const elements = $.ui.resolve(e)
    const { Box, Text, Button } = elements
    const all = Object.values(ADVANCEMENTS) as Advancement[]
    const titles: Record<string, Advancement> = ADVANCEMENTS
    // 28 cells hold the longest title beside its icon, inside the frame
    const columns = Math.max(1, Math.min(3, Math.floor((e.props.bodyColumns + 1) / 29)))
    const cardWidth = Math.floor((e.props.bodyColumns - (columns - 1)) / columns)

    const total = bar(earned.size, all.length, 15)
    const rows = [
      <Box flexDirection="row" gap={1}>
        <Text color={COLOR.xp}>{total.filled}</Text>
        <Text color={COLOR.darkGray}>{total.empty}</Text>
        <Text color={COLOR.white} bold>
          {earned.size}/{all.length}
        </Text>
        <Text color={COLOR.gray}>advancements made</Text>
      </Box>,
    ]

    const tabs = TABS.map((tab, index) => {
      const done = all.filter(one => one.tab === tab && earned.has(one.id)).length
      const label = ' ' + tab + ' ' + done + ' '
      if (index === shownTab) {
        return (
          <Text color={COLOR.black} backgroundColor={COLOR.gold} bold>
            {label}
          </Text>
        )
      }
      return (
        <Button
          key={'tab-' + index}
          hotkey={String(index + 1)}
          plain
          onPress={() => {
            shownTab = index
            pickedAdvancement = ''
            $.ui.invalidate('ui.render')
          }}
        >
          {tab + ' ' + done}
        </Button>
      )
    })
    rows.push(
      <Box flexDirection="row" flexWrap="wrap" columnGap={1} marginTop={1}>
        {tabs}
      </Box>,
    )

    const tab = TABS[shownTab] ?? 'Story'
    const hidden = all.filter(one => one.tab === tab && one.isHidden && !earned.has(one.id)).length
    const isLocked = (one: Advancement) => !earned.has(one.id) && one.after !== undefined && !earned.has(one.after)
    if (sprites && 'Image' in elements && 'Raster' in elements) {
      const { Image, Raster } = elements
      const inTab = shown().filter(one => one.tab === tab)
      const picked =
        inTab.find(one => one.id === pickedAdvancement) ?? inTab.find(one => !earned.has(one.id) && !isLocked(one)) ?? inTab[0]
      const tree = advancementTree(tab, inTab, earned, picked?.id ?? '', e.props.bodyColumns)
      if (tree && picked) {
        // The whole screen sits on the tab's ground, so the text and the gap
        // around each icon read the same on a light theme as on a dark one
        const backdrop = '#' + TAB_GROUND[tab].toString(16).padStart(6, '0')
        const ground = tree.bands.map((band, row) => {
          return (
            <Box flexDirection="row">
              {band.map((piece, index) => {
                if ('picture' in piece) return <Raster key={'ground-' + row + '-' + index} {...piece.picture} />
                const one = titles[piece.id]!
                const state = earned.has(one.id) ? 'earned' : isLocked(one) ? 'locked' : 'open'
                return (
                  <Box key={'node-' + one.id} width={4} height={2} backgroundColor={backdrop} hover={{ scope: 'advancement-' + one.id }}>
                    <Image source={{ file: sprites + 'adv-' + one.id + '-' + state + '.png', format: 'png' }} columns={4} rows={2} alt={one.icon} />
                  </Box>
                )
              })}
            </Box>
          )
        })

        // What one advancement asks for, every line as wide as the body so a
        // card shown over another hides it. It sits over the tree, where it
        // stays in view while a tall tree scrolls
        const width = e.props.bodyColumns
        const lines = width >= 66 ? 2 : 3
        const card = (one: Advancement) => {
          const isEarned = earned.has(one.id)
          const parent = one.after ? titles[one.after] : undefined
          const lit = one.frame === 'challenge' ? COLOR.purple : COLOR.gold
          const kind = one.frame === 'task' ? '' : one.frame === 'goal' ? 'Goal' : 'Challenge'
          const state = isEarned ? '✔ Made' : isLocked(one) && parent ? 'After ' + parent.title : 'Open'
          const facts = [kind, one.xp ? '+' + one.xp + ' XP' : '', state].filter(Boolean).join(' · ')
          const how = wrapText(one.how, width).slice(0, lines)
          return [
            <Box flexDirection="row" width={width}>
              <Text color={isEarned ? lit : isLocked(one) ? COLOR.stone : COLOR.white} bold wrap="truncate">
                {one.title}
              </Text>
              <Text color={isEarned ? COLOR.green : COLOR.gray} wrap="truncate">
                {('  ' + facts).padEnd(Math.max(0, width - one.title.length))}
              </Text>
            </Box>,
            ...Array.from({ length: lines }, (_, line) => (
              <Text color={COLOR.gray} wrap="truncate">
                {(how[line] ?? '').padEnd(width)}
              </Text>
            )),
          ]
        }
        const step = (by: number) => () => {
          const at = tree.order.indexOf(picked.id)
          pickedAdvancement = tree.order[(at + by + tree.order.length) % tree.order.length] ?? ''
          $.ui.invalidate('ui.render')
        }
        return (
          <Box flexDirection="column" width={width} backgroundColor={backdrop}>
            <Box flexDirection="row" flexWrap="wrap" columnGap={1}>
              {tabs}
            </Box>
            <Box flexDirection="column" height={lines + 1} marginTop={1}>
            {card(picked)}
            {tree.order
              .filter(id => id !== picked.id)
              .map(id => (
                <Box
                  position="absolute"
                  top={0}
                  left={0}
                  flexDirection="column"
                  backgroundColor={backdrop}
                  display="none"
                  hover={{ scope: 'advancement-' + id, display: 'flex' }}
                >
                  {card(titles[id]!)}
                </Box>
              ))}
            </Box>
            <Box flexDirection="row" columnGap={1}>
              <Button key="previous" hotkey="p" plain onPress={step(-1)}>
                Previous
              </Button>
              <Button key="next" hotkey="n" plain onPress={step(1)}>
                Next
              </Button>
              <Text color={COLOR.gray} wrap="truncate">
                {'· ' + earned.size + '/' + all.length + ' made' + (hidden > 0 ? ' · ' + hidden + ' hidden in this tab' : '')}
              </Text>
            </Box>
            {ground}
          </Box>
        )
      }
    }

    const cards = []
    for (const advancement of shown().filter(one => one.tab === tab)) {
      const isEarned = earned.has(advancement.id)
      const parent = advancement.after ? titles[advancement.after] : undefined
codecraft/hooks/register.tsx 1164〜1323 行 · バンド
  on('ui.render', { component: 'AbovePrompt' }, async ($, e, next) => {
    if (e.props.hasSurvey) return next(e)
    const { Box, Text } = $.ui.resolve(e)
    const isWide = e.props.bodyColumns >= 44
    const hudWidth = isWide ? 36 : 20

    const used = contextPercent ?? 0
    const health = halves(100 - used)
    const hearts = []
    for (let i = 0; i < 10; i++) {
      const left = health - i * 2
      if (isHurt) hearts.push(<Text color={COLOR.white}>♥</Text>)
      else if (left >= 2) hearts.push(<Text color={COLOR.red}>♥</Text>)
      else if (left === 1) hearts.push(<Text color={COLOR.darkRed}>♥</Text>)
      else hearts.push(<Text color={COLOR.darkGray}>♡</Text>)
    }

    // Food empties from the left, as the game's right-anchored bar does
    const food = []
    if (hungerPercent !== undefined && isWide) {
      const full = Math.ceil(halves(100 - hungerPercent) / 2)
      for (let i = 0; i < 10; i++) {
        if (i < 10 - full) food.push(<Text color={COLOR.darkGray}>░░</Text>)
        else food.push(<Text>🍗</Text>)
      }
    }

    const worn = armor()
    const { level, into, cost } = levelOf(xp)
    const label = 'Lv ' + level
    const experience = bar(into, cost, hudWidth - label.length - 1)
    const verifiedText = verifiedLine()
    const verifiedColor = unverifiedEdits >= 5 ? COLOR.gold : unverifiedEdits === 0 ? COLOR.green : COLOR.gray

    // The hotbar: painted slots where the terminal has the cell grid and the
    // band has four rows left for them, a line of glyphs otherwise
    const elements = $.ui.resolve(e)
    // A command that has run five seconds is a boss: its bar drains toward
    // the command's timeout
    const now = await clockNow($)
    const boss = active.find(call => call.tool === 'Bash' && now - call.startedAt >= 5000)
    // Rows already spoken for: the boss bar, the HUD and the line under it
    const taken = (boss ? 2 : 0) + 3 + 1
    const Raster = 'Raster' in elements && e.props.maxRows - taken >= 4 ? elements.Raster : undefined
    const Sprite = sprites && 'Image' in elements && e.props.maxRows - taken >= 2 ? elements.Image : undefined
    const slots = []
    if (e.props.isWorking) {
      const running = active[active.length - 1]?.tool
      for (const [tool, uses] of [...hotbar].slice(-9)) {
        const isHeld = tool === running
        slots.push(
          Sprite ? (
            // The item in its slot, and the stack's count at its foot
            <Box flexDirection="row">
              <Sprite source={{ file: sprites + 'slot-' + itemOf(tool) + (isHeld ? '-held' : '') + '.png', format: 'png' }} columns={4} rows={2} alt={toolGlyph(tool)} />
              <Box flexDirection="column" justifyContent="flex-end">
                <Text color={isHeld ? COLOR.white : COLOR.gray} bold={isHeld}>
                  {String(uses)}
                </Text>
              </Box>
            </Box>
          ) : Raster ? (
            <Raster key={'slot-' + tool} {...slotPicture(tool, uses, isHeld)} />
          ) : (
            <Text color={isHeld ? COLOR.black : COLOR.stone} backgroundColor={isHeld ? COLOR.stone : COLOR.slot} bold={isHeld}>
              {' ' + toolGlyph(tool) + ' ' + uses + ' '}
            </Text>
          ),
        )
      }
      for (const call of active.filter(one => one.tool === 'Agent').slice(0, 4)) {
        slots.push(
          <Text color={COLOR.black} backgroundColor={COLOR.emerald} wrap="truncate">
            {' 👤 ' + (call.label.slice(0, 18) || 'villager') + ' '}
          </Text>,
        )
      }
    }

    const top = []
    if (boss) {
      const elapsed = now - boss.startedAt
      const left = bar(Math.max(0, boss.timeoutMs - elapsed), boss.timeoutMs, hudWidth)
      const seconds = Math.floor(elapsed / 1000)
      top.push(
        <Box flexDirection="row" gap={1} width={hudWidth} justifyContent="space-between">
          <Text color={COLOR.purple} bold wrap="truncate">
            {boss.label.split('\n')[0]?.slice(0, hudWidth - 7)}
          </Text>
          <Text color={COLOR.gray}>
            {Math.floor(seconds / 60)}:{String(seconds % 60).padStart(2, '0')}
          </Text>
        </Box>,
      )
      top.push(
        <Box flexDirection="row">
          <Text color={COLOR.purple}>{left.filled}</Text>
          <Text color={COLOR.darkGray}>{left.empty}</Text>
        </Box>,
      )
    } else if (!titleRow && e.props.maxRows >= 10 && e.props.bodyColumns >= 48) {
      const Scene = 'Raster' in elements ? elements.Raster : undefined
      if (Scene) top.push(<Scene key="title" {...TITLE} />)
      top.push(
        <Text color={COLOR.yellow} bold italic>
          {splash}
        </Text>,
      )
    }

    // The painted HUD where the terminal has the cell grid and the band is
    // wide enough for it; the glyph one below otherwise
    const foodLeft = hungerPercent === undefined ? undefined : Math.ceil(halves(100 - hungerPercent) / 2)
    const picture = hudPicture({ health, isHurt, armor: worn?.points, food: foodLeft, level, into, cost })
    const Hud = 'Raster' in elements && e.props.bodyColumns >= picture.columns && e.props.maxRows >= picture.rows + 1 ? elements.Raster : undefined
    const notes = (
      <Box flexDirection="column">
        {worn ? <Text color={COLOR.darkGray}>{worn.points < 10 ? worn.parts : ' '}</Text> : null}
        <Text color={COLOR.gold}>{used >= 80 ? 'low health · /compact' : ' '}</Text>
        <Box flexDirection="row" gap={2}>
          {verifiedText ? <Text color={verifiedColor}>{verifiedText}</Text> : null}
          {deaths > 0 ? <Text color={COLOR.gray}>☠ {deaths}</Text> : null}
        </Box>
      </Box>
    )
    const Icon = sprites && 'Image' in elements && 'Raster' in elements && e.props.bodyColumns >= 42 ? elements.Image : undefined
    if (Icon && 'Raster' in elements) {
      // The game's own icons, two columns each: armor over hearts, food on
      // the right, the experience bar under both
      const Bar = elements.Raster
      // Each carries a glyph as its alt, drawn if the terminal turns out not
      // to show pictures after all
      const ALTS: Record<string, string> = { heart: '♥', 'heart-half': '♥', 'heart-hurt': '♥', 'heart-empty': '♡', armor: '⛨', 'armor-empty': '·', food: '◆', 'food-empty': '·' }
      const icon = (name: string) => <Icon source={{ file: sprites + name + '.png', format: 'png' }} columns={2} rows={1} alt={ALTS[name] ?? ' '} />
      const heartRow = []
      const plateRow = []
      const foodRow = []
      for (let i = 0; i < 10; i++) {
        const left = health - i * 2
        heartRow.push(icon(left <= 0 ? 'heart-empty' : isHurt ? 'heart-hurt' : left === 1 ? 'heart-half' : 'heart'))
        if (worn) plateRow.push(icon(i < worn.points ? 'armor' : 'armor-empty'))
        if (foodLeft !== undefined) foodRow.push(icon(i >= 10 - foodLeft ? 'food' : 'food-empty'))
      }
      const width = foodLeft === undefined ? 20 : 42
      const isBeside = e.props.bodyColumns >= width + 3 + 38
      const line = [worn && worn.points < 10 ? worn.parts : '', used >= 80 ? 'low health · /compact' : '', verifiedText ?? '', deaths > 0 ? '☠ ' + deaths : '']
        .filter(Boolean)
        .join('  ·  ')
      return (
        <Box flexDirection="column">
          {top}
          <Box flexDirection="row" gap={3}>
            <Box flexDirection="column" width={width}>
              {worn ? <Box flexDirection="row">{plateRow}</Box> : null}
              <Box flexDirection="row" justifyContent="space-between">
                <Box flexDirection="row">{heartRow}</Box>
                <Box flexDirection="row">{foodRow}</Box>
              </Box>
              <Bar key="xp" {...xpPicture(width, level, into, cost)} />
            </Box>
ライセンスの全文(MIT)
MIT License

Copyright (c) 2026 mkpvishnu

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 に読んだコミット e2b23c2b444b のソースから。最初のまとまりが載せる条件で、残りは自分で判断するための材料です。後のコミットは、次に読むまで見ていません。

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

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

入れる

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

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

/plugin marketplace add mkpvishnu/claude-mods
/plugin install codecraft@claude-mods

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

Claude に聞く

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

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

Claude から探す: MCP コネクタ

似たデザイン