[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7ECY2NEENYJ4WCHVCMR6Z7D":3,"skill-same:01M7ECY2NEENYJ4WCHVCMR6Z7D":49},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":20,"frontMatter":21,"refName":22,"commitSha":23,"skillDirectory":24,"forksCount":13,"repositoryHtmlUrl":25,"repositoryHomepageUrl":6,"ownerHtmlUrl":26,"ownerBlogUrl":6,"ownerDescription":27,"updatedAt":28,"install":29,"resources":42},"01M7ECY2NEENYJ4WCHVCMR6Z7D","json-canvas",null,"jonahthan433\u002FCortexOS","jonahthan433","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F211465495?v=4","01M7ECH9HPHGA89DCXHHJBTS3C","jonah.ai","01M7ECH9JCEM45DZMWPT7148S1",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fjonahthan433\u002FCortexOS\u002Fblob\u002Fmain\u002Fskills\u002Fimported\u002Fnote-taking\u002Fjson-canvas\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"# json-canvas\n\n# JSON Canvas Skill\n\n## File Structure\n\nA canvas file (`.canvas`) contains two top-level arrays following the [JSON Canvas Spec 1.0](https:\u002F\u002Fjsoncanvas.org\u002Fspec\u002F1.0\u002F):\n\n```json\n{\n  \"nodes\": [],\n  \"edges\": []\n}\n```\n\n- `nodes` (optional): Array of node objects\n- `edges` (optional): Array of edge objects connecting nodes\n\n## Common Workflows\n\n### 1. Create a New Canvas\n\n1. Create a `.canvas` file with the base structure `{\"nodes\": [], \"edges\": []}`\n2. Generate unique 16-character hex IDs for each node (e.g., `\"6f0ad84f44ce9c17\"`)\n3. Add nodes with required fields: `id`, `type`, `x`, `y`, `width`, `height`\n4. Add edges referencing valid node IDs via `fromNode` and `toNode`\n5. **Validate**: Parse the JSON to confirm it is valid. Verify all `fromNode`\u002F`toNode` values exist in the nodes array\n\n### 2. Add a Node to an Existing Canvas\n\n1. Read and parse the existing `.canvas` file\n2. Generate a unique ID that does not collide with existing node or edge IDs\n3. Choose position (`x`, `y`) that avoids overlapping existing nodes (leave 50-100px spacing)\n4. Append the new node object to the `nodes` array\n5. Optionally add edges connecting the new node to existing nodes\n6. **Validate**: Confirm all IDs are unique and all edge references resolve to existing nodes\n\n### 3. Connect Two Nodes\n\n1. Identify the source and target node IDs\n2. Generate a unique edge ID\n3. Set `fromNode` and `toNode` to the source and target IDs\n4. Optionally set `fromSide`\u002F`toSide` (top, right, bottom, left) for anchor points\n5. Optionally set `label` for descriptive text on the edge\n6. Append the edge to the `edges` array\n7. **Validate**: Confirm both `fromNode` and `toNode` reference existing node IDs\n\n### 4. Edit an Existing Canvas\n\n1. Read and parse the `.canvas` file as JSON\n2. Locate the target node or edge by `id`\n3. Modify the desired attributes (text, position, color, etc.)\n4. Write the updated JSON back to the file\n5. **Validate**: Re-check all ID uniqueness and edge reference integrity after editing\n\n## Nodes\n\nNodes are objects placed on the canvas. Array order determines z-index: first node = bottom layer, last node = top layer.\n\n### Generic Node Attributes\n\n| Attribute | Required | Type | Description |\n|-----------|----------|------|-------------|\n| `id` | Yes | string | Unique 16-char hex identifier |\n| `type` | Yes | string | `text`, `file`, `link`, or `group` |\n| `x` | Yes | integer | X position in pixels |\n| `y` | Yes | integer | Y position in pixels |\n| `width` | Yes | integer | Width in pixels |\n| `height` | Yes | integer | Height in pixels |\n| `color` | No | canvasColor | Preset `\"1\"`-`\"6\"` or hex (e.g., `\"#FF0000\"`) |\n\n### Text Nodes\n\n| Attribute | Required | Type | Description |\n|-----------|----------|------|-------------|\n| `text` | Yes | string | Plain text with Markdown syntax |\n\n```json\n{\n  \"id\": \"6f0ad84f44ce9c17\",\n  \"type\": \"text\",\n  \"x\": 0,\n  \"y\": 0,\n  \"width\": 400,\n  \"height\": 200,\n  \"text\": \"# Hello World\\n\\nThis is **Markdown** content.\"\n}\n```\n\n**Newline pitfall**: Use `\\n` for line breaks in JSON strings. Do **not** use the literal `\\\\n` -- Obsidian renders that as the characters `\\` and `n`.\n\n### File Nodes\n\n| Attribute | Required | Type | Description |\n|-----------|----------|------|-------------|\n| `file` | Yes | string | Path to file within the system |\n| `subpath` | No | string | Link to heading or block (starts with `#`) |\n\n```json\n{\n  \"id\": \"a1b2c3d4e5f67890\",\n  \"type\": \"file\",\n  \"x\": 500,\n  \"y\": 0,\n  \"width\": 400,\n  \"height\": 300,\n  \"file\": \"Attachments\u002Fdiagram.png\"\n}\n```\n\n### Link Nodes\n\n| Attribute | Required | Type | Description |\n|-----------|----------|------|-------------|\n| `url` | Yes | string | External URL |\n\n```json\n{\n  \"id\": \"c3d4e5f678901234\",\n  \"type\": \"link\",\n  \"x\": 1000,\n  \"y\": 0,\n  \"width\": 400,\n  \"height\": 200,\n  \"url\": \"https:\u002F\u002Fobsidian.md\"\n}\n```\n\n### Group Nodes\n\nGroups are visual containers for organizing other nodes. Position child nodes inside the group's bounds.\n\n| Attribute | Required | Type | Description |\n|-----------|----------|------|-------------|\n| `label` | No | string | Text label for the group |\n| `background` | No | string | Path to background image |\n| `backgroundStyle` | No | string | `cover`, `ratio`, or `repeat` |\n\n```json\n{\n  \"id\": \"d4e5f6789012345a\",\n  \"type\": \"group\",\n  \"x\": -50,\n  \"y\": -50,\n  \"width\": 1000,\n  \"height\": 600,\n  \"label\": \"Project Overview\",\n  \"color\": \"4\"\n}\n```\n\n## Edges\n\nEdges connect nodes via `fromNode` and `toNode` IDs.\n\n| Attribute | Required | Type | Default | Description |\n|-----------|----------|------|---------|-------------|\n| `id` | Yes | string | - | Unique identifier |\n| `fromNode` | Yes | string | - | Source node ID |\n| `fromSide` | No | string | - | `top`, `right`, `bottom`, or `left` |\n| `fromEnd` | No | string | `none` | `none` or `arrow` |\n| `toNode` | Yes | string | - | Target node ID |\n| `toSide` | No | string | - | `top`, `right`, `bottom`, or `left` |\n| `toEnd` | No | string | `arrow` | `none` or `arrow` |\n| `color` | No | canvasColor | - | Line color |\n| `label` | No | string | - | Text label |\n\n```json\n{\n  \"id\": \"0123456789abcdef\",\n  \"fromNode\": \"6f0ad84f44ce9c17\",\n  \"fromSide\": \"right\",\n  \"toNode\": \"a1b2c3d4e5f67890\",\n  \"toSide\": \"left\",\n  \"toEnd\": \"arrow\",\n  \"label\": \"leads to\"\n}\n```\n\n## Colors\n\nThe `canvasColor` type accepts either a hex string or a preset number:\n\n| Preset | Color |\n|--------|-------|\n| `\"1\"` | Red |\n| `\"2\"` | Orange |\n| `\"3\"` | Yellow |\n| `\"4\"` | Green |\n| `\"5\"` | Cyan |\n| `\"6\"` | Purple |\n\nPreset color values are intentionally undefined -- applications use their own brand colors.\n\n## ID Generation\n\nGenerate 16-character lowercase hexadecimal strings (64-bit random value):\n\n```\n\"6f0ad84f44ce9c17\"\n\"a3b2c1d0e9f8a7b6\"\n```\n\n## Layout Guidelines\n\n- Coordinates can be negative (canvas extends infinitely)\n- `x` increases right, `y` increases down; position is the top-left corner\n- Space nodes 50-100px apart; leave 20-50px padding inside groups\n- Align to grid (multiples of 10 or 20) for cleaner layouts\n\n| Node Type | Suggested Width | Suggested Height |\n|-----------|-----------------|------------------|\n| Small text | 200-300 | 80-150 |\n| Medium text | 300-450 | 150-300 |\n| Large text | 400-600 | 300-500 |\n| File preview | 300-500 | 200-400 |\n| Link preview | 250-400 | 100-200 |\n\n## Validation Checklist\n\nAfter creating or editing a canvas file, verify:\n\n1. All `id` values are unique across both nodes and edges\n2. Every `fromNode` and `toNode` references an existing node ID\n3. Required fields are present for each node type (`text` for text nodes, `file` for file nodes, `url` for link nodes)\n4. `type` is one of: `text`, `file`, `link`, `group`\n5. `fromSide`\u002F`toSide` values are one of: `top`, `right`, `bottom`, `left`\n6. `fromEnd`\u002F`toEnd` values are one of: `none`, `arrow`\n7. Color presets are `\"1\"` through `\"6\"` or valid hex (e.g., `\"#FF0000\"`)\n8. JSON is valid and parseable\n\nIf validation fails, check for duplicate IDs, dangling edge references, or malformed JSON strings (especially unescaped newlines in text content).\n\n## Complete Examples\n\nSee [references\u002FEXAMPLES.md](references\u002FEXAMPLES.md) for full canvas examples including mind maps, project boards, research canvases, and flowcharts.\n\n## References\n\n- [JSON Canvas Spec 1.0](https:\u002F\u002Fjsoncanvas.org\u002Fspec\u002F1.0\u002F)\n- [JSON Canvas GitHub](https:\u002F\u002Fgithub.com\u002Fobsidianmd\u002Fjsoncanvas)\n",{},"main","38b32c99e7ed0b8e215d638e92cfa452c1ec3079","skills\u002Fimported\u002Fnote-taking\u002Fjson-canvas","https:\u002F\u002Fgithub.com\u002Fjonahthan433\u002FCortexOS","https:\u002F\u002Fgithub.com\u002Fjonahthan433","AI Consultant","2026-10-24 05:13:39",{"source":7,"skillName":5,"commands":30,"prompt":40,"zipAvailable":41},[31,34,37],{"tool":32,"command":33},"npx","npx skills add jonahthan433\u002FCortexOS --skill json-canvas",{"tool":35,"command":36},"bunx","bunx skills add jonahthan433\u002FCortexOS --skill json-canvas",{"tool":38,"command":39},"pnpm","pnpm dlx skills add jonahthan433\u002FCortexOS --skill json-canvas","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjonahthan433\u002FCortexOS\u002Fblob\u002Fmain\u002Fskills\u002Fimported\u002Fnote-taking\u002Fjson-canvas\u002FSKILL.md",true,[43],{"path":44,"resourceType":45,"resourceTypeDesc":46,"sizeBytes":47,"sourceHtmlUrl":48},"skill.json","REFERENCE","参考文档",502,"https:\u002F\u002Fgithub.com\u002Fjonahthan433\u002FCortexOS\u002Fblob\u002Fmain\u002Fskills\u002Fimported\u002Fnote-taking\u002Fjson-canvas\u002Fskill.json",[50,56,62,68,74,80],{"skillNo":51,"name":52,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":53,"categories":54,"keywords":55,"publishedAt":18},"01M7EDQZDQX3Q8Y7GCQX6KN9V7","opportunity-brief","https:\u002F\u002Fgithub.com\u002Fjonahthan433\u002FCortexOS\u002Fblob\u002Fmain\u002Fskills\u002Fsales\u002Fopportunity-brief\u002FSKILL.md",[],[],{"skillNo":57,"name":58,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":18},"01M7EDQYA0V9Y99VKBREJJ3MRT","morning-intel","https:\u002F\u002Fgithub.com\u002Fjonahthan433\u002FCortexOS\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fmorning-intel\u002FSKILL.md",[],[],{"skillNo":63,"name":64,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":18},"01M7EDQVX1JVY0B6PDHKKGM19G","decision-brief","https:\u002F\u002Fgithub.com\u002Fjonahthan433\u002FCortexOS\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fdecision-brief\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":18},"01M7EDQV1GENZAC2SZSD8KZ3GM","weekly-review","https:\u002F\u002Fgithub.com\u002Fjonahthan433\u002FCortexOS\u002Fblob\u002Fmain\u002Fskills\u002Fproductivity\u002Fweekly-review\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":18},"01M7EDQT2KETJ1Y3CGVN9EKW2J","system-health","https:\u002F\u002Fgithub.com\u002Fjonahthan433\u002FCortexOS\u002Fblob\u002Fmain\u002Fskills\u002Fops\u002Fsystem-health\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":18},"01M7EDQQN2JK3XPWMS1M4T0F3K","backup-restore","https:\u002F\u002Fgithub.com\u002Fjonahthan433\u002FCortexOS\u002Fblob\u002Fmain\u002Fskills\u002Fops\u002Fbackup-restore\u002FSKILL.md",[],[]]