add-pane-tab
Skill10 starsChanged 20 days agoMITView on GitHub
Use when adding a tab to the paneline side pane, or changing which data a tab loads.
In this repository5 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .claude/CLAUDE.mdCLAUDE.md
- live-checkSkill
- visual-reviewSkill
- write-testSkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 1 is distinctive, and 10 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
10
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Read docs/architecture.md (Side pane) and docs/engine-limits.md first.
- Distinctive: line 10
Create a Backlog.md task for the tab (see AGENTS.md).
- Very specific: line 12
If the tab keeps new state, add its keys under PluginState.paneline in types/index.d.ts.
- Very specific: line 13
Write the body in hooks/<name>-draw.tsx:
- Very specific: line 16
Keep it a pure function of its view.
- Very specific: line 17
Follow docs/pane-style.md for headings, rows, spacing, colours and widths.
- Very specific: line 18
Write hooks/<name>-tab.tsx.
- Very specific: line 22
Add the tab to hooks/tabs.ts: one entry in TABS (its order is the order on screen) and one register<Name>Tab(on) call in registerTabs.
- Very specific: line 28
Write tests/<name>-pane.test.tsx with skill write-test.
- Very specific: line 29
Run npm run check and claude plugin validate ..
- Very specific: line 30
Update the tab list in README.md if it names the tabs, in .claude-plugin/plugin.json (description), and in docs/architecture.md.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Add a pane tab
Read docs/architecture.md (Side pane) and docs/engine-limits.md first. Use hooks/context-tab.tsx with hooks/context-draw.tsx, and hooks/mcp-tab.tsx with hooks/mcp-draw.tsx, as models.
- Create a Backlog.md task for the tab (see
AGENTS.md). - Find the data source before you plan. Search
.claude-plugin/types/claude-code/index.d.tsfor the noun you need. Do not guess$methods: for example there is no$.skill.list. The session usage breakdown carriesskillFrontmatter(seeContextSkill) and is fetched by the Context tab. - If the tab keeps new state, add its keys under
PluginState.panelineintypes/index.d.ts. Do not import anything there. The tab id is a plain string, so there is no tab type to extend. - Write the body in
hooks/<name>-draw.tsx:- Export a view type, for example
SkillsView, and a function<name>Tab(ui: Ui, view: <Name>View): RenderElement. - Take
Box,TextandButtonfromui. UsepaneRowand the helpers frompane-kit.tsx. Colours are theme keys frompalette.tsonly. - Keep it a pure function of its view. No
$, no reads. - Follow
docs/pane-style.mdfor headings, rows, spacing, colours and widths.
- Export a view type, for example
- Write
hooks/<name>-tab.tsx. It exports two things:<NAME>_TAB = { id: "<name>", label: "<Label>" }.register<Name>Tab(on: On). It registers aui.renderhook for{ component: "Pane", requestId: tabRequestId(<NAME>_TAB.id) }(frompane-tab.ts). The hook reads the data, calls<name>Tab($.ui.resolve(e), view)and returns the result. The shell has already sete.props.bodyColumns.- Declare the tab's own atoms in this file. The loader does not accept an atom or
$that comes from another file. Seedocs/engine-limits.md.
- Add the tab to
hooks/tabs.ts: one entry inTABS(its order is the order on screen) and oneregister<Name>Tab(on)call inregisterTabs. Do not touchsession-pane.tsxorregister.ts. Two lines are needed becauseoncannot go through a list. - Data:
- From events: write
hooks/<name>-track.tsthat exportstrack<Name>(on: On), declare its atoms there, and call it fromhooks/register.ts. - From
$.sessionor$.fs: fetch it in the tab's render hook. Pass$.session.usageas a closure, asbreakdown.tsdoes. - Work that must start when the tab opens: call
justEntered(<NAME>_TAB.id)fromshown-tab.tsin the render hook. UseisShownTabto skip work while the tab is hidden.
- From events: write
- A click that must change state: pass a callback in the view (
select: (x) => void update(...)) as the MCP tab does. Draw functions never callupdate. - Write
tests/<name>-pane.test.tsxwith skillwrite-test. Cover: the tab opens with its title, an empty state, one populated state, each button. - Run
npm run checkandclaude plugin validate .. Then use skilllive-checkand look at the tab in a real session at 60 and 120 columns. - Update the tab list in
README.mdif it names the tabs, in.claude-plugin/plugin.json(description), and indocs/architecture.md.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

