Official agent skill

Eslint Rule Development

by SAP in SAP/open-ux-tools

Develop a new ESLint rule for @sap-ux/eslint-plugin-fiori-tools.

OfficialApache-2.0Auto-check passedDevelopment

Install Eslint Rule Development

skills CLI
$ npx skills add SAP/open-ux-tools --skill eslint-rule-development -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install SAP/open-ux-tools eslint-rule-development --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/SAP/open-ux-tools.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/eslint-rule-development .claude/skills/eslint-rule-development && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
eslint-rule-development
GitHub stars
158
Token cost
~3k tokens
SKILL.md length
1,114 words
Files
5 (incl. references)
Skills in repo
9
Repo updated
First seen
Licence
Apache-2.0

At a glance

Develop a new ESLint rule for @sap-ux/eslint-plugin-fiori-tools.

  • Adding any rule to the plugin
  • SKILL.md covers ⚡ Efficiency rules — read…, Step 1 — Identify the rule…, Steps 2–10: Implementation… and Quick Reference: Key Files, plus 1 more section
  • Calls pnpm, npx and bash
  • Implementing manifest.json/XML/CDS/flex-change validation

What it does

Eslint Rule Development is an agent skill from SAP/open-ux-tools, published by the product's own GitHub organization. Develop a new ESLint rule for @sap-ux/eslint-plugin-fiori-tools. Always use this skill when adding any rule to the plugin, implementing manifest.json/XML/CDS/flex-change validation, writing rule tests with project context, or creating rule documentation — even if the request sounds simple or the user doesn't mention 'ESLint' explicitly. Guides through the complete workflow: diagnostics constant, rule implementation, unit tests, docs, and registration.

Its SKILL.md is about 3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 5 other files, including reference files (for example `references/annotation.md`, `references/flex-change.md` and `references/js-ts-rule.md`). Compatibility notes: Requires the open-ux-tools monorepo at packages/eslint-plugin-fiori-tools. Assumes pnpm workspace with TypeScript 5+.

It sits in Development, covering Linting and formatting. It works with ESLint. The repository describes itself as: Enable community collaboration to jointly promote and facilitate best in class tooling capabilities. The licence is Apache-2.0.

When your agent uses it

  • Adding any rule to the plugin
  • Implementing manifest.json/XML/CDS/flex-change validation
  • Writing rule tests with project context
  • Creating rule documentation — even if the request sounds simple

Example prompts

  • “t mention”
  • “/eslint-rule-development”

Requirements

  • Node.js
  • Compatibility (from SKILL.md): Requires the open-ux-tools monorepo at packages/eslint-plugin-fiori-tools. Assumes pnpm workspace with TypeScript 5+.

What it can do on your machine

Read from SKILL.md and the folder at commit 849bc84. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • pnpm
    • npx
    • bash

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use pnpm and npx, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Requires the open-ux-tools monorepo at packages/eslint-plugin-fiori-tools. Assumes pnpm workspace with TypeScript 5+.

    From compatibility in the SKILL.md frontmatter.

Context cost

Eslint Rule Development loads about 3k tokens when it runs, and up to ~12k if it reads all its reference files. Until then it costs about 120 tokens; SKILL.md has 1,114 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~120
When it runs · the whole SKILL.md, loaded when a task matches
~3k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~12k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from SAP/open-ux-tools at commit 849bc84, republished under its Apache-2.0 licence (© SAP). 1,114 words, ~3,000 tokens.

Download SKILL.mdSave it as .claude/skills/eslint-rule-development/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
eslint-rule-development
description
Develop a new ESLint rule for @sap-ux/eslint-plugin-fiori-tools. Always use this skill when adding any rule to the plugin, implementing manifest.json/XML/CDS/flex-change validation, writing rule tests with project context, or creating rule documentation — even if the request sounds simple or the user doesn't mention 'ESLint' explicitly. Guides through the complete workflow: diagnostics constant, rule implementation, unit tests, docs, and registration.
compatibility
Requires the open-ux-tools monorepo at packages/eslint-plugin-fiori-tools. Assumes pnpm workspace with TypeScript 5+.
metadata.author
sap-fiori-tools
metadata.version
0.0.1

Fiori ESLint Rule Developer

