sonarjs

sonarjs is a skill for Claude Code, Codex from managedcode/dotnet-skills. It costs 132 tokens per session (1,429 once invoked), scanned A, original, MIT.

A set of SonarJS-based checks for JavaScript and TypeScript frontend code in .NET repositories. It looks for bug risks, code smells, and code that is difficult to understand.

In plain words
What is it for?
Use it to inspect frontend source code, apply cognitive-complexity rules, and add deeper JavaScript or TypeScript checks to an existing ESLint, SonarQube, or SonarCloud setup.
Why use it?
A basic ESLint setup may miss maintainability problems or overly complex code. These checks can turn such findings into review or CI checks.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions AGENTS.md.

Good fit Use it to inspect frontend source code, apply cognitive-complexity rules, and add deeper JavaScript or TypeScript checks to an existing ESLint, SonarQube, or SonarCloud setup.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/managedcode/dotnet-skills/sonarjs
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 managedcode/dotnet-skills --skill sonarjs
Clone the repo
git clone --depth 1 https://github.com/managedcode/dotnet-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 sonarjs

README.md
[![agentmods](https://agentmods.dev/badge/skills/managedcode/dotnet-skills/sonarjs.svg)](https://agentmods.dev/skills/managedcode/dotnet-skills/sonarjs)
Your own site
<a href="https://agentmods.dev/skills/managedcode/dotnet-skills/sonarjs"><img src="https://agentmods.dev/badge/skills/managedcode/dotnet-skills/sonarjs.svg" alt="Measured on agentmods" height="20"></a>
Per session 132 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,429 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium MCP Rug Pull · line 67
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
How audits are shown
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.00132 $0.01429
Opus 5 $0.00066 $0.00714
Sonnet 5 $0.00026 $0.00286
Haiku 4.5 $0.00013 $0.00143

Measured 4d ago against content hash b0b7c4afe235, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

sonarjs 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 4d 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.

Origin

Copies of this mod

2 near-identical copies found in the catalogue:

catalog/Tools/SonarJS/skills/sonarjs/SKILL.md · 115 lines

How it starts

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

SonarJS Rules for Frontend Assets in .NET Repositories

Trigger On

  • the repo already uses SonarQube, SonarCloud, or eslint-plugin-sonarjs
  • the user asks for frontend code smells, cognitive complexity limits, or deeper bug-risk rules beyond base ESLint
  • maintainability and reliability findings on JS or TS code should become a review or CI gate

Do Not Use For

  • repos that want only a lightweight base lint setup with no extra smell or complexity rules
  • teams that reject SonarQube, SonarCloud, or source-available SonarJS-derived tooling as a default gate
  • cases where the problem is runtime page quality rather than source-level maintainability

Inputs

  • the nearest AGENTS.md
  • package.json
  • existing ESLint config
  • any SonarQube, SonarCloud, or scanner config already present in CI
flowchart LR
  A["Need Sonar-style checks in a .NET repo frontend"] --> B{"Local developer loop or existing server gate?"}
  B -->|Local| C["Install eslint-plugin-sonarjs"]
  C --> D["Run through the normal eslint command"]
  B -->|Existing SonarQube or SonarCloud gate| E["Keep full analysis in the existing scanner pipeline"]
  D --> F["Phase rules and fix code"]
  E --> F

Workflow

  1. Decide the execution path first:
    • local developer loop through eslint-plugin-sonarjs
    • server-side analysis through an already adopted SonarQube or SonarCloud pipeline
  2. For local work, treat SonarJS as an ESLint extension rather than a standalone CLI.
  3. Keep the first rollout narrow:
    • bug-prone rules
    • cognitive complexity
    • duplicated branching or suspicious control flow
  4. Add rules to the existing ESLint command instead of inventing a parallel local lint entrypoint.
  5. If the repo already has SonarQube or SonarCloud, align local rule expectations with the server gate instead of maintaining two conflicting policies.
  6. Fix code or phase rules deliberately; do not hide the first rollout behind broad disables.
  7. Document licensing or hosting caveats before making Sonar-based tooling the default quality gate.

Read the full file on GitHub · 115 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 4d ago First seen · 115 lines · 132 tokens per session scan A b0b7c4afe235

Subscribe to this mod's changes

sonarjs is a skill published in the GitHub repository managedcode/dotnet-skills (477 stars, last pushed 2d ago), licensed MIT. It adds 132 tokens to every session and 1,429 once invoked, about $0.0007 per session on Opus 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-09-03.

Related

Other skills, from other repositories

pr-review

Multi-dimensional review of a PR or feature branch in microsoft/win-dev-skills. Activate on "review my PR / changes / branch", "vet before pushing", "PR review", "is this ready to merge". Fans out parallel sub-agents over skill content, the skill-vs-tool boundary (solution hierarchy), tool correctness…

microsoft/win-dev-skills · 98 tokens

winui-design

Use when designing, reviewing, or fixing WinUI 3: sample and control discovery with winapp find-ui, layout planning, control choice, Fluent Design alignment, Light/Dark/High Contrast theming, typography, spacing, brushes, accessibility, and XAML data-binding design. Load before authoring new XAML, reviewing UI PRs…

microsoft/win-dev-skills · 119 tokens

winui-wpf-migration

Migrate WPF applications to WinUI 3 — namespace replacement (System.Windows → Microsoft.UI.Xaml), control mapping (DataGrid→ListView, WrapPanel→ItemsRepeater, TabControl→TabView), threading (Dispatcher→DispatcherQueue), imaging (System.Drawing→BitmapImage), MVVM conversion to CommunityToolkit.Mvvm, and…

microsoft/win-dev-skills · 100 tokens

winui-code-review

Code quality review for WinUI 3 apps — MVVM compliance, x:Bind correctness, accessibility, theming, security, and performance. Use before committing to catch issues that the compiler and UI tests won't find.

microsoft/win-dev-skills · 49 tokens

critique

Design lens critique covering visual hierarchy, clarity, and anti-slop patterns — produces a findings table, no code edits unless asked. Use when the user wants a design review, says "what's wrong with this UI", or needs a second opinion before a handoff or presentation. Invoke when the user asks for critique on their…

educlopez/ui-craft · 84 tokens

aksel-builder

Expert builder for Aksel, the Nav / @navikt design system — React components, design tokens, layout primitives, theming (light/dark), icons, CSS, the Tailwind preset, version migrations, Figma-to-code. Triggers — Aksel, "using/with aksel", Nav/Navikt, "designsystemet", "design system", @navikt/ds- (e.g.…

navikt/copilot · 181 tokens