modscode JA

modscode / Gallery / sherlog

sherlog

Groom an issue backlog: find stale, duplicate, vague, unlabeled and unprioritized issues, report them, and apply only the fixes you approve.

Code you can checkTerminal + desktopPaneBandToastBoxButtonMarkdownText

What it does

  • Draws a band above the prompt, a pane, toasts
  • Adds /groom-report
  • Watches mcp__sherlog__show_report, mcp__sherlog__mark_results calls and can refuse them
  • Hooks session.start, ui.close

Good points

  • No network calls
  • Starts no processes
  • Written in TypeScript
  • Handles errors

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 sherlog by Sherlemious (pane, band, toast), as modscode read it from the mod's code:
// https://modscode.com/gallery/sherlemious-sherlog/
// 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, Text, Button } = $.ui.resolve(e)
    const scope = '…'
    const length = '…'
    const applied = '…'
    const length2 = '…'
    return (
      <Box flexDirection="column">
        <Box flexDirection="row" columnGap={2}>
          <Text wrap="truncate-end">
            <Text bold>
              ▤ Grooming report
            </Text>
            <Text dimColor>
              {" "}
              {"· "}
              {scope}
              {" · "}
              {length}
              {" selected · ✓ "}
              {applied}
              /
              {length2}
            </Text>
          </Text>
          <Button hotkey="g" variant="primary" label="Show" />
          <Button hotkey="h" dimColor label="Dismiss" />
        </Box>
        {await next(e)}
      </Box>
    )
  })

  // the pane: open it with $.ui.open({ id: 'my-pane', title: "sherlog" })
  on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
    const { Box, Text, Button, Markdown } = $.ui.resolve(e)
    const scope = '…'
    const tracker = '…'
    const scanned = '…'
    const applied = '…'
    const length = '…'
    const skipped = '…'
    const icon = '…'
    const mark = '…'
    const n = '…'
    const bars = '…'
    const issue = '…'
    const action = '…'
    const title = '…'
    const label = '…'
    const action2 = '…'
    const reason = '…'
    const note = '…'
    const draftText = '…'
    const url = '…'
    const n2 = '…'
    const bars2 = '…'
    const icon2 = '…'
    const action3 = '…'
    const title2 = '…'
    const label2 = '…'
    const action4 = '…'
    const reason2 = '…'
    const note2 = '…'
    const n3 = '…'
    const bars3 = '…'
    const icon3 = '…'
    const action5 = '…'
    const title3 = '…'
    const label3 = '…'
    const action6 = '…'
    const reason3 = '…'
    const note3 = '…'
    return (
      <Box flexDirection="column">
        <Text>
          <Text bold>
            {"▤ "}
            {scope}
          </Text>
          <Text dimColor>
            {" "}
            {"· "}
            {tracker}
            {" · "}
            {scanned}
            {" scanned"}
            {" · ✓ "}
            {applied}
            /
            {length}
          </Text>
        </Text>
        <Text dimColor wrap="truncate-end">
          {"Skipped: "}
          {skipped}
        </Text>
        <Box flexDirection="row" flexWrap="wrap" columnGap={2} marginTop={1}>
          <Button hotkey="y" variant="primary" label={`Apply ${length} selected`} />
          <Button hotkey="a" label="Select shown" />
          <Button hotkey="c" label="Clear" />
          <Button hotkey="q" role="dismiss" label="Hide" />
        </Box>
        <Box flexDirection="row" flexWrap="wrap" columnGap={2} marginTop={1}>
          <Button plain label={`${icon} All 0`} />
          <Button plain label={`${icon} All 0`} />
          <Button plain label={`${icon} All 0`} />
        </Box>
        <Box flexDirection="column" marginTop={1}>
          <Box flexDirection="column">
            <Box flexDirection="row" columnGap={1}>
              <Button plain label={`${mark}`} />
              <Text dimColor>
                {n}
              </Text>
              <Text>
                {bars}
              </Text>
              <Button plain label={`▾ ${issue}`} />
              <Text color="yellow">
                {" "}
              </Text>
              <Text>
                {icon}
              </Text>
              <Text wrap="truncate-end">
                {action}
              </Text>
            </Box>
            <Box flexDirection="column" marginLeft={4} marginBottom={1} borderStyle="round" borderDimColor paddingX={1}>
              <Text bold wrap="truncate-end">
                {title}
              </Text>
              <Text>
                <Text dimColor>
                  {"Priority "}
                </Text>
                <Text>
                  –
                </Text>
                <Text dimColor>
                  {" "}
                  {label}
                </Text>
              </Text>
              <Text>
                <Text dimColor>
                  {"Will do "}
                </Text>
                {action2}
              </Text>
              <Text>
                <Text dimColor>
                  {"Why "}
                </Text>
                {reason}
              </Text>
              <Text color="red">
                {"Result: "}
                {note}
              </Text>
              <Box flexDirection="column" marginTop={1}>
                <Text color="yellow">
                  {"✎ "}
                  Comment
                  {" to post"}
                </Text>
                <Markdown text={`${draftText}`} />
                <Button plain dimColor label="Show less" />
              </Box>
              <Markdown text={`[Open in ${tracker} ↗](${url})`} />
            </Box>
          </Box>
          <Box flexDirection="column">
            <Box flexDirection="row" columnGap={1}>
              <Button plain label={`${mark}`} />
              <Text dimColor>
                {n2}
              </Text>
              <Text>
                {bars2}
              </Text>
              <Button plain label={`▾ ${issue}`} />
              <Text color="yellow">
                {" "}
              </Text>
              <Text>
                {icon2}
              </Text>
              <Text wrap="truncate-end">
                {action3}
              </Text>
            </Box>
            <Box flexDirection="column" marginLeft={4} marginBottom={1} borderStyle="round" borderDimColor paddingX={1}>
              <Text bold wrap="truncate-end">
                {title2}
              </Text>
              <Text>
                <Text dimColor>
                  {"Priority "}
                </Text>
                <Text>
                  –
                </Text>
                <Text dimColor>
                  {" "}
                  {label2}
                </Text>
              </Text>
              <Text>
                <Text dimColor>
                  {"Will do "}
                </Text>
                {action4}
              </Text>
              <Text>
                <Text dimColor>
                  {"Why "}
                </Text>
                {reason2}
              </Text>
              <Text color="red">
                {"Result: "}
                {note2}
              </Text>
              <Box flexDirection="column" marginTop={1}>
                <Text color="yellow">
                  {"✎ "}
                  Comment
                  {" to post"}
                </Text>
                <Markdown text={`${draftText}`} />
                <Button plain dimColor label="Show less" />
              </Box>
              <Markdown text={`[Open in ${tracker} ↗](${url})`} />
            </Box>
          </Box>
          <Box flexDirection="column">
            <Box flexDirection="row" columnGap={1}>
              <Button plain label={`${mark}`} />
              <Text dimColor>
                {n3}
              </Text>
              <Text>
                {bars3}
              </Text>
              <Button plain label={`▾ ${issue}`} />
              <Text color="yellow">
                {" "}
              </Text>
              <Text>
                {icon3}
              </Text>
              <Text wrap="truncate-end">
                {action5}
              </Text>
            </Box>
            <Box flexDirection="column" marginLeft={4} marginBottom={1} borderStyle="round" borderDimColor paddingX={1}>
              <Text bold wrap="truncate-end">
                {title3}
              </Text>
              <Text>
                <Text dimColor>
                  {"Priority "}
                </Text>
                <Text>
                  –
                </Text>
                <Text dimColor>
                  {" "}
                  {label3}
                </Text>
              </Text>
              <Text>
                <Text dimColor>
                  {"Will do "}
                </Text>
                {action6}
              </Text>
              <Text>
                <Text dimColor>
                  {"Why "}
                </Text>
                {reason3}
              </Text>
              <Text color="red">
                {"Result: "}
                {note3}
              </Text>
              <Box flexDirection="column" marginTop={1}>
                <Text color="yellow">
                  {"✎ "}
                  Comment
                  {" to post"}
                </Text>
                <Markdown text={`${draftText}`} />
                <Button plain dimColor label="Show less" />
              </Box>
              <Markdown text={`[Open in ${tracker} ↗](${url})`} />
            </Box>
          </Box>
        </Box>
        <Text dimColor>
          ctrl+x tab focus · Tab/arrows move · Enter on ▸ expands · Enter on [ ] ticks · ✎ posts text · /groom-report shows or hi…
        </Text>
      </Box>
    )
  })

  on('session.start', async ($, e, next) => {
    await $.ui.toast(`Select at least one item to apply.`)
    await $.ui.toast(`Applying the first 25; batches are capped.`)
    return next(e)
  })
}

