jsom-modern-compatibility

jsom-modern-compatibility is a skill for Claude Code, Codex from pnp/sharepoint-skills. It costs 141 tokens per session (4,055 once invoked), scanned A, original, MIT.

A code-writing guide for SharePoint's JavaScript Object Model (JSOM), the browser-side API for working with SharePoint data. It produces JavaScript that loads the needed libraries and works on classic, modern, and SharePoint 2013 pages.

In plain words
What is it for?
Use it to write or fix JSOM scripts for lists, libraries, and other SharePoint operations, including code pasted into a browser developer console.
Why use it?
Modern SharePoint pages may not load JSOM libraries automatically, while classic pages often do. This avoids scripts failing because their dependencies were not loaded first.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to write or fix JSOM scripts for lists, libraries, and other SharePoint operations, including code pasted into a browser developer console.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/pnp/sharepoint-skills/jsom-modern-compatibility
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add pnp/sharepoint-skills --skill jsom-modern-compatibility
Clone the repo
git clone --depth 1 https://github.com/pnp/sharepoint-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for jsom-modern-compatibility

README.md
[![agentmods](https://agentmods.dev/badge/skills/pnp/sharepoint-skills/jsom-modern-compatibility/github.svg)](https://agentmods.dev/skills/pnp/sharepoint-skills/jsom-modern-compatibility)
Your own site
<a href="https://agentmods.dev/skills/pnp/sharepoint-skills/jsom-modern-compatibility"><img src="https://agentmods.dev/badge/skills/pnp/sharepoint-skills/jsom-modern-compatibility/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for jsom-modern-compatibility

Your own site · 80×15
<a href="https://agentmods.dev/skills/pnp/sharepoint-skills/jsom-modern-compatibility"><img src="https://agentmods.dev/badge/skills/pnp/sharepoint-skills/jsom-modern-compatibility.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 141 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,055 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00141 $0.04055
Opus 5.5 $0.00056 $0.01622
Sonnet 5.5 $0.00028 $0.00811
Haiku 4.5 $0.00014 $0.00405

Measured 27d ago against content hash 5610970a6461, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

jsom-modern-compatibility scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 27d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Skills/jsom-modern-compatibility/jsom-modern-compatibility/SKILL.md · 465 lines

How it starts

The opening of the file, as written. The whole thing — 465 lines — stays where its author put it; the contents beside it link to each section on GitHub.

JSOM Modern Compatibility

Purpose

Generate ready-to-copy JavaScript that end users can paste directly into the browser developer console on SharePoint pages without manually handling JSOM dependency loading.

The generated script must work on:

  • classic SharePoint pages;
  • modern SharePoint pages;
  • SharePoint 2013 classic pages.

Core principle

Compatibility first.

Classic pages often already have JSOM available. Modern pages usually do not. The generated script must always ensure the required SharePoint JavaScript libraries are available before any requested business logic runs.

Documentation preference

Prefer official SharePoint documentation and Microsoft Learn guidance when shaping JSOM patterns, dependency handling, and API usage. Use Microsoft Learn as the primary reference source before relying on informal examples.

Preferred references:

When to use

Apply this skill to JSOM generation, troubleshooting, dependency loading, and SharePoint JSOM operations including lists/libraries, Search, Taxonomy, and User Profiles.

Output requirements

Every runnable answer must include:

  1. exactly one complete JavaScript code block;
  2. the compatibility loader plus the requested business logic;
  3. short run instructions outside the code block;
  4. the safety footer outside the code block.

Do not split one runnable script across multiple code blocks or place explanatory prose inside the code block.

Encoding and renderer-safe output

Runnable JavaScript must use raw JavaScript syntax and contain no HTML-encoded operators, quotes, comparison symbols, or arrow functions unless they came from the user's own content or instructions.

Read the full file on GitHub · 465 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 27d ago First seen · 465 lines · 141 tokens per session scan A 5610970a6461

Subscribe to this mod's changes

jsom-modern-compatibility is a skill published in the GitHub repository pnp/sharepoint-skills (171 stars, last pushed 2d ago), licensed MIT. It adds 141 tokens to every session and 4,055 once invoked, about $0.0006 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-04.

Related

jsom-modern-compatibility compared with skills from other repositories

jsom-modern-compatibility next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
jsom-modern-compatibilitypnp/sharepoint-skillsSkill1712d agoMITA141Claude Code, Codex
bf-to-agents-sdk-typescript-migrationmicrosoft/AgentsSkill1.1k6d agoMITA71Claude Code
octopus-architecturenyldn/claude-octopusSkill4.5ktodayMITA19Claude Code
web-servicesjame581/GodotPrompterSkill1.0kyesterdayMITA64Claude Code
bfl-apicalesthio/OpenMontageSkill84k15d agoAGPL-3.0A38Claude Code, Codex
api-doc-generatorJackyST0/awesome-agent-skillsSkill672yesterdayCC0-1.0A23Claude Code, Codex
aspiremanagedcode/dotnet-skillsSkill52717d agoMITA145Claude Code, Codex