Add a new ESLint rule to @sap-ux/eslint-plugin-fiori-tools following the established patterns in the monorepo.

⚡ Efficiency rules — read before doing anything

  1. Use the Read tool directly — never Bash cat or spawn Explore subagents for file reading
  2. Read everything in one parallel batch — each fast path lists the exact files; read them all at once in a single turn
  3. Run only the new test file during development — not the full package suite:
    bash
    NODE_OPTIONS="--experimental-vm-modules" npx jest --testPathPatterns="sap-[rule-name]" --no-coverage

Step 1 — Identify the rule type, then read the reference file

TypeUse whenReference file
Annotation ruleValidates UI.* OData annotations in .xml / .cds files. Also, covers rules where text, that is, a label, title, or description, can be an i18n bindingreferences/annotation.md
Manifest JSON ruleValidates manifest.json propertiesreferences/manifest-json.md
Flex change file ruleValidates webapp/changes/*.change (Applicable only to OData V2 flex change properties)references/flex-change.md
JavaScript / TypeScript ruleValidates JS/TS application source code (UI5 patterns, global variables, deprecated APIs)references/js-ts-rule.md

Infer from the request:

  • Rule name — sap-[kebab-case-name] pattern
  • OData version — V2 only, V4 only, or both
  • Page scope — which page types to check. Default: all page types (list report, object page, etc.) unless the spec explicitly restricts the scope. Do not limit to one page type based on the examples in the spec.
  • Auto-fix — yes/no
  • Severity — error or warn. Rules in recommended-for-s4hana MUST be warn.

OData version determines the linker file — always follow the stated version:

OData versionLinker fileManifest root
V2 onlysrc/project-context/linker/fe-v2.tssap.ui.generic.app.pages.*
V4 onlysrc/project-context/linker/fe-v4.tssap.ui5.routing.targets.*
Bothboth linker filesboth roots

Read the matching reference file immediately, then read all the files it lists in a single parallel batch. If the rule spans multiple types (e.g. annotations + manifest, or manifest + flex changes), read all matching reference files and combine their templates and access patterns.


Steps 2–10: Implementation Checklist

Step 2 — Add diagnostic constant (annotation, manifest JSON, and flex change rules only; skip for JS/TS rules)

In packages/eslint-plugin-fiori-tools/src/language/diagnostics.ts:

typescript
export const MY_RULE = 'sap-my-new-rule';

export interface MyRuleDiagnostic {
    type: typeof MY_RULE;
    // ... fields from the reference file's "Required diagnostic fields" table
}

// Add MyRuleDiagnostic to the Diagnostic union at the bottom
Step 3 — Implement the rule

Use the template from the reference file for your rule type.

Code quality requirements for every new or modified function:

  • JSDoc — add a JSDoc block (@param, @returns) to every new function. When modifying an existing function, update its JSDoc to reflect any signature or behaviour changes.
  • Cognitive complexity ≤ 15 — enforced by sonarjs/cognitive-complexity. If a function exceeds 15, extract branches or loops into well-named helper functions until the complexity falls within the limit. Do not inline complex logic in a single function to avoid this.
  • Backtick code indicators in messages — in rule warning messages, wrap all code-like values in backticks: property names, annotation names, property values, entity names, and any other identifier that appears verbatim in source. Plain prose words stay unquoted.
    typescript
    // ✅ Correct — code values in backticks
    message: "The `UI.LineItem` annotation is missing the required `Criticality` property."
Step 4 — Register the rule

src/rules/index.ts — add import + entry (alphabetical order):

typescript
import sapMyNewRule from './sap-my-new-rule.js';
// ...
[MY_RULE]: sapMyNewRule,

src/index.ts — add to fioriLanguageConfig rules (Fiori language rules) or baseFioriToolsRules (JS/TS rules):

typescript
'@sap-ux/fiori-tools/sap-my-new-rule': 'warn',

If the rule should also apply to S/4HANA projects, add it to the recommended-for-s4hana config in src/index.ts as well. Rules in this config must use 'warn' severity:

typescript
// In the recommended-for-s4hana config rules object:
'@sap-ux/fiori-tools/sap-my-new-rule': 'warn',
Step 5 — Write tests

Use the test template from the reference file; run only the new test file (see efficiency rules at the top).

Always check message, never messageId, in errors arrays. When a rule message contains interpolated data (e.g. {{tableType}}), checking only messageId would accept any value for that placeholder and miss regressions. Use the fully resolved string instead:

typescript
// ✅ Correct — verifies the interpolated value
errors: [
    {
        message:
            '"TreeTable" is not supported in the flexible column layout with a draft-enabled service.'
    }
]

// ❌ Wrong — does not verify the data interpolated into the message
errors: [{ messageId: 'sap-my-new-rule' }]

If tests show 0 errors when violations are expected, check the debug checklist at the bottom of the reference file.

Step 6 — Write documentation

Create packages/eslint-plugin-fiori-tools/docs/rules/sap-[rule-name].md. Read packages/eslint-plugin-fiori-tools/docs/rules/TEMPLATE.md for structure. Key sections:

  • H1 title — one sentence describing the rule, with the rule ID in parentheses
  • Intro paragraph — 2–3 sentences: what it detects, why it was introduced (motivation belongs here, not in a separate H2), and what to do instead
  • ## Rule Details — how the rule works; warning message; "The following patterns are considered warnings:" + "The following patterns are not considered warnings" code examples
  • ### How to Fix — steps to remediate (omit if obvious from the examples)
  • ## False Positives — optional; include only if the rule can produce false positives
  • ## Bug Report — link to GitHub issues
  • ## Further Reading — optional; only include if you have a real, verifiable URL
Show full SKILL.md (429 more words)Show less
Step 7 — Update README

In packages/eslint-plugin-fiori-tools/README.md, do two things:

  1. Add your new rule at the top of the rules table with new in the version column:

    markdown
    |  new  | [sap-my-new-rule](docs/rules/sap-my-new-rule.md) | Short description | | ✅ |
  2. Backfill any pending new versions: if any rows still show new from prior rule additions that have since been released, look up each rule's release version in packages/eslint-plugin-fiori-tools/CHANGELOG.md and replace new with that version. After this cleanup, your newly added rule should be the only row showing new.

Step 8 — Run full quality gates (once)

Run lint:fix to auto-fix ESLint errors and apply Prettier formatting across all modified files, then verify no issues remain:

bash
# Fix lint errors and apply Prettier formatting
pnpm --filter @sap-ux/eslint-plugin-fiori-tools lint:fix

# Verify no remaining issues
pnpm --filter @sap-ux/eslint-plugin-fiori-tools lint

If lint reports errors after lint:fix:

  • sonarjs/cognitive-complexity — resolve per the cognitive complexity guidance in Step 3.
  • prettier/prettier — a formatting issue could not be auto-fixed. Apply the suggested change manually (usually a line that is too long or a multiline expression that needs restructuring).
  • @typescript-eslint/no-unsafe-* — replace any casts or untyped values with proper interfaces or unknown + type guards.

Do not proceed to Step 9 until pnpm lint exits with code 0.

Then confirm all tests still pass:

bash
pnpm --filter @sap-ux/eslint-plugin-fiori-tools test
Step 9 — Create changeset
bash
pnpm cset

Select @sap-ux/eslint-plugin-fiori-tools, choose minor for new rules:

FEAT: add sap-my-new-rule rule for [short description]
Step 10 — Report

Summarize what was done:

  • Rule name and type — rule ID and which type (annotation / manifest JSON / flex change / JS/TS)
  • Files created — rule implementation, test file, doc file
  • Files modified — diagnostics.ts, rules/index.ts, src/index.ts, README.md
  • Test results — number of valid and invalid cases, all passing
  • Changeset — package, bump type (minor), summary line

Quick Reference: Key Files

PurposePath
Rule implementationpackages/eslint-plugin-fiori-tools/src/rules/sap-[name].ts
Rule registrypackages/eslint-plugin-fiori-tools/src/rules/index.ts
Plugin config & exportspackages/eslint-plugin-fiori-tools/src/index.ts
Diagnostic constantspackages/eslint-plugin-fiori-tools/src/language/diagnostics.ts
Annotation helper utilitiespackages/eslint-plugin-fiori-tools/src/project-context/linker/annotations.ts
i18n helper utilities (extractI18nKey, getAttrOrChildText, collectSectionLabelKeys, for example)packages/eslint-plugin-fiori-tools/src/project-context/linker/i18n.ts
Annotation index key formatpackages/eslint-plugin-fiori-tools/src/project-context/parser/service.ts (lines 50-57)
Linker typespackages/eslint-plugin-fiori-tools/src/project-context/linker/types.ts
V2 linkerpackages/eslint-plugin-fiori-tools/src/project-context/linker/fe-v2.ts
V4 linkerpackages/eslint-plugin-fiori-tools/src/project-context/linker/fe-v4.ts
Rule factorypackages/eslint-plugin-fiori-tools/src/language/rule-factory.ts
Rule fixerpackages/eslint-plugin-fiori-tools/src/language/rule-fixer.ts
Test helperpackages/eslint-plugin-fiori-tools/test/test-helper.ts
Rule docs templatepackages/eslint-plugin-fiori-tools/docs/rules/TEMPLATE.md
README rules tablepackages/eslint-plugin-fiori-tools/README.md

check() context access by rule type

Rule typeUse in check()Why
AnnotationlinkedModel.apps for page iteration; index.apps[appKey] for getIndexedServiceForMainServiceOnly check annotations referenced from pages — never scan all entity annotations. pageNames must list only pages that reference the specific annotation. See annotation.md for access patterns and the page-annotation-map template. When text can be an i18n binding, use the two-pass design in annotation.md#when-the-text-field-can-be-an-i18n-binding.
Manifest JSONlinkedModel.apps for page iteration; index.apps[appKey] for parsedApp (manifest URI, manifestObject)Requires linked pages to find manifest config paths
Flex changecontext.sourceCode.projectContext.linkedModel.appsGuard on FioriChangeSourceCode first; linked model provides change file config via page.lookup['table']
JavaScript / TypeScriptStandard ESLint context — no projectContextJS/TS rules don't use the Fiori project model; use Rule.RuleModule, not createFioriRule

© SAP, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 4 other files (references) in .agents/skills/eslint-rule-development of SAP/open-ux-tools.

  • SKILL.md
  • references/annotation.md
  • references/flex-change.md
  • references/js-ts-rule.md
  • references/manifest-json.md

Open the folder on GitHubat commit 849bc84

Compare with similar skills

Eslint Rule Development next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Eslint Rule Development compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Eslint Rule Development this skillSAP/open-ux-tools158—~3kAutomated safety check: PassApache-2.0
Implementing Lint Rulesflint-fyi/flint312—~857Automated safety check: PassMIT
Static Code Analysis Typescriptjaktestowac/awesome-copilot-for-testers116—~4.2kAutomated safety check: PassMIT
Npx CLIjwynia/agent-skills166—~2.4kAutomated safety check: PassNone
Javascript ToolingHoangNguyen0403/agent-skills-standard571—~446Automated safety check: PassMIT
Typescript ToolingHoangNguyen0403/agent-skills-standard571—~688Automated safety check: PassMIT

Similar skills

  • Implements ESLint-style lint rules with proper AST handling, targeted reporting, and comprehensive unit tests.

    312 GitHub stars~857 tokensUpdated today
    DevelopmentAuto-check passed
  • Static Code Analysis Typescript

    jaktestowac/awesome-copilot-for-testers

    Creates, reviews, and modernizes static code analysis setups for Node.js and TypeScript repositories, covering ESLint flat config, typescript-eslint, tsconfig, Prettier, import sorting, Husky…

    116 GitHub stars~4.2k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Npx CLI

    jwynia/agent-skills

    Build and publish npx-executable CLI tools using Bun as the primary toolchain with npm-compatible output.

    166 GitHub stars~2.4k tokensUpdated 7 mo ago
    DevelopmentAuto-check passed
  • Javascript Tooling

    HoangNguyen0403/agent-skills-standard

    Configure development tools, linting, formatting, and test runners for existing JavaScript projects.

    571 GitHub stars~446 tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Typescript Tooling

    HoangNguyen0403/agent-skills-standard

    Development tools, linting, and build config for TypeScript.

    571 GitHub stars~688 tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Maintains LobeHub's model-backed alint rule set: writing rules, removing false positives against real code, deciding warn versus error and tracking token cost.

    83k GitHub stars~1.9k tokensUpdated today
    DevelopmentAuto-check passed

More from SAP/open-ux-tools

All 9 skills in this repo
  • Official

    A skill your agent uses when writing, fixing, extending, or reviewing OPA5 integration tests for SAP Fiori Elements applications - whether the app uses OData V4 (sap.fe.test library) or OData V2…

    158 GitHub stars~3.6k tokensUpdated today
    Auto-check passed
  • Odata Vocabularies Sync

    SAP/open-ux-tools

    Official

    Sync odata-vocabularies package — update all vocabulary resource files to their latest published versions, and optionally add a new vocabulary given its JSON URL.

    158 GitHub stars~1.5k tokensUpdated today
    Auto-check passed
  • Official

    Add visual filters (chart-based) to SAP Fiori Elements filter bar or value help using CAP or ABAP RAP.

    158 GitHub stars~3k tokensUpdated today
    Auto-check passed
  • Official

    Add analytical chart (chart + table hybrid) to SAP Fiori Elements List Report using aggregated data.

    158 GitHub stars~3.5k tokensUpdated today
    Auto-check passed
  • Sap Fiori App Development

    SAP/open-ux-tools

    Official

    Guidelines for SAP Fiori app development for CAP and standalone projects.

    158 GitHub stars~1.7k tokensUpdated today
    Auto-check passed
  • Sap Fiori Eslint Plugin

    SAP/open-ux-tools

    Official

    Configure, migrate, or run ESLint with @sap-ux/eslint-plugin-fiori-tools in SAP Fiori projects (standalone or CAP).

    158 GitHub stars~640 tokensUpdated today
    Auto-check passed

Works with

Questions about Eslint Rule Development

What does Eslint Rule Development do?

Develop a new ESLint rule for @sap-ux/eslint-plugin-fiori-tools. Eslint Rule Development is an agent skill from SAP/open-ux-tools, published by the product's own GitHub organization. Develop a new ESLint rule for @sap-ux/eslint-plugin-fiori-tools.

When should I use Eslint Rule Development?

Eslint Rule Development fits situations like: adding any rule to the plugin; implementing manifest.json/XML/CDS/flex-change validation; writing rule tests with project context; creating rule documentation — even if the request sounds simple.

How do I install Eslint Rule Development in Claude Code?

Run `npx skills add SAP/open-ux-tools --skill eslint-rule-development -a claude-code`. Or copy the skill folder (.agents/skills/eslint-rule-development in SAP/open-ux-tools) into .claude/skills/eslint-rule-development in your project. Claude Code loads it when a task matches its description.

How do I install Eslint Rule Development in Codex?

Run `npx skills add SAP/open-ux-tools --skill eslint-rule-development -a codex`. Or copy the skill folder (.agents/skills/eslint-rule-development in SAP/open-ux-tools) into .agents/skills/eslint-rule-development in your project. Codex loads it when a task matches its description.

Can I use Eslint Rule Development in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add SAP/open-ux-tools --skill eslint-rule-development -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/eslint-rule-development, .gemini/skills/eslint-rule-development, .github/skills/eslint-rule-development and .opencode/skills/eslint-rule-development in your project.

What does Eslint Rule Development need to run?

Going by SKILL.md and its folder, Eslint Rule Development needs the command-line tools its instructions call (pnpm, npx and bash). Our summary lists: Node.js. Compatibility (from SKILL.md): Requires the open-ux-tools monorepo at packages/eslint-plugin-fiori-tools. Assumes pnpm workspace with TypeScript 5+..

Does Eslint Rule Development access the network?

SKILL.md contains no URLs. Its commands use npx, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Eslint Rule Development safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Eslint Rule Development use?

Eslint Rule Development is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Eslint Rule Development use?

About 3k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 9k tokens, read only when the agent opens those files.

What are the alternatives to Eslint Rule Development?

Skills that share tags, products or a category with Eslint Rule Development: Implementing Lint Rules (flint-fyi/flint, 312 stars), Static Code Analysis Typescript (jaktestowac/awesome-copilot-for-testers, 116 stars), Npx CLI (jwynia/agent-skills, 166 stars) and Javascript Tooling (HoangNguyen0403/agent-skills-standard, 571 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Eslint Rule Development?

SAP (a GitHub organization, an official publisher) maintains it in SAP/open-ux-tools, which has 158 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on October 7, 2026.

Source: SAP/open-ux-tools on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.