ModsCode / Claude Code Mods / Ranking / coachline
coachline
A split-pane panel for Claude Code: this thread's prompts in white, what can be improved in blue, analysed by Claude on your subscription (no API key) together with your past chats, so it can tell you what to turn into a skill.
What it does
- Draws a pane
- Hooks prompt.submit, session.start, turn.complete, ui.close
- Starts processes
Good points
- No network calls
- Small: 280 lines
- Written in TypeScript
- 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 coachline by Teran Sarathchandra (pane), as ModsCode read it from the mod's code:
// https://modscode.com/claude-mods/mods/teransarathchandra-coachline/
// 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: "coachline" })
on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
const { Box, Text, Button } = $.ui.resolve(e)
const length = '…'
const text = '…'
const p = '…'
const p2 = '…'
const p3 = '…'
const skill = '…'
const glyph = '…'
const stamp = '…'
const err = '…'
const note = '…'
const notice = '…'
return (
<Box flexDirection="column">
<Box>
<Text bold>
{"coachline · this thread · "}
{length}
{" prompt"}
</Text>
<Text>
{" "}
</Text>
<Text color="green">
● Claude on
</Text>
</Box>
<Box flexDirection="column" marginY={1}>
<Text bold>
Your prompt
</Text>
<Text color="whiteBright">
{text}
</Text>
<Button label="Show less" />
</Box>
<Button label="Analyse again" />
<Button label="Look again on the web" />
<Box flexDirection="column">
<Button label="Hide patterns" />
<Text color="blueBright">
{p}
</Text>
<Text color="blueBright">
{p2}
</Text>
<Text color="blueBright">
{p3}
</Text>
<Button label={`Install the drafted skill /${skill}`} />
</Box>
<Text dimColor>
Prompts in this thread
</Text>
<Button label={`› ${glyph} ${stamp} ${text}`} />
<Button label={`› ${glyph} ${stamp} ${text}`} />
<Button label={`› ${glyph} ${stamp} ${text}`} />
<Text color="red">
{err}
</Text>
<Text dimColor>
{note}
</Text>
<Text dimColor>
{notice}
</Text>
</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/coachline.tsx lines 160–279 · Pane
on('ui.render', { component: 'Pane', requestId: PANE }, async ($, e) => {
const { Box, Button, Text } = $.ui.resolve(e)
width = e.viewport?.columns ?? width
const s = await read($, state)
const err = await read($, error)
const note = await read($, msg)
if (!s) return <Text dimColor>{err || 'coachline: loading…'}</Text>
const header = (
<Box key="header">
<Text bold>coachline · this thread · {s.entries.length} prompt{s.entries.length === 1 ? '' : 's'}</Text>
<Text>{' '}</Text>
<Text color={s.ai ? 'green' : 'gray'}>{s.ai ? '● Claude on' : '○ Claude off'}</Text>
</Box>
)
const footer = [
err ? <Text key="err" color="red">{err}</Text> : null,
note ? <Text key="msg" dimColor>{note}</Text> : null,
s.notice && !s.entries.length ? <Text key="notice" dimColor>{s.notice}</Text> : null,
]
if (!s.entries.length) {
return (
<Box flexDirection="column">
{header}
<Text dimColor>Send a prompt: coachline coaches it here.</Text>
{footer}
</Box>
)
}
const at = await read($, sel)
const i = at < 0 || at >= s.entries.length ? s.entries.length - 1 : at
const cur: PaneEntry | undefined = s.entries[i]
if (!cur) return <Text dimColor>coachline: loading…</Text>
const isFull = await read($, full)
const pats = await read($, showPatterns)
const copy = async () => {
const r = await $.ui.copy({ text: cur.after, surface: e.surface })
await update($, msg, () => (r.isCopied ? `copied the enhanced prompt (${cur.after.length} characters)` : NO_CLIPBOARD))
}
const analyse = async () => {
const r = await run($, s.session ? ['--enhance', cur.key, '--session', s.session] : ['--enhance', cur.key])
await update($, msg, () => (r.ok ? r.out.trim() : r.err))
await refresh($)
}
const mark = async (status: 'dismissed' | 'adopted', id: string) => {
const r = await run($, ['--mark', status, id])
await update($, msg, () => (r.ok ? r.out.trim() : r.err))
await refresh($)
}
const research = async () => {
const r = await run($, s.session ? ['--research', cur.key, '--session', s.session] : ['--research', cur.key])
await update($, msg, () => (r.ok ? r.out.trim() : r.err))
}
const install = async () => {
if (!s.skill) return
const r = await run($, ['--install', s.skill])
await update($, msg, () => (r.ok ? r.out.trim() : r.err))
}
const line = (l: PaneLine, n: number) => {
const [section, kind, text, right, action] = l
if (kind === 'blank') return <Text key={`l${n}`}> </Text>
if (kind === 'head') {
return (
// the label or button sits right after the title, never against the pane's right edge, where the pane's own close mark is
<Box key={`l${n}`}>
<Text bold color={HEAD_COLOR[section] ?? 'blueBright'}>{text}</Text>
<Text>{' '}</Text>
{action === 'copy' ? <Button key="copy" label="Copy" onPress={copy} />
: right ? <Text dimColor>{right}</Text> : null}
</Box>
)
}
if (kind === 'itemacts' && action?.startsWith('item:')) {
const id = action.slice('item:'.length)
return (
<Box key={`l${n}`}>
<Text>{' '}</Text>
<Button key={`hide:${id}`} label="Hide" onPress={() => mark('dismissed', id)} />
<Text>{' '}</Text>
<Button key={`use:${id}`} label="I use this" onPress={() => mark('adopted', id)} />
</Box>
)
}
if (action === 'enter') return <Button key="whole" label="Show the whole prompt" onPress={() => update($, full, () => true)} />
return <Text key={`l${n}`} color={COLOR[kind]} dimColor={kind === 'bluedim' || kind === 'meta'} bold={kind === 'prompt'}>{text}</Text>
}
const card = isFull
? [<Text key="fullhead" bold>Your prompt</Text>, <Text key="fulltext" color="whiteBright">{cur.text}</Text>,
<Button key="less" label="Show less" onPress={() => update($, full, () => false)} />]
: cur.lines.map(line)
// watch.py's card names keys ("press e"); here one Analyse button stands for them, whatever the prompt's state
const canAnalyse = !cur.after && cur.state !== 'off'
return (
<Box flexDirection="column">
{header}
<Box flexDirection="column" marginY={1}>{card}</Box>
{canAnalyse && <Button key="analyse" label={cur.state === 'pending' ? 'Analyse again' : 'Analyse'} onPress={analyse} />}
{s.research && !!cur.after && cur.state !== 'off' && <Button key="research" label="Look again on the web" onPress={research} />}
{s.patterns.length > 0 && (
<Box flexDirection="column">
<Button key="patterns" label={pats ? 'Hide patterns' : `${s.patterns.length} pattern${s.patterns.length === 1 ? '' : 's'} from your past chats`}
onPress={() => update($, showPatterns, v => !v)} />
{pats && s.patterns.map((p, n) => <Text key={`p${n}`} color="blueBright">{p}</Text>)}
{s.skill && <Button key="skill" label={`Install the drafted skill /${s.skill}`} onPress={install} />}
</Box>
)}
<Text dimColor>Prompts in this thread</Text>
{s.entries.map((x, n) => (
<Button key={`e${n}`} label={`${n === i ? '›' : ' '} ${x.glyph} ${x.stamp} ${x.text.replace(/\s+/g, ' ').slice(0, Math.max(10, width - 16))}`}
onPress={() => update($, sel, () => n)} />
))}
{footer}
</Box>
)
})Licence text (MIT)
MIT License Copyright (c) 2026 Teran Sarathchandra 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), Rewrite the prompt
What its code calls
runs programsenv varssettings hooks
What its code shows
Read from the source at commit 056b8a3c3a26 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/coachline.tsx |
| 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/coachline.tsx:42 a program named at run time; hooks/coachline.tsx:55 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, but reaches nothing outside |
| 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 $.SessionStart: setup.py; (through a shell); SessionStart: launch.py; (through a shell) |
| 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.asks nothing of the model |
| 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: prompt.submit · also: session.start, turn.complete, ui.close, ui.render (Pane) · 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: OS |
| 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.the clipboard |
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 teransarathchandra/coachline/plugin install coachline@coachline/reload-pluginsThis installs the marketplace's latest commit, which may not be the one read here (056b8a3c3a26). 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/teransarathchandra/coachlinegit -C coachline checkout 056b8a3c3a26173e82ea8f9a2a55cde2876fc33dclaude plugin validate coachlineclaude --plugin-dir coachlineThe 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 "teransarathchandra-coachline" with its code and make me one like itSearch them from Claude: the MCP connector
Similar mods
- blast-radiusdeepseek-ai★ 247,289
- replay-theaterdeepseek-ai★ 247,289
- ruview-liveruvnet★ 97,236
- ruflo-swarmruvnet★ 74,323
- code-modernizationAnthropic★ 37,653
- seo-cockpitAgrici Daniel★ 18,364
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/teransarathchandra-coachline/)