modscode JA

modscode / Gallery / kids

kids

A pane with the tree of child chats spawned from this chat: what each is doing, which branch it sits on, and what is still not merged. Read-only, no model calls.

Code you can checkTerminal + desktopPaneBoxButtonText

What it does

  • Draws a pane
  • Adds /kids
  • Hooks session.start, turn.complete, ui.close
  • Keeps its own state between turns
  • Starts processes

Good points

  • No network calls
  • Written in TypeScript
  • Handles errors
  • Writes no files

Code to start from

Two kinds: a starter modscode writes from the design above, and the lines of the mod's own code that draw it.

Starter (register.tsx)

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

// Drawn like kids by Seva (pane), as modscode read it from the mod's code:
// https://modscode.com/gallery/sevq1993-cyber-kids/
// 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: "Дочерние чаты" })
  on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
    const { Box, Text, Button } = $.ui.resolve(e)
    const projectOf = '…'
    const summaryOf = '…'
    const ago = '…'
    const error = '…'
    const title = '…'
    const shortModel = '…'
    const label = '…'
    const plural = '…'
    const ago2 = '…'
    const branchOf = '…'
    const lastCommit = '…'
    const needsAction = '…'
    const title2 = '…'
    const shortModel2 = '…'
    const label2 = '…'
    const plural2 = '…'
    const ago3 = '…'
    const branchOf2 = '…'
    const lastCommit2 = '…'
    const needsAction2 = '…'
    const title3 = '…'
    const shortModel3 = '…'
    const label3 = '…'
    const plural3 = '…'
    const ago4 = '…'
    const branchOf3 = '…'
    const lastCommit3 = '…'
    const needsAction3 = '…'
    const orphanOf = '…'
    const orphanOf2 = '…'
    const orphanOf3 = '…'
    const looseOf = '…'
    const looseOf2 = '…'
    const looseOf3 = '…'
    return (
      <Box flexDirection="column" paddingX={1}>
        <Text dimColor>
          {projectOf}
          {" · "}
          {summaryOf}
          {" · "}
          {ago}
        </Text>
        <Text color="yellow">
          {"⚠ "}
          {error}
        </Text>
        <Text>
          Этот чат не в git-проекте, а дочерние чаты ищутся по проекту.
        </Text>
        <Text>
          Этот чат не найден в истории приложения, дерево построить не из чего.
        </Text>
        <Box flexDirection="column" marginTop={1}>
          <Box flexDirection="column" marginTop={0} paddingLeft={0}>
            <Box flexDirection="row">
              <Text dimColor>
                {"└─ "}
              </Text>
              <Text bold>
                {title}
              </Text>
              <Text dimColor>
                {" · "}
                {shortModel}
              </Text>
              <Text color="cyan">
                {" · этот чат"}
              </Text>
            </Box>
            <Box flexDirection="column" paddingLeft={3}>
              <Box flexDirection="row">
                <Text>
                  {label}
                </Text>
                <Text dimColor>
                  {" "}
                  {"· "}
                  {plural}
                  {" · "}
                  {ago2}
                </Text>
              </Box>
              <Text>
                {branchOf}
              </Text>
              <Text dimColor>
                «
                {lastCommit}
                »
              </Text>
              <Text color="magenta">
                {"вопрос: "}
                {needsAction}
              </Text>
              <Box flexDirection="row">
                <Button label="в промпт: проверить и слить" />
              </Box>
            </Box>
          </Box>
          <Box flexDirection="column" marginTop={0} paddingLeft={0}>
            <Box flexDirection="row">
              <Text dimColor>
                {"└─ "}
              </Text>
              <Text bold>
                {title2}
              </Text>
              <Text dimColor>
                {" · "}
                {shortModel2}
              </Text>
              <Text color="cyan">
                {" · этот чат"}
              </Text>
            </Box>
            <Box flexDirection="column" paddingLeft={3}>
              <Box flexDirection="row">
                <Text>
                  {label2}
                </Text>
                <Text dimColor>
                  {" "}
                  {"· "}
                  {plural2}
                  {" · "}
                  {ago3}
                </Text>
              </Box>
              <Text>
                {branchOf2}
              </Text>
              <Text dimColor>
                «
                {lastCommit2}
                »
              </Text>
              <Text color="magenta">
                {"вопрос: "}
                {needsAction2}
              </Text>
              <Box flexDirection="row">
                <Button label="в промпт: проверить и слить" />
              </Box>
            </Box>
          </Box>
          <Box flexDirection="column" marginTop={0} paddingLeft={0}>
            <Box flexDirection="row">
              <Text dimColor>
                {"└─ "}
              </Text>
              <Text bold>
                {title3}
              </Text>
              <Text dimColor>
                {" · "}
                {shortModel3}
              </Text>
              <Text color="cyan">
                {" · этот чат"}
              </Text>
            </Box>
            <Box flexDirection="column" paddingLeft={3}>
              <Box flexDirection="row">
                <Text>
                  {label3}
                </Text>
                <Text dimColor>
                  {" "}
                  {"· "}
                  {plural3}
                  {" · "}
                  {ago4}
                </Text>
              </Box>
              <Text>
                {branchOf3}
              </Text>
              <Text dimColor>
                «
                {lastCommit3}
                »
              </Text>
              <Text color="magenta">
                {"вопрос: "}
                {needsAction3}
              </Text>
              <Box flexDirection="row">
                <Button label="в промпт: проверить и слить" />
              </Box>
            </Box>
          </Box>
        </Box>
        <Text dimColor>
          Дочерних чатов нет. Карточка «Открой новый чат» создаёт их.
        </Text>
        <Box flexDirection="column" marginTop={1}>
          <Text bold color="red">
            Папки worktree без чата Claude
          </Text>
          <Box flexDirection="row">
            <Text dimColor>
              {orphanOf}
            </Text>
          </Box>
          <Box flexDirection="row">
            <Text dimColor>
              {orphanOf2}
            </Text>
          </Box>
          <Box flexDirection="row">
            <Text dimColor>
              {orphanOf3}
            </Text>
          </Box>
        </Box>
        <Box flexDirection="column" marginTop={1}>
          <Text bold>
            Ветки без папки и без чата
          </Text>
          <Box flexDirection="row">
            <Text dimColor>
              {looseOf}
            </Text>
          </Box>
          <Box flexDirection="row">
            <Text dimColor>
              {looseOf2}
            </Text>
          </Box>
          <Box flexDirection="row">
            <Text dimColor>
              {looseOf3}
            </Text>
          </Box>
        </Box>
      </Box>
    )
  })
}

