modscode / Gallery / mod-manager
mod-manager
A /mod-manager side pane: every installed mod and plugin with update, auto-update, uninstall, enable/disable, reload and open actions, a background check that flags outdated mods, and adding marketplaces from a GitHub or GitLab URL
What it does
- Draws a pane, the status line, toasts
- Hooks classic.SessionStart, session.start, ui.focus
- Keeps its own state between turns
- Starts processes
Good points
- No network calls
- 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)
import type { Register } from 'claude-code'
// Drawn like mod-manager by djmid (pane, status, toast), as modscode read it from the mod's code:
// https://modscode.com/gallery/netgfx-mod-manager/
// 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: "Mods" })
on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
const { Box, Button, Text, Link } = $.ui.resolve(e)
const name = '…'
const description = '…'
const homepage = '…'
return (
<Box flexDirection="column">
<Button label={`b ‹ Back to list`} hotkey="b" plain />
<Text>
{" "}
</Text>
<Text bold>
{name}
</Text>
<Text dimColor wrap="wrap">
{description}
</Text>
<Text>
{" "}
</Text>
<Box flexDirection="row">
<Text dimColor>
Status
</Text>
<Text wrap="truncate-middle">
—
</Text>
</Box>
<Box flexDirection="row">
<Text dimColor />
<Text wrap="truncate-middle">
—
</Text>
</Box>
<Box flexDirection="row">
<Text dimColor>
Installed
</Text>
<Text wrap="truncate-middle">
—
</Text>
</Box>
<Box flexDirection="row">
<Text dimColor>
Latest
</Text>
<Text wrap="truncate-middle">
—
</Text>
</Box>
<Box flexDirection="row">
<Text dimColor>
Marketplace
</Text>
<Text wrap="truncate-middle">
—
</Text>
</Box>
<Box flexDirection="row">
<Text dimColor>
Scope
</Text>
<Text wrap="truncate-middle">
—
</Text>
</Box>
<Box flexDirection="row">
<Text dimColor>
Enabled
</Text>
<Text wrap="truncate-middle">
—
</Text>
</Box>
<Box flexDirection="row">
<Text dimColor>
Auto-update
</Text>
<Text wrap="truncate-middle">
—
</Text>
</Box>
<Box flexDirection="row">
<Text dimColor>
Updated
</Text>
<Text wrap="truncate-middle">
—
</Text>
</Box>
<Box flexDirection="row">
<Text dimColor>
Folder
</Text>
<Text wrap="truncate-middle">
—
</Text>
</Box>
<Box flexDirection="row">
<Text dimColor>
Homepage
</Text>
<Link href={`${homepage}`} label={`${homepage}`} />
</Box>
<Text>
{" "}
</Text>
<Text dimColor>
────────
</Text>
<Box flexDirection="row" columnGap={2} flexWrap="wrap" />
<Box flexDirection="row" columnGap={2} flexWrap="wrap" />
</Box>
)
})
on('session.start', async ($, e, next) => {
const outdated = '…'
const length = '…'
await $.ui.status(`▲ ${outdated} mod update · /mod-manager`)
await $.ui.toast(`Auto-updated ${length} mod`)
await $.ui.toast(`Wait for the current action to finish`)
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.
hooks/register.js lines 797–956 · Pane
on('ui.render', { component: 'Pane' }, async ($, e, next) => {
if (e.requestId !== PANE) return next(e)
const { Box, Text, Button, Input, Link } = $.ui.resolve(e)
const width = Math.max(30, Number(e.props?.bodyColumns ?? PANE_COLUMNS))
const wide = width >= 52
const mods = await read($, modsAtom)
const scan = await read($, scanAtom)
const notice = await read($, noticeAtom)
const busy = await read($, busyAtom)
const pending = await read($, pendingAtom)
const now = $.clock.now()
const redraw = () => $.ui.invalidate('ui.render')
const visible = mods.filter((m) => matches(m, filter))
const order = ['outdated', 'installed', 'disabled', 'dev']
const sorted = [...visible].sort(
(a, b) => order.indexOf(sectionOf(a)) - order.indexOf(sectionOf(b)) || a.name.localeCompare(b.name),
)
if (!sorted.some((m) => m.uid === selected)) selected = sorted[0]?.uid ?? ''
const current = mods.find((m) => m.uid === selected)
if (view === 'detail' && !current) view = 'list'
const outdated = mods.filter((m) => m.status === 'outdated')
const key = (k, label, onPress, isOff) =>
Button({ key: 'act-' + k, label: k + ' ' + label, hotkey: k, plain: true, dimColor: Boolean(isOff), onPress })
// ---- Header: counts and what the background check is doing
const scanText =
scan.phase === 'listing'
? Text({ color: 'cyan', children: ['⟳ reading…'] })
: scan.phase === 'fetching'
? Text({ color: 'cyan', children: ['⟳ checking marketplaces…'] })
: scan.error
? Text({ color: 'red', wrap: 'truncate-end', children: ['✕ ' + scan.error] })
: scan.at
? Text({ dimColor: true, children: ['✓ checked ' + ago(scan.at, now)] })
: Text({ dimColor: true, children: ['not checked yet'] })
const counts = [
Text({ bold: true, children: [mods.length + ' installed'] }),
...(outdated.length ? [Text({ color: 'yellow', children: [' · ' + outdated.length + ' update' + (outdated.length === 1 ? '' : 's')] })] : []),
]
const header = Box({
flexDirection: 'column',
children: [Box({ flexDirection: 'row', children: counts }), scanText],
})
const banners = []
if (busy) {
const m = mods.find((x) => x.uid === busy.uid)
const verbing = { update: 'Updating', uninstall: 'Uninstalling', enable: 'Enabling', disable: 'Disabling' }[busy.verb]
banners.push(Text({ color: 'cyan', wrap: 'truncate-end', children: ['⟳ ' + (busy.label ?? verbing + ' ' + (m?.name ?? '')) + '…'] }))
}
if (notice) {
const color = notice.kind === 'error' ? 'red' : notice.kind === 'ok' ? 'green' : undefined
banners.push(Text({ color, wrap: 'wrap', children: [(notice.kind === 'error' ? '✕ ' : notice.kind === 'ok' ? '✓ ' : '• ') + notice.text] }))
}
if (pending && !busy) {
banners.push(
Box({
flexDirection: 'row',
columnGap: 1,
children: [
Text({ color: 'yellow', children: ['Changes apply after a reload.'] }),
Button({ key: 'reload-now', label: 'Reload now', plain: true, onPress: () => reloadPlugins($) }),
],
}),
)
}
if (confirm) {
const m = mods.find((x) => x.uid === confirm.uid)
const question =
confirm.kind === 'update-all'
? 'Update ' + outdated.length + ' mod' + (outdated.length === 1 ? '' : 's') + '?'
: 'Uninstall ' + (m?.id ?? '') + (m?.name === 'mod-manager' ? ' (this pane)' : '') + '?'
const yes = async () => {
const c = confirm
confirm = null
redraw()
if (c.kind === 'update-all') await updateAll($)
else await runAction($, c.uid, 'uninstall')
}
banners.push(
Box({
flexDirection: 'column',
borderStyle: 'round',
borderColor: 'yellow',
paddingX: 1,
children: [
Text({ bold: true, children: [question] }),
Box({
flexDirection: 'row',
columnGap: 3,
children: [
Button({ key: 'confirm-yes', label: 'y Yes', hotkey: 'y', plain: true, autoFocus: true, onPress: yes }),
Button({ key: 'confirm-no', label: 'n Cancel', hotkey: 'n', plain: true, onPress: () => { confirm = null; redraw() } }),
],
}),
],
}),
)
}
const rule = Text({ dimColor: true, children: ['─'.repeat(width)] })
// Action keys for the highlighted mod
const canUpdate = current && current.status === 'outdated' && !current.isDev
const modKeys = current
? [
key('u', 'Update', () => runAction($, current.uid, 'update'), !canUpdate),
key('x', 'Uninstall', () => { if (current.isDev) return runAction($, current.uid, 'uninstall'); confirm = { uid: current.uid, kind: 'uninstall' }; redraw() }, current.isDev),
key('e', current.enabled ? 'Disable' : 'Enable', () => runAction($, current.uid, current.enabled ? 'disable' : 'enable'), current.isDev),
key('o', 'Open folder', () => openMod($, current.uid, 'folder'), !current.installPath),
key('t', current.auto ? 'Auto-update: on' : 'Auto-update: off', () => toggleAuto($, current.uid), current.isDev),
]
: []
const globalKeys = [
key('a', 'Update all' + (outdated.length ? ' (' + outdated.length + ')' : ''), () => {
if (!outdated.length) return setNotice($, 'Everything is up to date.', 'info')
confirm = { uid: '', kind: 'update-all' }
redraw()
}, !outdated.length),
key('c', 'Check now', () => startCheck($), scan.phase !== 'idle'),
key('r', 'Reload', () => reloadPlugins($)),
key('f', filterOpen ? 'Close filter' : 'Filter', () => { filterOpen = !filterOpen; if (!filterOpen) filter = ''; redraw() }),
key('m', 'Add marketplace', () => { view = 'add'; addError = ''; confirm = null; redraw() }),
]
const keyRows = (keys) => Box({ flexDirection: 'row', columnGap: 2, flexWrap: 'wrap', children: keys })
const backButton = (label, onPress) =>
Button({ key: 'back', label: 'b ‹ ' + label, hotkey: 'b', plain: true, onPress })
// ---- Add view: paste a repository, it becomes a marketplace
if (view === 'add') {
return Box({
flexDirection: 'column',
children: [
backButton('Back to list', () => { view = 'list'; addError = ''; redraw() }),
Text({ children: [' '] }),
Text({ bold: true, children: ['ADD A MARKETPLACE'] }),
Text({
dimColor: true,
wrap: 'wrap',
children: ['Paste a GitHub or GitLab repository. It must have .claude-plugin/marketplace.json at its root. You pick which of its plugins to install next.'],
}),
Text({ children: [' '] }),
Input({
key: 'repo',
label: 'Repository',
placeholder: 'github.com/owner/repo',
value: addDraft,
autoFocus: true,
submitLabel: 'add',
onInput: (v) => { addDraft = v },
onSubmit: (v) => { addDraft = v; return addMarketplace($, v) },
}),
...(addError ? [Text({ color: 'red', wrap: 'wrap', children: ['✕ ' + addError] })] : []),
...banners,
Text({ children: [' '] }),
Text({ dimColor: true, children: ['Accepted forms:'] }),Licence text (MIT)
MIT License Copyright (c) 2026 Michael Dobekidis 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 615a20b5761d 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 read | Every module hooks/hooks.json names was read.hooks/register.js |
| Parses | Every file parses as TypeScript or JavaScript.1 files parsed |
| All its code is in the mod | Every import is a file of the mod or the engine's own module; no packages, no require.all its code is in the mod |
| Readable | No 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 open | Network 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 draws | The 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 line | Whether 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 Windows | Whether every program it starts through $.process exists on Windows (tail, date, open, osascript, /usr/… do not).runs no program a Windows PC lacks |
| Network | Whether every fetch names its https host in the code.no network |
| Programs | Whether every program it starts is named in the code and is not a shell, an interpreter or a network tool.hooks/register.js:67 a program named at run time; hooks/register.js:93 a program named at run time |
| Reads and sends | Whether it both reads files or environment variables and reaches the network.reads environment variables and files and reaches the network |
| Keys in the source | Whether the source holds what looks like an API key or a private key.no keys in the source |
| Licence | An 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 netgfx/claude-mod-manager/plugin install mod-manager@claude-mod-managerThis installs the marketplace's latest commit, which may not be the one read here (615a20b5761d). 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 "netgfx-mod-manager" with its code and make me a pane like itSearch them from Claude: the MCP connector
Similar designs
-
Ask Claude…GitHub inboxGitHubloading…Refresh rbuildbuildbuildClose xStealth IssuesNo open issues in this view.#3 Fix login · Pinned notice · 2h 10m · Top row commentsWork on itopen#3 Fix login · Pinned notice · 2h 10m · Top row commentsWork on itopen#3 Fix login · Pinned notice · 2h 10m · Top row commentsWork on itopenPull requestsNo open pull requests.#3 Fix login · main · draft · build · HiddenChecksReviewopen#3 Fix login · main · draft · build · HiddenChecksReviewopen#3 Fix login · main · draft · build · HiddenChecksReviewopenChecks for #3Plain
-
Ask Claude…◉ Subcommands◆ acme/app● Backlog build▲ Backlog build⇄ Backlog build✗ Backlog buildPriorityBacklog 3%◌ syncing… r⚙ Set up build for the board◌ Reading the repo, its project and its issues…Couldn't read what setup needs: Item closed/issues check says what is missing and how to fix it.Projectnone is linked to buildFix login (#3)buildApply will:● Fix login Item closed● Fix login Item closed● Fix login Item closedarea labels to create: Off track updateWhich Status is whichInbox (folds)Inbox (folds)Inbox (folds)In the project's Workflows settings, by hand: · turn on Off track · turn off Inactive: it marks every closed issue Done, even an abandoned one; the board moves issues closed as comp… · new issues arrive with Status Todo, GitHub's default, so they skip the Inbox: open Item added to project and set it…↗ WorkflowsNo issue template has an Acceptance list.◌ Applying…build █████░░░ Off trackbuild █████░░░ Off tracklast 12 weeks✗ Setup needed⋯Fix loginSubcommandsSubcommands↗ example.comFix loginSubcommandsSubcommands↗ example.comFix loginSubcommandsSubcommands↗ example.com
-
Ask Claude…LensRecently reviewedThis folder is not in a git repository. Pick a repo (its number), or name one: /lens ~/Code/my-repo build EnterThread reopenedbuildbuildacme/app · 2h 10m✕ forgetThread reopenedbuildbuildacme/app · 2h 10m✕ forgetThread reopenedbuildbuildacme/app · 2h 10mbuild Enter✕ forgetThread reopenedbuildbuildacme/app · 2h 10m✕ forgetThread reopenedbuildbuildacme/app · 2h 10m✕ forgetThread reopenedbuildbuildacme/app · 2h 10mbuild Enter✕ forgetThread reopenedbuildbuildacme/app · 2h 10m✕ forgetThread reopenedbuildbuildacme/app · 2h 10m✕ forgetThread reopenedbuildbuildacme/app · 2h 10m✕ forget
-
Ask Claude…2h 10m · █████░░░✓ build ✓ build ✓ buildJavaKotlin3 Python■ ok 3 ■ ok 3 ■ ok 3 Razor proven 3 Razor proven 3 Razor proven 3Phases ──────── 3/3build Pythonbuild Pythonbuild Python… 3 more phasesLua ──────── 3/Kotlin■ the whole upgrade Ruby■ build build Ruby■ build build Ruby■ build build Ruby … 3 moreNext ──────── PythonRuby (by hand)Podsclick a button, or ctrl+x tab then Tab, EnterAttention ──────── 3! Scala ! Scala ! Scala … 3 moreSession ──────── okJava
-
Ask Claude…great_cto: 3 gate waiting — /gatesGatesmy-app · 3 waiting · checked Gates UTCGates — Fix logina1b2c3dExpensive to undo. To approve, type Gates and press Enter.approve: Gates approveGates — Fix logina1b2c3dExpensive to undo. To approve, type Gates and press Enter.approve: Gates approveGates — Fix logina1b2c3dExpensive to undo. To approve, type Gates and press Enter.approve: Gates approve
-
Ask Claude…agent-discoverbuildbuildbuildRefreshMCP Browse/3Tab / shift+Tab move · Enter presses · ↑↓ scroll · Esc back to the promptBrowse...Audit asks:DeclineAcceptDeclineCancelAudit asks:DeclineAcceptDeclineCancelAudit asks:DeclineAcceptDeclineCancel