ModsCode / Claude Code Mods / Ranking / roco
roco
Pixel-art mascot that reacts live to what Claude does. Pick one of 8, recolor it or create your own with /roco:crear. Mascota pixel art para Claude Code.
What it does
- Draws a pane, a band above the prompt
- Adds /roco
- Watches mcp__roco__guardar_personaje, mcp__roco__ajustar calls and can refuse them
- Hooks session.start, turn.complete, turn.start, ui.close
- 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
A starter ModsCode writes from the drawing it read, and the mod's own lines that draw, where there are any.
Starter (register.tsx)
import type { Register } from 'claude-code'
// Drawn like roco by s4duq (pane, band, toast), as ModsCode read it from the mod's code:
// https://modscode.com/claude-mods/mods/s4duq-roco/
// 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: "‹titulo›" })
on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
const { Box, Text, Button } = $.ui.resolve(e)
const pista = '…'
const animo = '…'
const mascotas = '…'
const tema = '…'
const color = '…'
const info = '…'
const tamano = '…'
const crear = '…'
const cerrar = '…'
return (
<Box flexDirection="column" gap={1}>
<Text dimColor wrap="truncate-end">
{pista}
</Text>
<Box flexDirection="column">
<Text bold>
{animo}
</Text>
<Box flexDirection="row" flexWrap="wrap" columnGap={1} />
</Box>
<Box flexDirection="column">
<Text bold>
{mascotas}
</Text>
<Box flexDirection="row" flexWrap="wrap" columnGap={1} />
</Box>
<Box flexDirection="column">
<Text bold>
{tema}
</Text>
<Box flexDirection="row" flexWrap="wrap" columnGap={1} />
</Box>
<Box flexDirection="column">
<Text bold>
{color}
</Text>
<Box flexDirection="row" flexWrap="wrap" columnGap={1} />
</Box>
<Box flexDirection="column">
<Text bold>
{info}
</Text>
<Box flexDirection="row" flexWrap="wrap" columnGap={1} />
</Box>
<Box flexDirection="column">
<Text bold>
{tamano}
</Text>
<Box flexDirection="row" flexWrap="wrap" columnGap={1} />
</Box>
<Box flexDirection="row" flexWrap="wrap" columnGap={2}>
<Button label={`${crear}`} variant="primary" />
<Button label={`${cerrar}`} role="dismiss" />
</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, Svg, Text } = $.ui.resolve(e)
const svg = '…'
const nombreDisplay = '…'
const animo = '…'
const detalle = '…'
const nombreDisplay2 = '…'
const animo2 = '…'
const detalle2 = '…'
const nombreDisplay3 = '…'
const animo3 = '…'
const detalle3 = '…'
const turnos = '…'
const turnos2 = '…'
const ediciones = '…'
const comandos = '…'
const errores = '…'
const turnos3 = '…'
const turnos4 = '…'
const ediciones2 = '…'
const comandos2 = '…'
const errores2 = '…'
const turnos5 = '…'
const turnos6 = '…'
const ediciones3 = '…'
const comandos3 = '…'
const errores3 = '…'
return (
<Box flexDirection="column">
<Box flexDirection="row" alignItems="center" gap={1} width="100%" borderStyle="round">
<Svg source={`${svg}`} alt={`${nombreDisplay} · ${animo}: ${detalle}`} />
<Box flexGrow={1} flexShrink={1} minWidth={0}>
<Box flexDirection="column" justifyContent="center" minWidth={0}>
<Box flexDirection="row" minWidth={0}>
<Text bold>
<Text>
{nombreDisplay}
{" ·"}
</Text>
{" "}
{animo}
</Text>
<Text dimColor wrap="truncate-end">
{" — "}
{detalle}
</Text>
</Box>
<Box flexDirection="row" minWidth={0}>
<Text bold>
<Text>
{nombreDisplay2}
{" ·"}
</Text>
{" "}
{animo2}
</Text>
<Text dimColor wrap="truncate-end">
{" — "}
{detalle2}
</Text>
</Box>
<Box flexDirection="row" minWidth={0}>
<Text bold>
<Text>
{nombreDisplay3}
{" ·"}
</Text>
{" "}
{animo3}
</Text>
<Text dimColor wrap="truncate-end">
{" — "}
{detalle3}
</Text>
</Box>
</Box>
</Box>
<Box flexDirection="column" alignItems="flex-start" justifyContent="center" flexShrink={0}>
<Text dimColor wrap="truncate-end">
{"💬 "}
{turnos}
{" "}
{turnos2}
{" · ✏️ "}
{ediciones}
{" · ▶ "}
{comandos}
{" · ⚠ "}
{errores}
</Text>
<Text dimColor wrap="truncate-end">
{"💬 "}
{turnos3}
{" "}
{turnos4}
{" · ✏️ "}
{ediciones2}
{" · ▶ "}
{comandos2}
{" · ⚠ "}
{errores2}
</Text>
<Text dimColor wrap="truncate-end">
{"💬 "}
{turnos5}
{" "}
{turnos6}
{" · ✏️ "}
{ediciones3}
{" · ▶ "}
{comandos3}
{" · ⚠ "}
{errores3}
</Text>
</Box>
</Box>
{await next(e)}
</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 266–292 · Pane
on('ui.render', { component: 'Pane', requestId: MENU }, async ($, e) => {
const ui = $.ui.resolve(e)
const animo = await read($, animoMenu)
const tarjetas = await cargarGaleria($)
const actual = { personaje: o.personaje, tema: o.temaId, acento: o.acento, campos: o.campos, estilo: o.estilo, animo }
return panelMenu(ui, ov, actual, tarjetas, {
animo: a => void update($, animoMenu, () => a),
// El panel sigue abierto tras la recarga y se redibuja con lo nuevo.
guardar: cambios =>
void (async () => {
if (!(await guardarEnOrden($, cambios))) $.ui.toast(tx.comando.noGuardado)
})(),
// Con el panel abierto (un diálogo) el cuadro no acepta texto: primero se cierra.
crear: () =>
void (async () => {
await $.store.set('menuVisto', true).catch(() => undefined)
await $.ui.close({ id: MENU }).catch(() => undefined)
const r = await $.prompt.fill({ text: '/roco:crear ' }).catch(() => ({ isFilled: false }))
$.ui.toast(r.isFilled ? tx.menu.escribeIdea : tx.menu.escribeComando)
})(),
cerrar: () =>
void (async () => {
await $.store.set('menuVisto', true).catch(() => undefined)
await $.ui.close({ id: MENU }).catch(() => undefined)
})(),
})
})hooks/menu.tsx lines 75–163 · Pane
export function panelMenu(ui: PiezasMenu, o: Opciones, a: Actual, tarjetas: readonly Tarjeta[], hacer: AccionesMenu) {
const { Box, Text, Button } = ui
const { tx, tema } = o
const m = tx.menu
const seccion = (key: string, titulo: string, hijos: unknown[]) => (
<Box key={key} flexDirection="column">
<Text bold>{titulo}</Text>
<Box flexDirection="row" flexWrap="wrap" columnGap={1}>
{hijos}
</Box>
</Box>
)
const animos = ANIMOS.map((an, i) => (
<Button key={`animo-${an}`} label={tx.animo[an]} hotkey={String(i + 1)} {...marca(an === a.animo)} onPress={() => hacer.animo(an)} />
))
const galeria = tarjetas.map(t => (
<Box key={`tarjeta-${t.id}`} flexDirection="column" alignItems="center" width={18}>
{figura(ui, t, a.animo, `${t.nombre} · ${tx.animo[a.animo]}`)}
<Text bold wrap="truncate-end">
{t.nombre}
</Text>
{t.id === a.personaje ? (
<Text color={tema.acento}>✓ {m.actual}</Text>
) : (
<Button key={`elegir-${t.id}`} label={m.elegir} onPress={() => hacer.guardar([['roco.personaje', t.id]])} />
)}
</Box>
))
// Un tema trae su color: si había un color propio, se quita después de guardar el tema.
const temas = TEMAS_VALIDOS.map(t => (
<Button
key={`tema-${t}`}
label={t}
{...marca(t === a.tema)}
onPress={() => hacer.guardar(a.acento ? [['roco.tema', t], ['roco.acento', '']] : [['roco.tema', t]])}
/>
))
const colores = [
...COLORES.map(c => (
<Box key={`color-${c.id}`} flexDirection="row">
<Text color={c.hex}>● </Text>
<Button key={`boton-${c.id}`} label={m.colores[c.id] ?? c.id} {...marca(c.hex === a.acento)} onPress={() => hacer.guardar([['roco.acento', c.hex]])} />
</Box>
)),
<Button key="color-tema" label={m.colorTema} {...marca(!a.acento)} onPress={() => hacer.guardar([['roco.acento', '']])} />,
]
const campos = CAMPOS_MENU.map(c => {
const prendido = a.campos.includes(c)
const nuevos = alternarCampo(a.campos, c).join(',')
return (
<Button
key={`campo-${c}`}
label={`${prendido ? '✓' : '·'} ${m.campos[c] ?? c}`}
{...(prendido ? {} : { dimColor: true })}
onPress={() => {
if (nuevos !== a.campos.join(',')) hacer.guardar([['roco.campos', nuevos]])
}}
/>
)
})
const estilos = ESTILOS.map(s => (
<Button key={`estilo-${s}`} label={m.estilos[s]} {...marca(s === a.estilo)} onPress={() => hacer.guardar([['roco.estilo', s]])} />
))
return (
<Box flexDirection="column" gap={1}>
<Text dimColor wrap="truncate-end">
{m.pista}
</Text>
{seccion('animos', m.animo, animos)}
{seccion('galeria', m.mascotas, galeria)}
{seccion('temas', m.tema, temas)}
{seccion('colores', m.color, colores)}
{seccion('campos', m.info, campos)}
{seccion('estilos', m.tamano, estilos)}
<Box flexDirection="row" flexWrap="wrap" columnGap={2}>
<Button key="crear" label={m.crear} variant="primary" onPress={hacer.crear} />
<Button key="cerrar" label={m.cerrar} role="dismiss" onPress={hacer.cerrar} />
</Box>
</Box>
)
}hooks/register.tsx lines 384–405 · Band
on('ui.render', { component: 'AbovePrompt' }, async ($, e, next) => {
if (e.props.hasSurvey || (await read($, oculto))) {
return next(e)
}
const l: Lectura = {
ahora: await read($, estado),
hechas: await read($, acciones),
medido: await read($, uso),
c: await read($, cuenta),
g: await read($, git),
ahoraMs: await read($, minuto),
}
const estilo = estiloEfectivo(o.estilo, (e.props as unknown as Record<string, unknown>).bodyColumns)
if (e.surface === 'terminal') {
// `cuadro` cambia cada 600 ms: solo se lee (y suscribe) donde se dibuja el ASCII; el personaje propio va fijo.
const n = estilo === 'minimo' || dibujo ? 0 : await read($, cuadro)
return franjaTerminal($.ui.resolve(e), ov, l, estilo, n, dibujo)
}
return franjaGrafica($.ui.resolve(e), ov, l, estilo, dibujo)
})hooks/vista.tsx lines 136–247 · Band
export function franjaGrafica(ui: PiezasSvg, o: Opciones, l: Lectura, estilo: Estilo, d: Dibujo | null = null) {
const { Box, Text, Svg } = ui
const { tx, tema, camposDer } = o
const nombreDisplay = o.nombre
const { ahora, medido, c, ahoraMs } = l
const aviso = avisoDe(medido, c, o.avisos, tx)
const lineas = columnaIzquierda(ui, o, l)
// Roco o el personaje propio, al alto pedido. El nombre va solo en `alt`, nunca dentro del SVG.
const dibujar = (alto: number) => {
const m = medidaSvg(d ? d.caja : null, alto)
return (
<Svg
source={d ? d.svg[ahora.animo] : svg(ahora.animo)}
alt={`${nombreDisplay} · ${tx.animo[ahora.animo]}: ${ahora.detalle}`}
width={m.width}
height={m.height}
/>
)
}
if (estilo === 'minimo') {
return (
<Box flexDirection="row" alignItems="center" gap={1}>
{dibujar(37)}
<Text bold>
<Text color={tema.acento}>{nombreDisplay} ·</Text> {tx.animo[ahora.animo]}
</Text>
<Text dimColor wrap="truncate-end">
{' — '}
{ahora.detalle}
</Text>
</Box>
)
}
if (estilo === 'compacto') {
const detalleCompacto = `${ahora.detalle} · 5 h ${pct(medido.cinco)} · ${tx.uso.semana} ${pct(medido.semana)}${aviso ? ` · ⚠ ${aviso}` : ''}`
return (
<Box flexDirection="row" alignItems="center" gap={1} width="100%">
{dibujar(44)}
<Box flexDirection="row" flexGrow={1} flexShrink={1} minWidth={0}>
<Text bold>
<Text color={tema.acento}>{nombreDisplay} ·</Text> {tx.animo[ahora.animo]}
</Text>
<Text dimColor wrap="truncate-end">
{' — '}
{detalleCompacto}
</Text>
</Box>
</Box>
)
}
const elementosDerecha = camposDer
.map(campo => {
switch (campo) {
case 'sesion':
return (
<Text key="sesion" dimColor wrap="truncate-end">
{tx.derecha.sesion(medido.inicio !== undefined && ahoraMs > 0 ? duracion(ahoraMs - medido.inicio, tx) : '–')}
</Text>
)
case 'reinicio':
return (
<Text key="reinicio" dimColor wrap="truncate-end">
{tx.derecha.cuotaCinco(medido.reinicioCinco !== undefined && ahoraMs > 0 ? duracion(medido.reinicioCinco - ahoraMs, tx) : '–')}
</Text>
)
case 'contadores':
return (
<Text key="contadores" dimColor wrap="truncate-end">
💬 {c.turnos} {tx.derecha.turnos} · ✏️ {c.ediciones} · ▶ {c.comandos} · ⚠ {c.errores}
</Text>
)
default:
return null
}
})
.filter(Boolean)
// Ancho fijo (peor caso de duraciones y contadores): si cambiara cada minuto, empujaría el texto de la izquierda.
const anchoDer =
Math.max(
tx.derecha.sesion('23 h 59 m').length,
tx.derecha.cuotaCinco('23 h 59 m').length,
`💬 999 ${tx.derecha.turnos} · ✏️ 999 · ▶ 999 · ⚠ 999`.length,
) + 2
const derecha =
elementosDerecha.length > 0 ? (
<Box flexDirection="column" alignItems="flex-start" justifyContent="center" flexShrink={0} width={anchoDer}>
{elementosDerecha}
</Box>
) : null
return (
<Box
flexDirection="row"
alignItems="center"
gap={1}
width="100%"
borderStyle="round"
borderColor={tema.acento}
>
{/* Como imagen (sin isInteractive): fondo transparente; el marco interactivo pinta blanco en modo oscuro. */}
{dibujar(72)}
<Box flexGrow={1} flexShrink={1} minWidth={0}>
{lineas}
</Box>
{derecha}
</Box>
)
}hooks/vista.tsx lines 32–91 · Band
function columnaIzquierda(ui: Piezas, o: Opciones, l: Lectura) {
const { Box, Text } = ui
const { tx, tema, camposIzq } = o
const nombreDisplay = o.nombre
const { ahora, hechas, medido, c, g } = l
const aviso = avisoDe(medido, c, o.avisos, tx)
const elementosIzquierda = camposIzq
.map(campo => {
switch (campo) {
case 'estado':
return (
<Box key="estado" flexDirection="row" minWidth={0}>
<Text bold>
<Text color={tema.acento}>{nombreDisplay} ·</Text> {tx.animo[ahora.animo]}
</Text>
<Text dimColor wrap="truncate-end">
{' — '}
{ahora.detalle}
</Text>
</Box>
)
case 'acciones':
return (
<Text key="acciones" dimColor wrap="truncate-end">
{hechas.length > 0 ? hechas.join(' · ') : tx.acciones.sinAcciones}
</Text>
)
case 'uso':
return aviso ? (
<Text key="uso" color={tema.aviso} wrap="truncate-end">
{lineaUso(medido, tx)} · ⚠ {aviso}
</Text>
) : (
<Text key="uso" dimColor wrap="truncate-end">
{lineaUso(medido, tx)}
</Text>
)
case 'git': {
const lg = lineaGit(g, tx)
return lg ? (
<Text key="git" dimColor wrap="truncate-end">
{lg}
</Text>
) : null
}
default:
return null
}
})
.filter(Boolean)
const lineas = (
<Box flexDirection="column" justifyContent="center" minWidth={0}>
{elementosIzquierda}
</Box>
)
return lineas
}Licence text (MIT)
MIT License Copyright (c) 2026 s4duq 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.
How to build this: Pane (panel), Deny a tool call
What its code calls
runs programswrites filesenv varsdrives Claudetool callsremembers
What its code shows
Read from the source at commit 6d4465b6b0cc on 2026-10-11. 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.tsx |
| Parses | Every file parses as TypeScript or JavaScript.13 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.tsx:72 a program named at run time |
| Reads and sends | Whether it both reads something of yours (files, environment variables, the transcript, settings) and reaches outside (the network, an MCP server, another session, telemetry).reads environment variables, 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 |
| Settings hooks | Hooks declared in hooks/hooks.json or plugin.json beside the module: a command (a shell when it has no args), an HTTP request, an MCP tool or a model prompt at an event. They run outside $.no settings hooks: its function hooks alone |
| Servers it ships | MCP servers (a program, or a URL; a headersHelper is a shell command; a .mcpb bundle is unpacked at run time), LSP servers, monitors (a shell command for the whole session) and bin/ (on the PATH of the Bash tool).ships no MCP or LSP server, no monitor, no bin/ |
| Skills, commands, agents | What its Markdown declares beyond text: allowed-tools granted for the turn, hooks added when a skill is invoked, a command run before Claude reads the skill.1 skill: text only |
| Tools and MCP | Whether every tool it calls through $.tool.call and $.mcp.call is named in the code, and none is a shell (Bash through the tool runs a shell without $.process).calls no tool, MCP server or command |
| Asks of the model | Completions it runs ($.model.complete, fork, classify), subagents it spawns, prompts it submits as you, and the tools, commands and agents it adds.adds command roco, adds tool ? |
| Events it hooks | By what a hook there can do: gates (refuse a tool call, a prompt, a setting, another plugin), shapes (what the model reads: the system prompt, tool descriptions, each request), reads (your input, the events of the settings hooks, every event with *), and the rest.gates: command.run (roco), tool.call (mcp__roco__guardar_pers…, mcp__roco__ajustar) · also: session.start, ui.close, ui.render (Pane, AbovePrompt), turn.start (+1) · timers: clock.every |
| Reads, by name | The environment variables and files it names, and whether it reads the transcript, settings.json, the prompt box or the mouse selection.env: USERPROFILE, HOME; files: a path computed at run time |
| Writes, by name | The files and environment variables it names, and whether it changes settings, the prompt box, the clipboard, the conversation (a row the model reads) or another session.files: …/….json; settings (config.set); the prompt box |
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 its code (or run claude plugin validate . in its folder), weigh what it reaches, and install the commit you read.
From its marketplace
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 s4duq/roco/plugin install roco@roco/reload-pluginsThis installs the marketplace's latest commit, which may not be the one read here (6d4465b6b0cc). Compare them before you install. /reload-plugins loads it into a session that is already open.
Try the commit ModsCode read
No marketplace needed. In a terminal, clone the repository, check out the commit read, validate the mod, and load it for one session:
git clone https://github.com/s4duq/rocogit -C roco checkout 6d4465b6b0cc6785f8439291347d36aab6b29b2cclaude plugin validate rococlaude --plugin-dir rocoThe validate line lists the events the mod hooks and what it asks Claude Code to do, without running it. The last line loads the mod for this session only and writes nothing to your settings. If the author has rewritten history, the commit may no longer exist.
Ask Claude about it
With the ModsCode connector added, Claude can read this mod's code and what it reaches, and build on them. Ask it like this:
Read the ModsCode mod "s4duq-roco" with its code and make me one like itSearch them from Claude: the MCP connector
Similar mods
- explain-asSumit Paul★ 20
- uploadsBuild Internet★ 18
- ccprogressamigoer★ 14
- flow-scenesRob Macrae★ 11
- laurelsKOZMOS★ 9
- spending-effort-with-jevYaxin Luo★ 6
Badge for your README
If this is your mod, paste this into your README. It links to this page.
[](https://modscode.com/claude-mods/mods/s4duq-roco/)