ModsCode / Claude Code Mods / Ranking / tasknotes-preview
tasknotes-preview
Show Obsidian TaskNotes tasks from a .base view as a board, list, agenda or dependency graph in a Claude Desktop side pane
What it does
- Draws a pane, toasts
- Adds /taskboard
- Watches mcp__tasknotes-preview__open calls
- Hooks session.start
- 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 tasknotes-preview by BRNCX (pane, toast), as ModsCode read it from the mod's code:
// https://modscode.com/claude-mods/mods/cbruyndoncx-tasknotes-preview/
// 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: "Tasks · ‹viewName›" })
on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
const { Box, Text, Select, Button } = $.ui.resolve(e)
const rel = '…'
const view = '…'
const LAYOUT_LABEL = '…'
const name = '…'
const caption = '…'
const length = '…'
const tasksFolder = '…'
const archiveFolder = '…'
const count = '…'
const warnings = '…'
return (
<Box flexDirection="column" gap={1}>
<Text bold wrap="truncate-middle">
{rel}
</Text>
<Box flexDirection="row" gap={2} alignItems="center" flexWrap="wrap">
<Select label="View" value={`${view}`} />
<Button label={`${LAYOUT_LABEL}`} />
<Button label={`${LAYOUT_LABEL}`} />
<Button label={`${LAYOUT_LABEL}`} />
<Button label="Refresh" />
<Button label="Open in Obsidian" />
</Box>
<Text dimColor>
{name}
{" · "}
{caption}
</Text>
<Text dimColor>
{`Filters run over the ${length} notes in ${tasksFolder} and ${archiveFolder}, not the whole vault.`}
</Text>
<Box flexDirection="row" flexWrap="wrap" gap={1} alignItems="center">
<Text dimColor>
Projects
</Text>
<Button label={`${name} ${count}`} />
<Button label={`${name} ${count}`} />
<Button label={`${name} ${count}`} />
<Button label="Fewer" dimColor />
</Box>
<Box flexDirection="row" flexWrap="wrap" gap={1} alignItems="center">
<Text dimColor>
Contexts
</Text>
<Button label={`@${name} ${count}`} />
<Button label={`@${name} ${count}`} />
<Button label={`@${name} ${count}`} />
<Button label="Fewer" dimColor />
</Box>
<Button label="Clear filters" dimColor />
<Text dimColor italic>
Note: skipped what this renderer cannot read (
{length}
{"): "}
{warnings}
; …
</Text>
</Box>
)
})
on('session.start', async ($, e, next) => {
const rel = '…'
const openInObsidian = '…'
const errorText = '…'
await $.ui.toast(`Opened ${rel} in Obsidian (${openInObsidian})`)
await $.ui.toast(`Could not open Obsidian: ${errorText}`)
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.tsx lines 468–627 · Pane
on('ui.render', { component: 'Pane', requestId: PANE }, async ($, e) => {
const ref = memberOf(TARGET, e)
const { value: t } = await $.state.get(ref)
const patch = (change: Partial<TasksTarget>) => update($, ref, cur => (cur ? { ...cur, ...change, rev: cur.rev + 1 } : cur))
const open = async (rel: string) => {
if (!t) return
const target: Target = { rel, real: joinPath(t.root, rel), ...(t.vault ? { vault: t.vault } : {}) }
try {
$.ui.toast(`Opened ${rel} in Obsidian (${await openInObsidian($, target)})`)
} catch (err) {
$.ui.toast(`Could not open Obsidian: ${errorText(err)}`)
}
}
const empty = 'No tasks open. Run /taskboard, or /taskboard kanban, or /taskboard <file.base>.'
let drawn: Drawn | undefined
let failure: string | undefined
if (t) {
try {
drawn = await evaluate($, t)
} catch (err) {
failure = errorText(err)
}
}
if (e.surface === 'terminal') {
const { Box, Text } = $.ui.resolve(e)
return (
<Box flexDirection="column">
<Text>{t ? t.rel : empty}</Text>
{drawn && <Text>{summarize(drawn, t as TasksTarget)}</Text>}
{failure && <Text color="red">{failure}</Text>}
<Text dimColor>The board, agenda and graph are drawn in the Desktop Code tab.</Text>
</Box>
)
}
const elements = $.ui.resolve(e)
const { Box, Text, Button, Svg } = elements
const Select = 'Select' in elements ? elements.Select : undefined
if (!t) return <Text dimColor>{empty}</Text>
if (!drawn) return <Text color="red">Cannot show {t.rel}: {failure}</Text>
const { model, all, config, vault, layout, now } = drawn
const filters = filtersOf(t)
const filtering = filters.projects.length + filters.contexts.length > 0
const settings = vault.settings
const isExpanded = (key: string) => t.expanded.includes(`${layout}:${key}`)
const expand = (key: string) => patch({ expanded: [...t.expanded, `${layout}:${key}`] })
const collapse = (key: string) => patch({ expanded: t.expanded.filter(k => k !== `${layout}:${key}`) })
// The popup a card or agenda row shows while the pointer is on it: every property of the
// task and an Open in Obsidian button. A hover reveal runs no hook, so it costs no redraw;
// it is drawn display:none, absolute (moves nothing) and lit by the keyed Box around it.
const taskIndexOf = memo(`${drawn.key}|index`, () => taskIndex(vault.tasks))
const taskByPath = memo(`${drawn.key}|byPath`, () => new Map(vault.tasks.map(task => [task.file.path, task])))
const popup = (path: string, place: { top: number; left: number }) => {
const task = taskByPath.get(path)
if (!task) return undefined
return (
<Box
position="absolute"
top={place.top}
left={place.left}
right={0}
display="none"
hover={{ display: 'flex' }}
flexDirection="column"
borderStyle="round"
borderColor={task.statusDef?.color ?? 'gray'}
backgroundColor="#1e1e1e"
paddingX={1}
>
<Text bold color="white" wrap="wrap">{task.title}</Text>
{detailOf(task, taskIndexOf, now).map((m, k) => (
<Text key={`pop:${path}:${k}`} color={m.color ?? 'white'} {...(k === 0 || m.color ? {} : { dimColor: true })} wrap="wrap">{m.text}</Text>
))}
{t.vault && <Button key={`pop-open:${path}`} label="Open in Obsidian" variant="primary" onPress={() => open(path)} />}
</Box>
)
}
const cardView = (card: Card, compact: boolean) => (
<Box key={`card:${card.key}`} flexDirection="column" borderStyle="round" borderColor={card.color ?? 'gray'} paddingX={1} marginBottom={compact ? 0 : 1}>
{popup(card.path, { top: 0, left: 0 })}
<Box flexDirection="row" gap={1} alignItems="flex-start">
<Text color={card.color ?? 'gray'}>●</Text>
<Box flexGrow={1} flexShrink={1}>
<Text bold={!card.done} strikethrough={card.done} dimColor={card.done} wrap="wrap">{card.title}</Text>
</Box>
<Button key={`open:${card.path}`} label="↗" plain dimColor onPress={() => open(card.path)} />
</Box>
{card.meta.length > 0 && (
<Box flexDirection="row" flexWrap="wrap" columnGap={2}>
{card.meta.map((m, k) => (
<Text key={`${card.key}:m${k}`} {...(m.color ? { color: m.color } : { dimColor: true })}>{m.text}</Text>
))}
</Box>
)}
</Box>
)
const more = (key: string, total: number) =>
total > CAP && (isExpanded(key)
? <Button key={`less:${key}`} label="Show fewer" dimColor onPress={() => collapse(key)} />
: <Button key={`more:${key}`} label={`Show all ${total}`} dimColor onPress={() => expand(key)} />)
const columnView = (col: Column, board: boolean) => {
const shown = isExpanded(col.key) ? col.cards : col.cards.slice(0, CAP)
return (
<Box key={`col:${col.key}`} flexDirection="column" flexGrow={1} flexShrink={1} {...(board ? { minWidth: 30, width: 34 } : {})}>
<Box flexDirection="row" gap={1}>
<Text color={col.color ?? 'gray'}>●</Text>
<Text bold>{col.label}</Text>
<Text dimColor>{col.cards.length}</Text>
</Box>
{col.cards.length === 0 && <Text dimColor italic>No tasks</Text>}
{shown.map(card => cardView(card, false))}
{more(col.key, col.cards.length)}
</Box>
)
}
const agendaRow = (item: AgendaItem, k: number, overdue: boolean) => {
const status = item.task.statusDef
const kind = item.kind === 'recurring' ? '↻' : item.kind === 'due' ? 'due' : 'sched'
return (
<Box key={`ag:${item.task.file.path}:${item.date}:${k}`} flexDirection="row" gap={1}>
{popup(item.task.file.path, { top: 1, left: 2 })}
<Text color={status?.color ?? 'gray'}>●</Text>
<Text {...(overdue ? { color: '#d62728' } : { dimColor: true })}>{overdue ? dayLabel(item.date, now) : kind}</Text>
<Box flexGrow={1} flexShrink={1}>
<Text wrap="wrap">{item.task.title}</Text>
</Box>
{item.task.priorityDef && item.task.priority !== 'none' && <Text color={item.task.priorityDef.color}>{item.task.priorityDef.label}</Text>}
<Button key={`open:${item.task.file.path}:${item.date}`} label="↗" plain dimColor onPress={() => open(item.task.file.path)} />
</Box>
)
}
// Pills: the projects and contexts of the whole view, most used first. A press toggles one;
// several in a row widen (any of them), the two rows narrow each other (both must hold).
const facetsOf = memo(`${drawn.key}|facets`, () => facets(all.tasks))
const PILLS = 10
const pillRow = (kind: 'project' | 'context', label: string, list: Facet[], selected: string[], prefix: string) => {
if (!list.length) return undefined
const chosen = selected.map(s => s.toLowerCase())
const field = kind === 'project' ? 'projects' : 'contexts'
const toggle = (name: string) =>
patch({ [field]: chosen.includes(name.toLowerCase()) ? selected.filter(s => s.toLowerCase() !== name.toLowerCase()) : [...selected, name] } as Partial<TasksTarget>)
// Selected pills always show, even beyond the cap.
const visible = t.allPills ? list : list.filter((f, i) => i < PILLS || chosen.includes(f.name.toLowerCase()))
return (
<Box key={`pills-${kind}`} flexDirection="row" flexWrap="wrap" gap={1} alignItems="center">
<Text dimColor>{label}</Text>
{visible.map(f => (
<Button
key={`pill-${kind}:${f.name}`}
label={`${prefix}${f.name} ${f.count}`}
{...(chosen.includes(f.name.toLowerCase()) ? { variant: 'primary' as const } : { dimColor: true })}Licence text (MIT)
MIT License Copyright (c) 2026 Carine Bruyndoncx 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 programsreads filestool callsremembers
What its code shows
Read from the source at commit 61ab49cdff99 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.9 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.its repository's .claude-plugin/marketplace.json does not list it: no marketplace line to give; the page shows how to try the commit read |
| 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:286 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 files, 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 $.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.no skills, commands, agents or workflows |
| 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 taskboard, adds tool open |
| 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 (taskboard), tool.call (mcp__tasknotes-preview_…) · also: session.start, ui.render (Pane) |
| 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.files: …….obsidian, 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.writes no files, environment variables, settings or conversation rows |
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.
Its repository's .claude-plugin/marketplace.json does not list it, so there is no marketplace line to give.
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/cbruyndoncx/claude-tasknotes-renderer-modgit -C claude-tasknotes-renderer-mod checkout 61ab49cdff991d31ebe9c9b4d731a135644d2fd1claude plugin validate claude-tasknotes-renderer-modclaude --plugin-dir claude-tasknotes-renderer-modThe 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 "cbruyndoncx-tasknotes-preview" with its code and make me one like itSearch them from Claude: the MCP connector
Similar mods
- xcode-modsArtem Novichkov★ 17
- agent-discoverkeshrath★ 7
- command-hubMichael Goldenberg★ 6
- fanyijax★ 5
- glanceflowAntreas-Strb★ 3
- mod-storehellosverre★ 2
More by BRNCX
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/cbruyndoncx-tasknotes-preview/)