bearings
Keeps a glossary of the conversation's terms and a map of where the work stands, in panes opened from a band above the prompt, with a btw input for side questions.
What it does
- Draws a band above the prompt, a pane
- Adds /glossary, /bearings
- Watches mcp__bearings__add calls and can refuse them
- Hooks session.attach, session.compact, session.start, turn.complete and 1 more
- Keeps its own state between turns
Good points
- No network calls
- 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)
import type { Register } from 'claude-code'
// Drawn like bearings by Roy Abitbol (pane, band, toast), as modscode read it from the mod's code:
// https://modscode.com/gallery/roy651-bearings/
// 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, Button, Text } = $.ui.resolve(e)
const newCount = '…'
const bearingsAge = '…'
return (
<Box flexDirection="column">
<Box flexDirection="row" gap={2}>
<Button plain hotkey="g" label={`Glossary · ${newCount} new`} />
<Button plain hotkey="b" label={`Bearings · ${bearingsAge}`} />
<Text dimColor>
{"· "}
1 other session here
</Text>
<Text dimColor>
updating
</Text>
</Box>
{await next(e)}
</Box>
)
})
// the pane: open it with $.ui.open({ id: 'my-pane', title: "Glossary" })
on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
const { Box, Text, Markdown, Button, Input } = $.ui.resolve(e)
const shortId = '…'
const relativeTime = '…'
const capText = '…'
const length = '…'
const rebuildLabel = '…'
const pendingQuestion = '…'
const notice = '…'
const statsLine = '…'
return (
<Box flexDirection="column" gap={1}>
<Text dimColor>
{"glossary seeded from the other sessions here (newest "}
{shortId}
{", "}
{relativeTime}
)
</Text>
<Markdown text={`${capText}`} />
<Button plain dimColor label={`Hide earlier facts (${length})`} />
<Markdown dimColor text={`${capText}`} />
<Button plain dimColor label={`Hide other sessions here (${length})`} />
<Markdown text={`${capText}`} />
<Button hotkey="r" label={`${rebuildLabel}`} />
<Markdown text={`${capText}`} />
<Text dimColor>
{"thinking: "}
{pendingQuestion}
</Text>
<Text dimColor>
{notice}
</Text>
<Input placeholder="btw: a side question (or add: / fact: / pin: commands)" submitLabel="ask" />
<Text dimColor>
{statsLine}
</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.
plugins/bearings/hooks/register.tsx lines 777–801 · Band
on('ui.render', { component: 'AbovePrompt' }, async ($, e, next) => {
const participation = await read($, participationAtom)
if (e.props.hasSurvey || participation === 'off' || participation === 'panel') return next(e)
const { Box, Button, Text } = $.ui.resolve(e)
const glossary = await read($, glossaryAtom)
const bearings = await read($, bearingsAtom)
const turn = await read($, turnAtom)
const isBusy =
(await read($, isUpdatingAtom)) || (await read($, isScanningAtom)) || (await read($, rebuildProgressAtom)) !== null
const otherCount = (await read($, otherSessionsAtom)).length
const knownTerms = await read($, knownTermsAtom)
const newCount = glossary.filter(entry => isNew(entry, turn) && !isKnown(entry.term, knownTerms)).length
const bearingsAge = bearings === null ? 'not built yet' : turnsAgo(turn - bearings.updatedAtTurn)
return (
<Box flexDirection="row" gap={2}>
<Button key="open-glossary" plain hotkey="g" label={`Glossary · ${newCount} new`} onPress={() => void openGlossary($)} />
<Button key="open-bearings" plain hotkey="b" label={`Bearings · ${bearingsAge}`} onPress={() => void openBearings($)} />
{otherCount > 0 && <Text dimColor>· {otherCountLabel(otherCount)}</Text>}
{isBusy && <Text dimColor>updating</Text>}
</Box>
)
})plugins/bearings/hooks/register.tsx lines 843–907 · Pane
on('ui.render', { component: 'Pane', requestId: BEARINGS_PANE }, async ($, e) => {
const elements = $.ui.resolve(e)
const { Box, Button, Markdown, Text } = elements
const Input = 'Input' in elements ? elements.Input : undefined
const turn = await read($, turnAtom)
const bearings = (await read($, bearingsAtom)) ?? emptyBearings()
const isEarlierOpen = await read($, isBearingsEarlierOpenAtom)
const rebuildProgress = await read($, rebuildProgressAtom)
const thread = await read($, btwAtom)
const pendingQuestion = await read($, btwPendingQuestionAtom)
const notice = await read($, btwNoticeAtom)
const stats = await read($, statsAtom)
const { recent: recentFacts, earlier: earlierFacts } = splitByRecency(bearings.facts, turn)
const inherited = bearings.inheritedFrom
const otherSessions = await read($, otherSessionsAtom)
const isOthersOpen = await read($, isOtherSessionsOpenAtom)
const now = await $.clock.now()
return (
<Box flexDirection="column" gap={1}>
{inherited !== undefined && (
<Text dimColor>
glossary seeded from the other sessions here (newest {shortId(inherited.sessionId)}, {relativeTime(Date.parse(inherited.savedAt), now)})
</Text>
)}
<Markdown text={capText(bearingsSections(bearings, recentFacts, turn), MARKDOWN_LIMIT)} />
{earlierFacts.length > 0 && (
<Button
key="toggle-earlier"
plain
dimColor
label={`${isEarlierOpen ? 'Hide' : 'Show'} earlier facts (${earlierFacts.length})`}
onPress={() => void update($, isBearingsEarlierOpenAtom, isOpen => !isOpen)}
/>
)}
{earlierFacts.length > 0 && isEarlierOpen && <Markdown dimColor text={capText(factList(earlierFacts), MARKDOWN_LIMIT)} />}
{otherSessions.length > 0 && (
<Button
key="toggle-other-sessions"
plain
dimColor
label={`${isOthersOpen ? 'Hide' : 'Show'} other sessions here (${otherSessions.length})`}
onPress={() => void update($, isOtherSessionsOpenAtom, isOpen => !isOpen)}
/>
)}
{otherSessions.length > 0 && isOthersOpen && (
<Markdown text={capText(`## Other sessions here\n\n${sessionSections(otherSessions, now)}`, MARKDOWN_LIMIT)} />
)}
<Button key="rebuild" hotkey="r" label={rebuildLabel(rebuildProgress)} onPress={() => void logIfNotDone($, () => rebuild($, model))} />
{thread.length > 0 && <Markdown text={capText(btwThread(thread), MARKDOWN_LIMIT)} />}
{pendingQuestion !== null && <Text dimColor>thinking: {pendingQuestion}</Text>}
{notice !== null && <Text dimColor>{notice}</Text>}
{Input !== undefined && (
<Input
key="btw-input"
placeholder="btw: a side question (or add: / fact: / pin: commands)"
submitLabel="ask"
onSubmit={value => void submitPaneInput($, model, value, true)}
/>
)}
<Text dimColor>{statsLine(stats)}</Text>
</Box>
)
})Licence text (MIT)
MIT License Copyright (c) 2026 Roy Abitbol 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 programswrites 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 7907794233e1 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.plugins/bearings/hooks/register.tsx |
| Parses | Every file parses as TypeScript or JavaScript.12 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.plugins/bearings/hooks/register.tsx:412 a program named at run time |
| Reads and sends | Whether it both reads files or environment variables and reaches the network.reaches no 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 roy651/cc-bearings/plugin install bearings@cc-pluginsThis installs the marketplace's latest commit, which may not be the one read here (7907794233e1). 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 "roy651-bearings" with its code and make me a pane like itSearch them from Claude: the MCP connector
Similar designs
-
Ask Claude…Skins0 Your promptadd rate limiting to the hub api0 Tool rows: finished, running, failedYour prompt Spinner0 Folded group of reads and searches●main · note 3 · note 3 · note 30 Edit diff cardDesktop only; the terminal keeps Claude Code's diff.0 Shell output cardDesktop only.0 Code block cardDesktop only; the terminal keeps Claude Code's markdown.0 TableAccentAccentAccentAccentAccentAccentAccentAccentAccentAccentAccentAccentCopyAccentAccentAccentAccentAccentAccentAccentAccentAccentAccentAccentAccentCopyAccentAccentAccentAccentAccentAccentAccentAccentAccentAccentAccentAccentCopy0 SpinnerAccent SpinnerSpinnerSpinner… 2h 10m0 Band above the prompt: normal, then nudging to compact█████░░░ 42% build█████░░░ 42% build█████░░░ 42% buildContext is 42% full0 Compact now0 Band above a questionTable BashBashBash0 Turn footer (terminal)3 build in 2h 10m · Grep · +3 −3
-
Ask Claude…Glossary BrowserGlossary openContextsContextsContexts▲ prevWrite1/Glossary▼ nextContexts
-
Ask Claude…envbuildbuildbuild+ .env.localsrc/app.ts is not in .gitignoreWriteNo .env files in the project root yet.K = paste the value, Enter saves saveNew key: NAME, Enter to continuegenerate randomcancelMissing compared with Write:KKK
-
Ask Claude…────────Clear doneClaude⋯└─ buildCancelCancelCancel└─ buildCancelCancelCancel└─ buildCancelCancelCancel
-
What it does
- Draws a pane, a band above the prompt
- Adds /lingo
- Hooks prompt.edit, prompt.submit, session.start
- Keeps its own state between turns
-
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