The mod's own code

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

plugins/sherlog/hooks/register.tsx lines 258–284 · Band
  on('ui.render', { component: 'AbovePrompt' }, async ($, e, next) => {
    const shown = await read($, report)
    const isQuiet =
      e.props.hasSurvey ||
      shown === null ||
      (await read($, isPaneOpen)) ||
      (await read($, isBandHidden))
    if (isQuiet || shown === null) return next(e)

    const { Box, Text, Button } = $.ui.resolve(e)
    const done = await read($, results)
    const picked = (await read($, selected)).filter(n => done[String(n)] === undefined)
    const applied = Object.values(done).filter(result => result.status === 'applied').length
    return (
      <Box key="groom-band" flexDirection="row" columnGap={2}>
        <Text wrap="truncate-end">
          <Text bold>▤ Grooming report</Text>
          <Text dimColor>
            {' '}
            · {shown.scope} · {picked.length} selected · ✓ {applied}/{shown.items.length}
          </Text>
        </Text>
        <Button key="band-show" hotkey="g" variant="primary" label="Show" onPress={() => openPane($, true)} />
        <Button key="band-dismiss" hotkey="h" dimColor label="Dismiss" onPress={() => update($, isBandHidden, () => true)} />
      </Box>
    )
  })
plugins/sherlog/hooks/register.tsx lines 338–497 · Pane
  on('ui.render', { component: 'Pane', requestId: PANE }, async ($, e) => {
    const { Box, Text, Button, Markdown } = $.ui.resolve(e)
    const shown = await read($, report)
    if (shown === null) {
      return <Text dimColor>No grooming report yet. Run /sherlog:groom.</Text>
    }
    const picked = await read($, selected)
    const done = await read($, results)
    const filter = await read($, bucket)
    const open = await read($, expanded)
    const isShowingAll = await read($, showAll)
    const visible = filter === 'all' ? shown.items : shown.items.filter(item => item.bucket === filter)
    const pickable = picked.filter(n => done[String(n)] === undefined)
    const applied = Object.values(done).filter(result => result.status === 'applied').length

    const expand = async (n: number) => {
      await update($, showAll, () => false)
      await update($, expanded, () => n)
    }
    const toggleExpand = async (n: number) => {
      await update($, showAll, () => false)
      await update($, expanded, current => (current === n ? null : n))
    }
    // Ticking a row opens it, so the text it will post is in view.
    const toggle = async (n: number) => {
      const isNowPicked = !picked.includes(n)
      await update($, selected, current =>
        current.includes(n) ? current.filter(one => one !== n) : [...current, n],
      )
      if (isNowPicked) await expand(n)
    }
    const selectVisible = () =>
      update($, selected, current => {
        const ids = visible.filter(item => done[String(item.n)] === undefined).map(item => item.n)
        return [...new Set([...current, ...ids])]
      })

    const details = (item: GroomItem) => {
      const result = done[String(item.n)]
      const priority = priorityOf(item.priority)
      const lines = item.draft?.split('\n') ?? []
      const isLong = lines.length > DRAFT_LINES
      const draftText =
        isLong && !isShowingAll ? `${lines.slice(0, DRAFT_LINES).join('\n')}\n…` : item.draft
      return (
        <Box
          key={`details:${item.n}`}
          flexDirection="column"
          marginLeft={4}
          marginBottom={1}
          borderStyle="round"
          borderDimColor
          paddingX={1}
        >
          <Text bold wrap="truncate-end">
            {item.title}
          </Text>
          <Text>
            <Text dimColor>Priority </Text>
            <Text color={priority.color}>{priority.bars.trim() === '' ? '–' : priority.bars.trim()}</Text>
            <Text dimColor> {priority.label}</Text>
          </Text>
          <Text>
            <Text dimColor>Will do </Text>
            {item.action}
          </Text>
          <Text>
            <Text dimColor>Why </Text>
            {item.reason}
          </Text>
          {result?.note !== undefined && <Text color="red">Result: {result.note}</Text>}
          {draftText === undefined ? (
            <Text dimColor>Nothing will be posted on this issue.</Text>
          ) : (
            <Box flexDirection="column" marginTop={1}>
              <Text color="yellow">✎ {item.draftKind ?? 'Comment'} to post</Text>
              <Markdown key={`draft:${item.n}`} text={draftText} />
              {isLong && (
                <Button
                  key={`more:${item.n}`}
                  plain
                  dimColor
                  label={isShowingAll ? 'Show less' : `Show all (${lines.length - DRAFT_LINES} more lines)`}
                  onPress={() => update($, showAll, current => !current)}
                />
              )}
            </Box>
          )}
          {item.url !== undefined && (
            <Markdown key={`link:${item.n}`} text={`[Open in ${shown.tracker} ↗](${item.url})`} />
          )}
        </Box>
      )
    }

    return (
      <Box flexDirection="column">
        <Text>
          <Text bold>▤ {shown.scope}</Text>
          <Text dimColor>
            {' '}
            · {shown.tracker} · {shown.scanned} scanned
            {shown.staleDays === undefined ? '' : ` · ◷ ${shown.staleDays}d`} · ✓ {applied}/
            {shown.items.length}
          </Text>
        </Text>
        {shown.skipped !== undefined && (
          <Text dimColor wrap="truncate-end">
            Skipped: {shown.skipped}
          </Text>
        )}

        <Box flexDirection="row" flexWrap="wrap" columnGap={2} marginTop={1}>
          <Button
            key="apply"
            hotkey="y"
            variant="primary"
            label={`Apply ${pickable.length} selected`}
            onPress={() => apply($)}
          />
          <Button key="select-all" hotkey="a" label="Select shown" onPress={selectVisible} />
          <Button key="clear" hotkey="c" label="Clear" onPress={() => update($, selected, () => [])} />
          <Button key="close" hotkey="q" role="dismiss" label="Hide" onPress={() => closePane($)} />
        </Box>

        <Box flexDirection="row" flexWrap="wrap" columnGap={2} marginTop={1}>
          {['all', ...bucketsOf(shown.items)].map(name => {
            const count =
              name === 'all' ? shown.items.length : shown.items.filter(item => item.bucket === name).length
            const icon = name === 'all' ? '≡' : iconOf(name).icon
            return (
              <Button
                key={`bucket:${name}`}
                plain
                dimColor={filter !== name}
                label={`${icon} ${name === 'all' ? 'All' : name} ${count}`}
                onPress={() => update($, bucket, () => name)}
              />
            )
          })}
        </Box>

        <Box flexDirection="column" marginTop={1}>
          {visible.map(item => {
            const result = done[String(item.n)]
            const isOpen = item.n === open
            const icon = iconOf(item.bucket)
            const priority = priorityOf(item.priority)
            return (
              <Box key={`row:${item.n}`} flexDirection="column">
                <Box flexDirection="row" columnGap={1}>
                  <Button
                    key={`toggle:${item.n}`}
                    plain
                    label={mark(result, picked.includes(item.n))}
                    onPress={() => (result === undefined ? toggle(item.n) : expand(item.n))}
                  />
                  <Text dimColor>{String(item.n).padStart(2)}</Text>
                  <Text color={priority.color} dimColor={priority.color === undefined}>
                    {priority.bars}
Licence text (MIT)
MIT License

Copyright (c) 2026 Sherlemious

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

drives Claudetool calls

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 7e8be4c4bc35 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.plugins/sherlog/hooks/register.tsx
ParsesEvery file parses as TypeScript or JavaScript.1 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.starts no programs
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 Sherlemious/claude-plugins
/plugin install sherlog@sherlemious

This installs the marketplace's latest commit, which may not be the one read here (7e8be4c4bc35). 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 "sherlemious-sherlog" with its code and make me a pane like it

Search them from Claude: the MCP connector

Similar designs