sub-ipc
Skill9 starsChanged 8 months agoMITView on GitHub
Regenerate the IPC channel reference documentation from ipcChannels.ts type maps.
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 0 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 21
Read src/shared/ipcChannels.ts completely.
- Very specific: line 31
If it appears in IPCHandleMap → handle
- Very specific: line 34
If it appears in both IPCSendMap and IPCEventMap → send + event (bidirectional)
- Very specific: line 35
If it appears in NONE of the maps → ⚠ (untyped/legacy)
- Very specific: line 39
Write .subframe/docs-internal/refs/ipc-channels.md with this structure:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
SubFrame IPC Reference Regeneration
Regenerate .subframe/docs-internal/refs/ipc-channels.md from the source of truth: src/shared/ipcChannels.ts.
Dynamic Context
Current channel count:
!node -e "const src=require('fs').readFileSync('src/shared/ipcChannels.ts','utf8'); const m=src.match(/^\s+\w+:\s*'/gm); console.log(m ? m.length + ' channels in IPC constant' : 'Could not count')"
Instructions
Step 1: Read Source
Read src/shared/ipcChannels.ts completely. Extract:
- IPC constant — all channel name constants, grouped by their comment headers (e.g.,
// Terminal,// Workspace) - IPCHandleMap — channels using the
handlepattern (request/response) - IPCSendMap — channels using the
sendpattern (fire-and-forget) - IPCEventMap — channels using the
eventpattern (main→renderer push)
Step 2: Classify Each Channel
For every channel in the IPC constant, determine its pattern:
- If it appears in
IPCHandleMap→handle - If it appears in
IPCSendMap→send - If it appears in
IPCEventMap→event - If it appears in both
IPCSendMapandIPCEventMap→send + event(bidirectional) - If it appears in NONE of the maps →
⚠(untyped/legacy)
Step 3: Write Reference Doc
Write .subframe/docs-internal/refs/ipc-channels.md with this structure:
# IPC Channel Reference
**Source of truth:** `src/shared/ipcChannels.ts`
All channels are typed. Three communication patterns are used:
| Pattern | Direction | Usage |
|---------|-----------|-------|
| `ipcMain.handle` / `ipcRenderer.invoke` | Renderer → Main (request/response) | Data fetching, mutations |
| `ipcRenderer.send` / `ipcMain.on` | Renderer → Main (fire-and-forget) | Commands, notifications |
| `webContents.send` / `ipcRenderer.on` | Main → Renderer (push events) | Data updates, state changes |
Channels marked ⚠ are defined in the `IPC` constant but not yet in `IPCHandleMap`, `IPCSendMap`, or `IPCEventMap` type maps.
---
## Channels by Domain
### {Domain} ({N} channels)
| Channel | Pattern | Purpose |
|---------|---------|---------|
| `CHANNEL_NAME` | pattern | Brief purpose |
...
---
**Total: {N} channels** ({H} handle, {S} send, {E} event, {U} untyped/legacy)
*Regenerated from `ipcChannels.ts` — keep this reference in sync when adding/removing channels.*Rules
- Group channels by the
//comment headers in the IPC constant - Purpose descriptions should be concise (3-8 words)
- Count channels that appear in multiple maps only once for the total
- Flag channels not in any type map with ⚠
- Include a note for legacy channels that have been superseded by handle patterns
Step 4: Verify
Count the total channels and verify it matches the number of entries in the IPC constant.
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.