The mod's own code

Shown under the mod's licence (MIT); its text is below. Keep the notice if you copy these lines.

hooks/register.tsx lines 55–145 · Pane
  on('ui.render', { component: 'Pane', requestId: PANE }, async ($, e) => {
    const { Box, Text, Button } = $.ui.resolve(e);
    const snap = await read($, snapshot);
    const now = Date.now();
    if (snap === null) {
      return (
        <Box flexDirection="column" paddingX={1}>
          <Text dimColor>Читаю дочерние чаты…</Text>
        </Box>
      );
    }
    const narrow = e.props.bodyColumns < 48;
    const row = (kid: Kid, depth: number) => {
      const chat = chatOf(kid);
      const tree = treeOf(kid);
      return (
        <Box key={kid.id} flexDirection="column" marginTop={depth === 0 ? 0 : 1} paddingLeft={depth === 0 ? 0 : 3 * (depth - 1)}>
          <Box flexDirection="row">
            {depth > 0 && <Text dimColor>└─ </Text>}
            <Text bold>{kid.title}</Text>
            {!narrow && kid.model && <Text dimColor> · {shortModel(kid.model)}</Text>}
            {kid.isMe && <Text color="cyan"> · этот чат</Text>}
          </Box>
          <Box flexDirection="column" paddingLeft={depth > 0 ? 3 : 0}>
            {!kid.isRoot && (
              <Box flexDirection="row">
                <Text color={chat.color} dimColor={chat.dim}>
                  {chat.label}
                </Text>
                <Text dimColor>
                  {' '}· {plural(kid.turns, 'ход', 'хода', 'ходов')} · {ago(kid.lastActivityAt, now)}
                </Text>
              </Box>
            )}
            <Text color={kid.isRoot ? undefined : tree.color} dimColor={kid.isRoot || tree.dim}>
              {branchOf(kid)}
            </Text>
            {kid.lastCommit && !narrow && <Text dimColor>«{kid.lastCommit}»</Text>}
            {kid.needsAction && chat.code === 'blocked' && <Text color="magenta">вопрос: {kid.needsAction}</Text>}
            {isUnmerged(kid) && (
              <Box flexDirection="row">
                <Button
                  key={`merge-${kid.id}`}
                  label="в промпт: проверить и слить"
                  onPress={() => {
                    void $.prompt.fill({ text: mergePromptOf(kid, snap.root) });
                  }}
                />
              </Box>
            )}
          </Box>
        </Box>
      );
    };
    return (
      <Box flexDirection="column" paddingX={1}>
        <Text dimColor>
          {projectOf(snap)} · {summaryOf(snap)} · {ago(snap.scannedAt, now)}
        </Text>
        {snap.error && <Text color="yellow">⚠ {snap.error}</Text>}
        {snap.root === null && <Text>Этот чат не в git-проекте, а дочерние чаты ищутся по проекту.</Text>}
        {snap.root !== null && snap.tree === null && <Text>Этот чат не найден в истории приложения, дерево построить не из чего.</Text>}
        {snap.tree !== null && <Box flexDirection="column" marginTop={1}>{flatten(snap.tree).map(r => row(r.kid, r.depth))}</Box>}
        {snap.tree !== null && snap.tree.children.length === 0 && (
          <Text dimColor>Дочерних чатов нет. Карточка «Открой новый чат» создаёт их.</Text>
        )}
        {snap.orphans.length > 0 && (
          <Box flexDirection="column" marginTop={1}>
            <Text bold color="red">
              Папки worktree без чата Claude
            </Text>
            {snap.orphans.map(o => (
              <Box key={o.path} flexDirection="row">
                <Text dimColor>{orphanOf(o)}</Text>
              </Box>
            ))}
          </Box>
        )}
        {snap.branches.length > 0 && (
          <Box flexDirection="column" marginTop={1}>
            <Text bold>Ветки без папки и без чата</Text>
            {snap.branches.map(b => (
              <Box key={b.branch} flexDirection="row">
                <Text dimColor>{looseOf(b)}</Text>
              </Box>
            ))}
          </Box>
        )}
      </Box>
    );
  });
