modscode JA

modscode / Gallery / pocock-guide

pocock-guide

A side pane that keeps a beginner on Matt Pocock's flow, from grilling to retro: /mod-pocock

Code you can checkTerminal + desktopPaneToastBoxButtonCodeMarkdownText

What it does

  • Draws a pane, toasts
  • Adds /mod-pocock
  • Watches Bash calls and can refuse them
  • Hooks prompt.submit, session.start, skill.prompt, turn.complete
  • Keeps its own state between turns

Good points

  • No network calls
  • Written in TypeScript
  • Has a desktop-specific branch
  • 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 pocock-guide by Matt Nicosia (pane, toast), as modscode read it from the mod's code:
// https://modscode.com/gallery/mattnicosia-pocock-guide/
// 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: "Pocock flow" })
  on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
    const { Box, Button, Text, Code, Markdown } = $.ui.resolve(e)
    const label = '…'
    const filter = '…'
    const question = '…'
    const why = '…'
    const name = '…'
    const branch = '…'
    const error = '…'
    const label2 = '…'
    const label3 = '…'
    return (
      <Box flexDirection="column" gap={1}>
        <Box flexDirection="column" gap={1}>
          <Box flexDirection="row" flexWrap="wrap" gap={1}>
            <Button label={`${label}`} variant="primary" />
            <Button label={`${label}`} variant="primary" />
            <Button label={`${label}`} variant="primary" />
          </Box>
          <Box flexDirection="row" flexWrap="wrap" gap={1}>
            <Button label={`• ${label}`} plain />
            <Button label={`• ${label}`} plain />
            <Button label={`• ${label}`} plain />
          </Box>
        </Box>
        <Box flexDirection="column" gap={1} borderStyle="round" borderColor="#E5342C" paddingX={1}>
          <Text bold color="#E5342C">
            Your copy of Matt Pocock's skills is out of date
          </Text>
          <Text>
            The copy from the official marketplace is older than v1.3.1 and has no /implement-spec, /pr or /retro, which later step…
          </Text>
          <Code source="claude plugin marketplace add mattnicosia/bldg-skills && claude plugin install matt-pocock@bldg-skills" />
          <Text dimColor>
            Then remove the old copy with: claude plugin uninstall mattpocock-skills
          </Text>
          <Box flexDirection="row" gap={1}>
            <Button label="Check again" />
          </Box>
        </Box>
        <Box flexDirection="column" gap={1} borderStyle="round" borderColor="#F56300" paddingX={1}>
          <Text bold color="#F56300">
            Sounds like something is broken
          </Text>
          <Text>
            /diagnosing-bugs finds a command that shows the bug failing, then fixes it with a test. Claude will still help with wha…
          </Text>
          <Box flexDirection="row" flexWrap="wrap" gap={1}>
            <Button label="Diagnose it" variant="primary" />
            <Button label="Not this time" />
          </Box>
        </Box>
        <Box flexDirection="column" borderStyle="round" borderColor="#F56300" paddingX={1}>
          <Text bold color="#F56300">
            Needs you
          </Text>
          <Markdown text={`${filter}`} />
        </Box>
        <Box flexDirection="column" gap={1} borderStyle="round" paddingX={1}>
          <Text bold>
            {"Claude is asking: "}
            {question}
          </Text>
          <Text dimColor>
            {why}
          </Text>
          <Box flexDirection="row" flexWrap="wrap" gap={1}>
            <Button label={`${label}`} variant="primary" />
            <Button label={`${label}`} variant="primary" />
            <Button label={`${label}`} variant="primary" />
          </Box>
        </Box>
        <Text bold>
          {`${name} · ${branch}`}
        </Text>
        <Text dimColor>
          {error}
        </Text>
        <Text bold>
          Open work
        </Text>
        <Box flexDirection="row" flexWrap="wrap" gap={1} alignItems="center">
          <Text>
            {label}
          </Text>
          <Button label={`${label}`} />
          <Button label={`${label}`} />
          <Button label={`${label}`} />
        </Box>
        <Box flexDirection="row" flexWrap="wrap" gap={1} alignItems="center">
          <Text>
            {label2}
          </Text>
          <Button label={`${label}`} />
          <Button label={`${label}`} />
          <Button label={`${label}`} />
        </Box>
        <Box flexDirection="row" flexWrap="wrap" gap={1} alignItems="center">
          <Text>
            {label3}
          </Text>
          <Button label={`${label}`} />
          <Button label={`${label}`} />
          <Button label={`${label}`} />
        </Box>
        <Text bold>
          Start something
        </Text>
        <Text color="#E5342C">
          This repo is not set up for the skills yet. Press Set up this repo once, first.
        </Text>
        <Box flexDirection="row" flexWrap="wrap" gap={1}>
          <Button label={`${label}`} variant="primary" />
          <Button label={`${label}`} variant="primary" />
          <Button label={`${label}`} variant="primary" />
        </Box>
        <Text dimColor>
          Idea and broken fill your prompt: type what you mean after the command, then press Enter. The others send at once.
        </Text>
        <Box flexDirection="row" gap={1}>
          <Button label="Refresh" />
        </Box>
      </Box>
    )
  })

  on('session.start', async ($, e, next) => {
    const what = '…'
    await $.ui.toast(`Pocock flow: blocked ${what}.`)
    await $.ui.toast(`Pocock flow: try /diagnosing-bugs. The pane has a button.`)
    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/pocock-guide/hooks/register.tsx lines 1120–1279 · Pane
  on('ui.render', { component: 'Pane', requestId: PANE }, async ($, e) => {
    const current = await read($, tab)
    const f = await read($, flow)
    const setup = await read($, env)
    const { Box, Button, Markdown, Text, Code } = $.ui.resolve(e)
    const isDesktop = e.surface !== 'terminal'

    const guide = GUIDE.find(g => g.id === current)
    const go = (id: Tab) => () => {
      void update($, tab, () => id)
      if (id === 'start') void readRepo($)
    }
    const top: { id: Tab; label: string; key: string; isOn: boolean }[] = [
      { id: 'start', label: 'Start', key: 'tab-start', isOn: current === 'start' },
      { id: 'now', label: 'Now', key: 'tab-now', isOn: current === 'now' },
      { id: guide ? current : 'flow', label: 'Guide', key: 'tab-guide', isOn: guide !== undefined },
    ]
    const nav = (
      <Box flexDirection="column" gap={1}>
        <Box flexDirection="row" flexWrap="wrap" gap={1}>
          {top.map(t => (
            <Button key={t.key} label={t.label} variant={t.isOn ? 'primary' : 'secondary'} onPress={go(t.id)} />
          ))}
        </Box>
        {guide ? (
          <Box flexDirection="row" flexWrap="wrap" gap={1}>
            {GUIDE.map(g => (
              <Button key={`tab-${g.id}`} label={g.id === current ? `• ${g.label}` : g.label} plain onPress={go(g.id)} />
            ))}
          </Box>
        ) : null}
      </Box>
    )

    const act = (a: Act | Move, variant: 'primary' | 'secondary' = 'secondary') => (
      <Button
        key={a.key}
        label={a.label}
        variant={variant}
        onPress={() => {
          if (!a.isSend) return void $.prompt.fill({ text: a.text })
          // The engine refuses a submitted prompt that starts with a slash, so a
          // slash command runs as a command.
          const slash = /^\/(\S+)\s*([\s\S]*)$/.exec(a.text)
          void (slash ? $.command.run({ command: slash[1] ?? '', args: slash[2] ?? '' }) : $.prompt.submit({ text: a.text, asUser: true }))
        }}
      />
    )

    const asked = await read($, nudge)
    const nudgeCard =
      asked === null ? null : (
        <Box key="nudge" flexDirection="column" gap={1} borderStyle="round" borderColor="#F56300" paddingX={1}>
          <Text bold color="#F56300">
            {asked.kind === 'bug' ? 'Sounds like something is broken' : 'Grill it first?'}
          </Text>
          <Text>
            {asked.kind === 'bug'
              ? '/diagnosing-bugs finds a command that shows the bug failing, then fixes it with a test. Claude will still help with what you asked.'
              : 'You asked for code before any grilling. A few minutes of questions now saves a rebuild later. Claude will still do what you asked.'}
          </Text>
          <Box flexDirection="row" flexWrap="wrap" gap={1}>
            <Button
              key="nudge-go"
              label={asked.kind === 'bug' ? 'Diagnose it' : 'Grill it first'}
              variant="primary"
              onPress={() => {
                void $.prompt.fill({ text: `${asked.kind === 'bug' ? '/diagnosing-bugs' : '/grill-with-docs'} ${asked.text}` })
              }}
            />
            <Button
              key="nudge-off"
              label="Not this time"
              onPress={() => {
                isNudgeOff = true
                void update($, nudge, () => null)
              }}
            />
          </Box>
        </Box>
      )

    const said = await read($, summary)
    const summaryCard =
      said === null ? null : (
        <Box key="summary" flexDirection="column" borderStyle="round" borderColor={said.isWaiting ? '#F56300' : '#D2D2D7'} paddingX={1}>
          <Text bold color={said.isWaiting ? '#F56300' : undefined}>
            {said.isWaiting ? 'Needs you' : 'Last turn'}
          </Text>
          <Markdown
            text={[said.done, said.next ? `**Next:** ${said.next}` : '', said.links.map(l => `[PR #${l.split('/').pop()}](${l})`).join(' · ')]
              .filter(Boolean)
              .join('\n\n')}
          />
        </Box>
      )

    const open = await read($, decision)
    const choose = (o: Choice, label: string) => (
      <Button
        key={`choose-${o.key}`}
        label={label}
        variant={o.key === open?.pick ? 'primary' : 'secondary'}
        onPress={() => {
          void $.prompt.submit({ text: o.key, asUser: true })
        }}
      />
    )
    const decisionCard =
      open === null ? null : isDesktop ? (
        <Box key="decision" flexDirection="column" gap={1}>
          {(() => {
            const { Svg } = $.ui.resolve(e)
            const source = decisionSvg(open)
            return <Svg source={source} alt={`Claude is asking: ${open.question}`} {...fit(source, e.props.bodyColumns)} />
          })()}
          <Box flexDirection="row" flexWrap="wrap" gap={1}>
            {open.options.map(o => choose(o, o.key === open.pick ? `★ ${o.key}` : o.key))}
          </Box>
        </Box>
      ) : (
        <Box key="decision" flexDirection="column" gap={1} borderStyle="round" paddingX={1}>
          <Text bold>Claude is asking: {open.question}</Text>
          {open.why ? <Text dimColor>{open.why}</Text> : null}
          <Box flexDirection="row" flexWrap="wrap" gap={1}>
            {open.options.map(o => choose(o, `${o.key} · ${o.label}`))}
          </Box>
        </Box>
      )

    const installCard = setup.hasSkills && !setup.isOutdated ? null : (
      <Box key="install" flexDirection="column" gap={1} borderStyle="round" borderColor="#E5342C" paddingX={1}>
        <Text bold color="#E5342C">
          {setup.hasSkills ? "Your copy of Matt Pocock's skills is out of date" : "Matt Pocock's skills are not installed"}
        </Text>
        <Text>
          {setup.hasSkills
            ? 'The copy from the official marketplace is older than v1.3.1 and has no /implement-spec, /pr or /retro, which later steps need. Run this in a terminal, then start a new session:'
            : 'The buttons here run his skills, so install them first. Run this in a terminal, then start a new session:'}
        </Text>
        <Code source={INSTALL} />
        {setup.hasSkills ? <Text dimColor>Then remove the old copy with: claude plugin uninstall mattpocock-skills</Text> : null}
        <Box flexDirection="row" gap={1}>
          <Button key="check-again" label="Check again" onPress={() => readEnv($)} />
        </Box>
      </Box>
    )

    if (current === 'start') {
      const r = await read($, repo)
      const ciText = { fail: 'checks failing', pending: 'checks running', pass: 'checks green', none: 'no checks' } as const
      const rows: { key: string; label: string; acts: Act[] }[] = [
        ...r.prs.map(pr => ({
          key: `pr-${pr.number}`,
          label: `PR #${pr.number}${pr.isDraft ? ' (draft)' : ''} · ${ciText[pr.ci]} · ${cut(pr.title, 48)}`,
          acts: prActs(pr),
        })),
        ...(r.dirty > 0
          ? [{
              key: 'dirty',
Licence text (MIT)
MIT License

Copyright (c) 2026 BLDG / Matt Nicosia

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 varsdrives Claudetool callsremembers

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 306192709f3d 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/pocock-guide/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.git (reaches the network), gh (reaches the network)
Reads and sendsWhether it both reads files or environment variables and reaches the network.reads environment variables and files and reaches the 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 mattnicosia/bldg-skills
/plugin install pocock-guide@bldg-skills

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

Search them from Claude: the MCP connector

Similar designs