[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M793VAWM2Z2B0P37X2WQB9BR":3,"skill-same:01M793VAWM2Z2B0P37X2WQB9BR":56},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":33,"commitSha":34,"skillDirectory":35,"forksCount":36,"repositoryHtmlUrl":37,"repositoryHomepageUrl":6,"ownerHtmlUrl":38,"ownerBlogUrl":39,"ownerDescription":40,"updatedAt":41,"install":42,"resources":55},"01M793VAWM2Z2B0P37X2WQB9BR","onenote-hello-world",null,"Create your first OneNote notebook, section, and page with correct XHTML content.\nUse when starting a new OneNote integration or testing Graph API connectivity.\nTrigger with \"onenote hello world\", \"first onenote page\", \"create onenote notebook\".","jukeyman\u002Fjukeyman-skills","jukeyman","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F142960420?v=4","01M78FR4Y3DHMMCBCC0GXXNB3F","RICK JEFFERSON","01M78FR4Z8RVQRAD31Y5J7V6EB",1,"MIT","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsaas-packs--onenote-pack--onenote-hello-world\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: onenote-hello-world\ndescription: |\n  Create your first OneNote notebook, section, and page with correct XHTML content.\n  Use when starting a new OneNote integration or testing Graph API connectivity.\n  Trigger with \"onenote hello world\", \"first onenote page\", \"create onenote notebook\".\nallowed-tools: Read, Write, Edit, Bash(npm:*), Bash(pip:*), Grep\nversion: 1.0.0\nlicense: MIT\nauthor: Jeremy Longshore \u003Cjeremy@intentsolutions.io>\ntags: [saas, onenote, microsoft]\ncompatible-with: claude-code\n---\n\n# OneNote Hello World\n\n## Overview\n\nCreate your first OneNote notebook, section, and page through the Graph API. The critical pitfall this skill addresses: OneNote pages require strict XHTML (not regular HTML). Missing closing tags, unsupported attributes, or table features like `rowspan`\u002F`colspan` cause silent content corruption where the API returns 200 OK but the page renders incorrectly or with missing content.\n\nThis skill walks through the full creation chain — notebook, section, page — with correct XHTML, then reads back the content to demonstrate that output HTML differs from input HTML.\n\n## Prerequisites\n\n- Completed `onenote-install-auth` — you have a working `GraphServiceClient` (Python) or `Client` (TypeScript)\n- Azure AD app with `Notes.ReadWrite` permission scope\n- Node.js 18+ or Python 3.10+\n\n## Instructions\n\n### Step 1: Create a Notebook\n\n```typescript\n\u002F\u002F TypeScript — create a new notebook\nconst notebook = await client.api(\"\u002Fme\u002Fonenote\u002Fnotebooks\").post({\n  displayName: \"Dev Integration Test\"\n});\nconsole.log(`Notebook created: ${notebook.displayName} (${notebook.id})`);\n\u002F\u002F Save notebook.id — you need it for creating sections\n```\n\n```python\n# Python — create a new notebook\nfrom msgraph.generated.models.notebook import Notebook\n\nrequest_body = Notebook(display_name=\"Dev Integration Test\")\nnotebook = await client.me.onenote.notebooks.post(request_body)\nprint(f\"Notebook created: {notebook.display_name} ({notebook.id})\")\n```\n\n**Naming rules:** Notebook names must be unique per user. If a notebook with the same name exists, you get a 400 error with code `20117`. Use a timestamp suffix for test notebooks: `f\"Test-{datetime.now().isoformat()}\"`.\n\n### Step 2: Create a Section\n\n```typescript\n\u002F\u002F TypeScript — create a section inside the notebook\nconst section = await client\n  .api(`\u002Fme\u002Fonenote\u002Fnotebooks\u002F${notebook.id}\u002Fsections`)\n  .post({ displayName: \"Getting Started\" });\nconsole.log(`Section created: ${section.displayName} (${section.id})`);\n```\n\n```python\n# Python — create a section\nfrom msgraph.generated.models.onenote_section import OnenoteSection\n\nsection_body = OnenoteSection(display_name=\"Getting Started\")\nsection = await client.me.onenote.notebooks.by_notebook_id(\n    notebook.id\n).sections.post(section_body)\nprint(f\"Section created: {section.display_name} ({section.id})\")\n```\n\n### Step 3: Create a Page with Correct XHTML\n\nThis is where most integrations break. OneNote requires XHTML — every tag must close, the document must be UTF-8, and several HTML features are silently dropped.\n\n**VALID XHTML (this works):**\n```html\n\u003C!DOCTYPE html>\n\u003Chtml lang=\"en\" xmlns=\"http:\u002F\u002Fwww.w3.org\u002F1999\u002Fxhtml\">\n  \u003Chead>\n    \u003Ctitle>Sprint Planning — March 2026\u003C\u002Ftitle>\n    \u003Cmeta name=\"created\" content=\"2026-03-23T10:00:00-05:00\" \u002F>\n  \u003C\u002Fhead>\n  \u003Cbody>\n    \u003Ch1>Sprint Planning Notes\u003C\u002Fh1>\n    \u003Cp>Attendees: Alice, Bob, Charlie\u003C\u002Fp>\n\n    \u003Ch2>Action Items\u003C\u002Fh2>\n    \u003Cul>\n      \u003Cli data-tag=\"to-do\">Deploy feature X by Friday\u003C\u002Fli>\n      \u003Cli data-tag=\"to-do\">Review PR #488\u003C\u002Fli>\n      \u003Cli data-tag=\"to-do:completed\">Set up CI pipeline\u003C\u002Fli>\n    \u003C\u002Ful>\n\n    \u003Ch2>Decisions\u003C\u002Fh2>\n    \u003Cp>Approved migration to delegated auth. Deadline: \u003Cstrong>April 15\u003C\u002Fstrong>.\u003C\u002Fp>\n\n    \u003Ctable>\n      \u003Ctr>\n        \u003Ctd>Task\u003C\u002Ftd>\n        \u003Ctd>Owner\u003C\u002Ftd>\n        \u003Ctd>Status\u003C\u002Ftd>\n      \u003C\u002Ftr>\n      \u003Ctr>\n        \u003Ctd>Auth migration\u003C\u002Ftd>\n        \u003Ctd>Alice\u003C\u002Ftd>\n        \u003Ctd>In progress\u003C\u002Ftd>\n      \u003C\u002Ftr>\n    \u003C\u002Ftable>\n\n    \u003Cbr \u002F>\n    \u003Cp>\u003Cem>Next meeting: March 30, 2026\u003C\u002Fem>\u003C\u002Fp>\n  \u003C\u002Fbody>\n\u003C\u002Fhtml>\n```\n\n**INVALID HTML (common mistakes that cause silent failures):**\n```html\n\u003C!-- WRONG: unclosed tags — content after \u003Cbr> may be lost -->\n\u003Cp>Line one\u003Cbr>Line two\u003C\u002Fp>\n\n\u003C!-- CORRECT: self-closing tags -->\n\u003Cp>Line one\u003Cbr \u002F>Line two\u003C\u002Fp>\n\n\u003C!-- WRONG: rowspan\u002Fcolspan — silently dropped, table layout breaks -->\n\u003Ctd rowspan=\"2\">Merged cell\u003C\u002Ftd>\n\n\u003C!-- CORRECT: use separate rows, no merge attributes -->\n\u003Ctd>Row 1\u003C\u002Ftd>\n\n\u003C!-- WRONG: \u003Cimg> without self-close -->\n\u003Cimg src=\"https:\u002F\u002Fexample.com\u002Fchart.png\" alt=\"Chart\">\n\n\u003C!-- CORRECT: self-closing img -->\n\u003Cimg src=\"https:\u002F\u002Fexample.com\u002Fchart.png\" alt=\"Chart\" \u002F>\n\n\u003C!-- WRONG: style attributes with unsupported CSS — silently ignored -->\n\u003Cp style=\"display: flex; gap: 8px;\">Content\u003C\u002Fp>\n\n\u003C!-- CORRECT: only supported inline styles -->\n\u003Cp style=\"color: #333; font-size: 14pt;\">Content\u003C\u002Fp>\n```\n\n**Send the page:**\n```typescript\n\u002F\u002F TypeScript — create page with XHTML content\nconst xhtml = `\u003C!DOCTYPE html>\n\u003Chtml lang=\"en\" xmlns=\"http:\u002F\u002Fwww.w3.org\u002F1999\u002Fxhtml\">\n  \u003Chead>\u003Ctitle>Hello from Graph API\u003C\u002Ftitle>\u003C\u002Fhead>\n  \u003Cbody>\n    \u003Ch1>Hello World\u003C\u002Fh1>\n    \u003Cp>Created via Microsoft Graph API at ${new Date().toISOString()}\u003C\u002Fp>\n    \u003Cul>\n      \u003Cli data-tag=\"to-do\">First task\u003C\u002Fli>\n      \u003Cli data-tag=\"to-do\">Second task\u003C\u002Fli>\n    \u003C\u002Ful>\n  \u003C\u002Fbody>\n\u003C\u002Fhtml>`;\n\nconst page = await client\n  .api(`\u002Fme\u002Fonenote\u002Fsections\u002F${section.id}\u002Fpages`)\n  .header(\"Content-Type\", \"text\u002Fhtml\")\n  .post(xhtml);\n\nconsole.log(`Page created: ${page.title} (${page.id})`);\n```\n\n```python\n# Python — create page via raw HTTP (SDK page creation uses HTML body)\nimport httpx\n\nheaders = {\n    \"Authorization\": f\"Bearer {token}\",\n    \"Content-Type\": \"text\u002Fhtml\",\n}\nxhtml = \"\"\"\u003C!DOCTYPE html>\n\u003Chtml lang=\"en\" xmlns=\"http:\u002F\u002Fwww.w3.org\u002F1999\u002Fxhtml\">\n  \u003Chead>\u003Ctitle>Hello from Graph API\u003C\u002Ftitle>\u003C\u002Fhead>\n  \u003Cbody>\n    \u003Ch1>Hello World\u003C\u002Fh1>\n    \u003Cp>Created via Microsoft Graph API\u003C\u002Fp>\n    \u003Cul>\n      \u003Cli data-tag=\"to-do\">First task\u003C\u002Fli>\n    \u003C\u002Ful>\n  \u003C\u002Fbody>\n\u003C\u002Fhtml>\"\"\"\n\nresp = httpx.post(\n    f\"https:\u002F\u002Fgraph.microsoft.com\u002Fv1.0\u002Fme\u002Fonenote\u002Fsections\u002F{section.id}\u002Fpages\",\n    headers=headers,\n    content=xhtml,\n)\nresp.raise_for_status()\npage = resp.json()\nprint(f\"Page created: {page['title']} ({page['id']})\")\n```\n\n### Step 4: Read Back Page Content\n\nThe HTML you get back from `GET \u002Fpages\u002F{id}\u002Fcontent` is NOT the same as what you sent. Graph normalizes the HTML, adds `data-id` attributes, wraps content in `div` elements, and may reorder attributes.\n\n```typescript\n\u002F\u002F TypeScript — read page content back\n\u002F\u002F Note: small delay needed — page indexing is async\nawait new Promise((r) => setTimeout(r, 2000));\n\nconst content = await client\n  .api(`\u002Fme\u002Fonenote\u002Fpages\u002F${page.id}\u002Fcontent`)\n  .get();\n\n\u002F\u002F content is an HTML string — not the same as what you sent\n\u002F\u002F Graph adds: data-id attributes, absolute positioning, div wrappers\nconsole.log(\"Page HTML (first 500 chars):\", content.substring(0, 500));\n```\n\n```python\n# Python — read page content\nimport asyncio\nawait asyncio.sleep(2)  # Page indexing is async\n\nresp = httpx.get(\n    f\"https:\u002F\u002Fgraph.microsoft.com\u002Fv1.0\u002Fme\u002Fonenote\u002Fpages\u002F{page['id']}\u002Fcontent\",\n    headers={\"Authorization\": f\"Bearer {token}\"},\n)\nprint(\"Output HTML (first 500 chars):\", resp.text[:500])\n# Notice: output HTML has data-id attrs, absolute positions, normalized structure\n```\n\n### Valid data-tag Values for Checklists\n\n| data-tag value | Renders as |\n|---------------|------------|\n| `to-do` | Unchecked checkbox |\n| `to-do:completed` | Checked checkbox |\n| `important` | Star icon |\n| `question` | Question mark icon |\n| `critical` | Red exclamation |\n| `remember-for-later` | Bookmark icon |\n| `definition` | Definition marker |\n| `highlight` | Yellow highlight |\n\n## Output\n\nAfter completing these steps you will have:\n- A new OneNote notebook with a section and page\n- A page with correctly formatted XHTML content including checklists\n- Understanding of input vs output HTML differences\n- Knowledge of XHTML rules that prevent silent content corruption\n\n## Error Handling\n\n| Error | Code | Root Cause | Solution |\n|-------|------|------------|----------|\n| Duplicate notebook name | 400 (`20117`) | Notebook with same `displayName` exists | Append timestamp or check existence first |\n| Invalid HTML | 400 | Malformed XHTML — unclosed tags, bad encoding | Validate XHTML before sending; use XML parser |\n| Section not found | 404 | Notebook ID or section ID is wrong | Re-fetch notebook, verify ID matches |\n| Empty page content | 200 (empty body) | Page created but content >4MB | Check payload size before POST |\n| Missing title | 400 | `\u003Ctitle>` tag missing from `\u003Chead>` | Always include `\u003Chead>\u003Ctitle>...\u003C\u002Ftitle>\u003C\u002Fhead>` |\n| Content encoding error | 400 | Non-UTF-8 characters in HTML | Ensure UTF-8 encoding, strip BOM markers |\n\n## Examples\n\n**Minimal valid page (smallest possible):**\n```html\n\u003C!DOCTYPE html>\n\u003Chtml xmlns=\"http:\u002F\u002Fwww.w3.org\u002F1999\u002Fxhtml\">\n  \u003Chead>\u003Ctitle>Minimal Page\u003C\u002Ftitle>\u003C\u002Fhead>\n  \u003Cbody>\u003Cp>Content here\u003C\u002Fp>\u003C\u002Fbody>\n\u003C\u002Fhtml>\n```\n\n**Page with image from URL:**\n```html\n\u003C!DOCTYPE html>\n\u003Chtml xmlns=\"http:\u002F\u002Fwww.w3.org\u002F1999\u002Fxhtml\">\n  \u003Chead>\u003Ctitle>Page with Image\u003C\u002Ftitle>\u003C\u002Fhead>\n  \u003Cbody>\n    \u003Ch1>Architecture Diagram\u003C\u002Fh1>\n    \u003Cimg src=\"https:\u002F\u002Fexample.com\u002Fdiagram.png\" alt=\"System architecture\" \u002F>\n    \u003Cp>Figure 1: Current system architecture\u003C\u002Fp>\n  \u003C\u002Fbody>\n\u003C\u002Fhtml>\n```\n\n## Resources\n\n- [OneNote Create Pages](https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fgraph\u002Fonenote-create-page)\n- [Input\u002FOutput HTML Reference](https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fgraph\u002Fonenote-input-output-html)\n- [Note Tags Reference](https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fgraph\u002Fonenote-note-tags)\n- [Images and Files in OneNote](https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fgraph\u002Fonenote-images-files)\n- [Graph Explorer](https:\u002F\u002Fdeveloper.microsoft.com\u002Fen-us\u002Fgraph\u002Fgraph-explorer)\n- [OneNote API Overview](https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fgraph\u002Fapi\u002Fresources\u002Fonenote-api-overview)\n\n## Next Steps\n\n- Use `onenote-sdk-patterns` to add retry logic and rate limit handling\n- See `onenote-common-errors` when page creation returns unexpected errors\n- See `onenote-local-dev-loop` to set up mock responses for rapid iteration\n","# OneNote Hello World\n\n## Overview\n\nCreate your first OneNote notebook, section, and page through the Graph API. The critical pitfall this skill addresses: OneNote pages require strict XHTML (not regular HTML). Missing closing tags, unsupported attributes, or table features like `rowspan`\u002F`colspan` cause silent content corruption where the API returns 200 OK but the page renders incorrectly or with missing content.\n\nThis skill walks through the full creation chain — notebook, section, page — with correct XHTML, then reads back the content to demonstrate that output HTML differs from input HTML.\n\n## Prerequisites\n\n- Completed `onenote-install-auth` — you have a working `GraphServiceClient` (Python) or `Client` (TypeScript)\n- Azure AD app with `Notes.ReadWrite` permission scope\n- Node.js 18+ or Python 3.10+\n\n## Instructions\n\n### Step 1: Create a Notebook\n\n```typescript\n\u002F\u002F TypeScript — create a new notebook\nconst notebook = await client.api(\"\u002Fme\u002Fonenote\u002Fnotebooks\").post({\n  displayName: \"Dev Integration Test\"\n});\nconsole.log(`Notebook created: ${notebook.displayName} (${notebook.id})`);\n\u002F\u002F Save notebook.id — you need it for creating sections\n```\n\n```python\n# Python — create a new notebook\nfrom msgraph.generated.models.notebook import Notebook\n\nrequest_body = Notebook(display_name=\"Dev Integration Test\")\nnotebook = await client.me.onenote.notebooks.post(request_body)\nprint(f\"Notebook created: {notebook.display_name} ({notebook.id})\")\n```\n\n**Naming rules:** Notebook names must be unique per user. If a notebook with the same name exists, you get a 400 error with code `20117`. Use a timestamp suffix for test notebooks: `f\"Test-{datetime.now().isoformat()}\"`.\n\n### Step 2: Create a Section\n\n```typescript\n\u002F\u002F TypeScript — create a section inside the notebook\nconst section = await client\n  .api(`\u002Fme\u002Fonenote\u002Fnotebooks\u002F${notebook.id}\u002Fsections`)\n  .post({ displayName: \"Getting Started\" });\nconsole.log(`Section created: ${section.displayName} (${section.id})`);\n```\n\n```python\n# Python — create a section\nfrom msgraph.generated.models.onenote_section import OnenoteSection\n\nsection_body = OnenoteSection(display_name=\"Getting Started\")\nsection = await client.me.onenote.notebooks.by_notebook_id(\n    notebook.id\n).sections.post(section_body)\nprint(f\"Section created: {section.display_name} ({section.id})\")\n```\n\n### Step 3: Create a Page with Correct XHTML\n\nThis is where most integrations break. OneNote requires XHTML — every tag must close, the document must be UTF-8, and several HTML features are silently dropped.\n\n**VALID XHTML (this works):**\n```html\n\u003C!DOCTYPE html>\n\u003Chtml lang=\"en\" xmlns=\"http:\u002F\u002Fwww.w3.org\u002F1999\u002Fxhtml\">\n  \u003Chead>\n    \u003Ctitle>Sprint Planning — March 2026\u003C\u002Ftitle>\n    \u003Cmeta name=\"created\" content=\"2026-03-23T10:00:00-05:00\" \u002F>\n  \u003C\u002Fhead>\n  \u003Cbody>\n    \u003Ch1>Sprint Planning Notes\u003C\u002Fh1>\n    \u003Cp>Attendees: Alice, Bob, Charlie\u003C\u002Fp>\n\n    \u003Ch2>Action Items\u003C\u002Fh2>\n    \u003Cul>\n      \u003Cli data-tag=\"to-do\">Deploy feature X by Friday\u003C\u002Fli>\n      \u003Cli data-tag=\"to-do\">Review PR #488\u003C\u002Fli>\n      \u003Cli data-tag=\"to-do:completed\">Set up CI pipeline\u003C\u002Fli>\n    \u003C\u002Ful>\n\n    \u003Ch2>Decisions\u003C\u002Fh2>\n    \u003Cp>Approved migration to delegated auth. Deadline: \u003Cstrong>April 15\u003C\u002Fstrong>.\u003C\u002Fp>\n\n    \u003Ctable>\n      \u003Ctr>\n        \u003Ctd>Task\u003C\u002Ftd>\n        \u003Ctd>Owner\u003C\u002Ftd>\n        \u003Ctd>Status\u003C\u002Ftd>\n      \u003C\u002Ftr>\n      \u003Ctr>\n        \u003Ctd>Auth migration\u003C\u002Ftd>\n        \u003Ctd>Alice\u003C\u002Ftd>\n        \u003Ctd>In progress\u003C\u002Ftd>\n      \u003C\u002Ftr>\n    \u003C\u002Ftable>\n\n    \u003Cbr \u002F>\n    \u003Cp>\u003Cem>Next meeting: March 30, 2026\u003C\u002Fem>\u003C\u002Fp>\n  \u003C\u002Fbody>\n\u003C\u002Fhtml>\n```\n\n**INVALID HTML (common mistakes that cause silent failures):**\n```html\n\u003C!-- WRONG: unclosed tags — content after \u003Cbr> may be lost -->\n\u003Cp>Line one\u003Cbr>Line two\u003C\u002Fp>\n\n\u003C!-- CORRECT: self-closing tags -->\n\u003Cp>Line one\u003Cbr \u002F>Line two\u003C\u002Fp>\n\n\u003C!-- WRONG: rowspan\u002Fcolspan — silently dropped, table layout breaks -->\n\u003Ctd rowspan=\"2\">Merged cell\u003C\u002Ftd>\n\n\u003C!-- CORRECT: use separate rows, no merge attributes -->\n\u003Ctd>Row 1\u003C\u002Ftd>\n\n\u003C!-- WRONG: \u003Cimg> without self-close -->\n\u003Cimg src=\"https:\u002F\u002Fexample.com\u002Fchart.png\" alt=\"Chart\">\n\n\u003C!-- CORRECT: self-closing img -->\n\u003Cimg src=\"https:\u002F\u002Fexample.com\u002Fchart.png\" alt=\"Chart\" \u002F>\n\n\u003C!-- WRONG: style attributes with unsupported CSS — silently ignored -->\n\u003Cp style=\"display: flex; gap: 8px;\">Content\u003C\u002Fp>\n\n\u003C!-- CORRECT: only supported inline styles -->\n\u003Cp style=\"color: #333; font-size: 14pt;\">Content\u003C\u002Fp>\n```\n\n**Send the page:**\n```typescript\n\u002F\u002F TypeScript — create page with XHTML content\nconst xhtml = `\u003C!DOCTYPE html>\n\u003Chtml lang=\"en\" xmlns=\"http:\u002F\u002Fwww.w3.org\u002F1999\u002Fxhtml\">\n  \u003Chead>\u003Ctitle>Hello from Graph API\u003C\u002Ftitle>\u003C\u002Fhead>\n  \u003Cbody>\n    \u003Ch1>Hello World\u003C\u002Fh1>\n    \u003Cp>Created via Microsoft Graph API at ${new Date().toISOString()}\u003C\u002Fp>\n    \u003Cul>\n      \u003Cli data-tag=\"to-do\">First task\u003C\u002Fli>\n      \u003Cli data-tag=\"to-do\">Second task\u003C\u002Fli>\n    \u003C\u002Ful>\n  \u003C\u002Fbody>\n\u003C\u002Fhtml>`;\n\nconst page = await client\n  .api(`\u002Fme\u002Fonenote\u002Fsections\u002F${section.id}\u002Fpages`)\n  .header(\"Content-Type\", \"text\u002Fhtml\")\n  .post(xhtml);\n\nconsole.log(`Page created: ${page.title} (${page.id})`);\n```\n\n```python\n# Python — create page via raw HTTP (SDK page creation uses HTML body)\nimport httpx\n\nheaders = {\n    \"Authorization\": f\"Bearer {token}\",\n    \"Content-Type\": \"text\u002Fhtml\",\n}\nxhtml = \"\"\"\u003C!DOCTYPE html>\n\u003Chtml lang=\"en\" xmlns=\"http:\u002F\u002Fwww.w3.org\u002F1999\u002Fxhtml\">\n  \u003Chead>\u003Ctitle>Hello from Graph API\u003C\u002Ftitle>\u003C\u002Fhead>\n  \u003Cbody>\n    \u003Ch1>Hello World\u003C\u002Fh1>\n    \u003Cp>Created via Microsoft Graph API\u003C\u002Fp>\n    \u003Cul>\n      \u003Cli data-tag=\"to-do\">First task\u003C\u002Fli>\n    \u003C\u002Ful>\n  \u003C\u002Fbody>\n\u003C\u002Fhtml>\"\"\"\n\nresp = httpx.post(\n    f\"https:\u002F\u002Fgraph.microsoft.com\u002Fv1.0\u002Fme\u002Fonenote\u002Fsections\u002F{section.id}\u002Fpages\",\n    headers=headers,\n    content=xhtml,\n)\nresp.raise_for_status()\npage = resp.json()\nprint(f\"Page created: {page['title']} ({page['id']})\")\n```\n\n### Step 4: Read Back Page Content\n\nThe HTML you get back from `GET \u002Fpages\u002F{id}\u002Fcontent` is NOT the same as what you sent. Graph normalizes the HTML, adds `data-id` attributes, wraps content in `div` elements, and may reorder attributes.\n\n```typescript\n\u002F\u002F TypeScript — read page content back\n\u002F\u002F Note: small delay needed — page indexing is async\nawait new Promise((r) => setTimeout(r, 2000));\n\nconst content = await client\n  .api(`\u002Fme\u002Fonenote\u002Fpages\u002F${page.id}\u002Fcontent`)\n  .get();\n\n\u002F\u002F content is an HTML string — not the same as what you sent\n\u002F\u002F Graph adds: data-id attributes, absolute positioning, div wrappers\nconsole.log(\"Page HTML (first 500 chars):\", content.substring(0, 500));\n```\n\n```python\n# Python — read page content\nimport asyncio\nawait asyncio.sleep(2)  # Page indexing is async\n\nresp = httpx.get(\n    f\"https:\u002F\u002Fgraph.microsoft.com\u002Fv1.0\u002Fme\u002Fonenote\u002Fpages\u002F{page['id']}\u002Fcontent\",\n    headers={\"Authorization\": f\"Bearer {token}\"},\n)\nprint(\"Output HTML (first 500 chars):\", resp.text[:500])\n# Notice: output HTML has data-id attrs, absolute positions, normalized structure\n```\n\n### Valid data-tag Values for Checklists\n\n| data-tag value | Renders as |\n|---------------|------------|\n| `to-do` | Unchecked checkbox |\n| `to-do:completed` | Checked checkbox |\n| `important` | Star icon |\n| `question` | Question mark icon |\n| `critical` | Red exclamation |\n| `remember-for-later` | Bookmark icon |\n| `definition` | Definition marker |\n| `highlight` | Yellow highlight |\n\n## Output\n\nAfter completing these steps you will have:\n- A new OneNote notebook with a section and page\n- A page with correctly formatted XHTML content including checklists\n- Understanding of input vs output HTML differences\n- Knowledge of XHTML rules that prevent silent content corruption\n\n## Error Handling\n\n| Error | Code | Root Cause | Solution |\n|-------|------|------------|----------|\n| Duplicate notebook name | 400 (`20117`) | Notebook with same `displayName` exists | Append timestamp or check existence first |\n| Invalid HTML | 400 | Malformed XHTML — unclosed tags, bad encoding | Validate XHTML before sending; use XML parser |\n| Section not found | 404 | Notebook ID or section ID is wrong | Re-fetch notebook, verify ID matches |\n| Empty page content | 200 (empty body) | Page created but content >4MB | Check payload size before POST |\n| Missing title | 400 | `\u003Ctitle>` tag missing from `\u003Chead>` | Always include `\u003Chead>\u003Ctitle>...\u003C\u002Ftitle>\u003C\u002Fhead>` |\n| Content encoding error | 400 | Non-UTF-8 characters in HTML | Ensure UTF-8 encoding, strip BOM markers |\n\n## Examples\n\n**Minimal valid page (smallest possible):**\n```html\n\u003C!DOCTYPE html>\n\u003Chtml xmlns=\"http:\u002F\u002Fwww.w3.org\u002F1999\u002Fxhtml\">\n  \u003Chead>\u003Ctitle>Minimal Page\u003C\u002Ftitle>\u003C\u002Fhead>\n  \u003Cbody>\u003Cp>Content here\u003C\u002Fp>\u003C\u002Fbody>\n\u003C\u002Fhtml>\n```\n\n**Page with image from URL:**\n```html\n\u003C!DOCTYPE html>\n\u003Chtml xmlns=\"http:\u002F\u002Fwww.w3.org\u002F1999\u002Fxhtml\">\n  \u003Chead>\u003Ctitle>Page with Image\u003C\u002Ftitle>\u003C\u002Fhead>\n  \u003Cbody>\n    \u003Ch1>Architecture Diagram\u003C\u002Fh1>\n    \u003Cimg src=\"https:\u002F\u002Fexample.com\u002Fdiagram.png\" alt=\"System architecture\" \u002F>\n    \u003Cp>Figure 1: Current system architecture\u003C\u002Fp>\n  \u003C\u002Fbody>\n\u003C\u002Fhtml>\n```\n\n## Resources\n\n- [OneNote Create Pages](https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fgraph\u002Fonenote-create-page)\n- [Input\u002FOutput HTML Reference](https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fgraph\u002Fonenote-input-output-html)\n- [Note Tags Reference](https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fgraph\u002Fonenote-note-tags)\n- [Images and Files in OneNote](https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fgraph\u002Fonenote-images-files)\n- [Graph Explorer](https:\u002F\u002Fdeveloper.microsoft.com\u002Fen-us\u002Fgraph\u002Fgraph-explorer)\n- [OneNote API Overview](https:\u002F\u002Flearn.microsoft.com\u002Fen-us\u002Fgraph\u002Fapi\u002Fresources\u002Fonenote-api-overview)\n\n## Next Steps\n\n- Use `onenote-sdk-patterns` to add retry logic and rate limit handling\n- See `onenote-common-errors` when page creation returns unexpected errors\n- See `onenote-local-dev-loop` to set up mock responses for rapid iteration\n",{"name":5,"tags":24,"author":28,"license":15,"version":29,"description":30,"allowed-tools":31,"compatible-with":32},[25,26,27],"saas","onenote","microsoft","Jeremy Longshore \u003Cjeremy@intentsolutions.io>","1.0.0","Create your first OneNote notebook, section, and page with correct XHTML content.\nUse when starting a new OneNote integration or testing Graph API connectivity.\nTrigger with \"onenote hello world\", \"first onenote page\", \"create onenote notebook\".\n","Read, Write, Edit, Bash(npm:*), Bash(pip:*), Grep","claude-code","main","99825ad3f3bcc6597ddcc7294a14e6e922f2b67b","skills\u002Fsaas-packs--onenote-pack--onenote-hello-world",0,"https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills","https:\u002F\u002Fgithub.com\u002Fjukeyman","https:\u002F\u002FRJBUSINESSSOLUTIONS.ORG","Credit and Finance Expert | Developer\r\n\r\nI'm Rick Jefferson, a seasoned credit and finance expert with over a decade of experience in financial literacy,","2026-07-13 07:03:29",{"source":8,"skillName":5,"commands":43,"prompt":53,"zipAvailable":54},[44,47,50],{"tool":45,"command":46},"npx","npx skills add jukeyman\u002Fjukeyman-skills --skill onenote-hello-world",{"tool":48,"command":49},"bunx","bunx skills add jukeyman\u002Fjukeyman-skills --skill onenote-hello-world",{"tool":51,"command":52},"pnpm","pnpm dlx skills add jukeyman\u002Fjukeyman-skills --skill onenote-hello-world","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsaas-packs--onenote-pack--onenote-hello-world\u002FSKILL.md",true,[],[57,64,71,78,85,93],{"skillNo":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":19},"01M79ANS2SM329NEP5ZCX106RR","zustand-store-creator","Create zustand store creator operations. Auto-activating skill for Frontend Development.\nTriggers on: zustand store creator, zustand store creator\nPart of the Frontend Development skill category. Use when working with zustand store creator functionality. Trigger with phrases like \"zustand store creator\", \"zustand creator\", \"zustand\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzustand-store-creator\u002FSKILL.md",[],[],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":19},"01M79AMZKP4YDEZ7EHG1Y7PP74","zero-trust-config-helper","Configure with zero trust config helper operations. Auto-activating skill for Security Advanced.\nTriggers on: zero trust config helper, zero trust config helper\nPart of the Security Advanced skill category. Use when configuring systems or services. Trigger with phrases like \"zero trust config helper\", \"zero helper\", \"zero\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzero-trust-config-helper\u002FSKILL.md",[],[],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":19},"01M79AMJSBCEJQNBTYNAHYN5HM","zapier-integration-helper","Assist with zapier integration helper operations. Auto-activating skill for Business Automation.\nTriggers on: zapier integration helper, zapier integration helper\nPart of the Business Automation skill category. Use when working with APIs or building integrations. Trigger with phrases like \"zapier integration helper\", \"zapier helper\", \"zapier\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzapier-integration-helper\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":19},"01M79AHJZGVMARS13VFQYRR1MP","yaml-config-validator","Validate yaml config validator operations. Auto-activating skill for DevOps Basics.\nTriggers on: yaml config validator, yaml config validator\nPart of the DevOps Basics skill category. Use when configuring systems or services. Trigger with phrases like \"yaml config validator\", \"yaml validator\", \"yaml\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fyaml-config-validator\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":89,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":19},"01M79AHGDZRN0020RDQSQDPAM8","xvary-stock-research","Thesis-driven equity analysis from public SEC EDGAR and market data; \u002Fanalyze, \u002Fscore, \u002Fcompare workflows with bundled Python tools (Claude Code, Cursor, Codex).","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxvary-stock-research\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxvary-stock-research\u002FSKILL.md",[],[],{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":19},"01M79AHCYJ9FV9RMHQ24HDRN33","xss-vulnerability-scanner","Scan xss vulnerability scanner operations. Auto-activating skill for Security Fundamentals.\nTriggers on: xss vulnerability scanner, xss vulnerability scanner\nPart of the Security Fundamentals skill category. Use when working with xss vulnerability scanner functionality. Trigger with phrases like \"xss vulnerability scanner\", \"xss scanner\", \"xss\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxss-vulnerability-scanner\u002FSKILL.md",[],[]]