Licence text (MIT)
MIT License

Copyright (c) 2026 Seva

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.

What its code calls

runs programsreads filesenv varsremembers

The design, read from code

Drawn from the mod's source at the commit read, not from a run: a list is drawn three times, a condition takes its first branch that draws in the desktop app, and a value only the run time knows is shown as a made-up sample (dotted underline) or left out. Colours and type are this site's.

What its code shows

Read from the source at commit 01c22863da54 on 2026-10-06. The first group decides whether a mod is listed; the rest is for you to weigh. A later commit is not read until the next crawl.

Decides the listing: code you can check
Entry readEvery module hooks/hooks.json names was read.hooks/register.tsx
ParsesEvery file parses as TypeScript or JavaScript.3 files parsed
All its code is in the modEvery import is a file of the mod or the engine's own module; no packages, no require.all its code is in the mod
ReadableNo minified lines, no eval or new Function, no import of a computed path, no encoded blobs.no minified code, no eval, no encoded blobs
Calls in the openNetwork and programs are reached as $.http.fetch and $.process.run in place, never passed around.every call outside goes through $ in the open
For you to weigh before installing
Where it drawsThe terminal, the desktop app, both, or nothing (hooks only: a guard or a prompt rewriter), as its code says. Shown, never a reason to leave a mod out.draws in the terminal and the desktop app, the same in both
Install lineWhether its repository's own .claude-plugin/marketplace.json lists it, so it installs from that marketplace with the lines on its page.listed in its repository's .claude-plugin/marketplace.json: installs from there
Programs on WindowsWhether every program it starts through $.process exists on Windows (tail, date, open, osascript, /usr/… do not).runs no program a Windows PC lacks
NetworkWhether every fetch names its https host in the code.no network
ProgramsWhether every program it starts is named in the code and is not a shell, an interpreter or a network tool.hooks/register.tsx:209 a program named at run time
Reads and sendsWhether it both reads files or environment variables and reaches the network.reaches no network
Keys in the sourceWhether the source holds what looks like an API key or a private key.no keys in the source
LicenceAn open licence (MIT, Apache-2.0, BSD, ISC, Unlicense, 0BSD, CC0) with its text lets modscode show its code; otherwise the code is linked.MIT

This is a reading of the code text, not a security review: it does not run the mod, and it cannot see what a program the mod starts does. The check before installing is yours. How mods are chosen

Install it

Check it yourself before you install it. Mods run unsandboxed, with your permissions, and modscode does not vouch for what this code does. Read the code below (or run claude plugin validate . in its folder), weigh what it reaches, and install the commit you read.

Its repository is its marketplace. Add that marketplace (in the terminal with these commands, or in the desktop app's plugin settings) and install the mod from it:

/plugin marketplace add sevq1993-cyber/claude-code-kids
/plugin install kids@claude-code-kids

This installs the marketplace's latest commit, which may not be the one read here (01c22863da54). Compare them before you install.

Ask Claude about it

With the modscode connector added, Claude can read this design, what its code reaches and its code, and build on them. Ask it like this:

Read the modscode design "sevq1993-cyber-kids" with its code and make me a pane like it

Search them from Claude: the MCP connector

Similar designs