Agent skill

Lens Extension Dependency Sync

by nevalla in nevalla/lens-resource-map-extension

Aligns a Lens extension's package.json ranges with the dependency versions bundled in the running Lens build, then reinstalls and rebuilds.

MITAuto-check passedDevelopment

Install Lens Extension Dependency Sync

skills CLI
$ npx skills add nevalla/lens-resource-map-extension --skill lens-extension-development-sync-dependencies -a claude-code

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

GitHub CLI
$ gh skill install nevalla/lens-resource-map-extension lens-extension-development-sync-dependencies --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/nevalla/lens-resource-map-extension.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/lens-extension-development-sync-dependencies .claude/skills/lens-extension-development-sync-dependencies && 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
lens-extension-development-sync-dependencies
GitHub stars
404
Token cost
~709 tokens
SKILL.md length
388 words
Files
1
Skills in repo
4
Repo updated
First seen
Licence
MIT

At a glance

Aligns a Lens extension's package.json ranges with the dependency versions bundled in the running Lens build, then reinstalls and rebuilds.

  • Works in 5 steps: Read… → Read the extension's package.json. Walk… → If nothing changed, say so and stop. No… → …
  • After upgrading Lens, when the extension no longer loads
  • SKILL.md covers Background and Procedure
  • Calls npm

What it does

Lens serves packages such as `react`, `mobx` and the `@k8slens` and `@lensapp` scopes to extensions from its own bundle and refuses to load an extension whose declared range does not match. The agent reads the Lens-generated instructions file under `~/.k8slens/extensions`, finds the section listing exact bundled versions, and stops without guessing if that section is missing.

It then walks `dependencies`, `devDependencies` and `peerDependencies` in the extension's `package.json` and rewrites each listed package to a caret range of the bundled version, leaving other entries alone, adding nothing, and preserving key order, 2-space indentation and the final newline. If nothing changed it says so and stops. Otherwise it runs `npm install` and `npm run build` and reports a table of old and new ranges, which host packages were already in sync and which declared packages were deliberately left alone, quoting any failure verbatim.

When your agent uses it

  • After upgrading Lens, when the extension no longer loads
  • When Lens reports that a declared range is not compatible with its bundled version
  • Before rebuilding the extension against the Lens version you are developing on

Example prompts

  • “Lens says the declared range for react is not compatible, sync my extension's dependencies.”
  • “I upgraded Lens, align package.json with the bundled versions and rebuild.”
  • “Show which packages in package.json are host-provided and already in sync with Lens.”

Requirements

  • A Lens extension project with `package.json`
  • A Lens build that writes the dependency versions section
  • npm

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Read ~/.k8slens/extensions/extension-development-instructions/README.md and find the section headed ## Dependency versions in this Lens…
  2. Read the extension's package.json. Walk dependencies, devDependencies and peerDependencies. Lens checks only dependencies and…
  3. If nothing changed, say so and stop. No install or build is needed.
  4. Otherwise run npm install in the extension directory, then npm run build.
  5. Report as a table: each package whose range changed, with the old and new range. Then one line listing the host-provided packages that…

What it can do on your machine

Read from SKILL.md and the folder at commit dde5980. 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:

    • npm

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

  • Network

    No URLs in SKILL.md. Its commands use npm, 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.

Context cost

Lens Extension Dependency Sync loads about 709 tokens when it runs. Until then it costs about 72 tokens; SKILL.md has 388 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~72
When it runs · the whole SKILL.md, loaded when a task matches
~709

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 nevalla/lens-resource-map-extension at commit dde5980, republished under its MIT licence (© nevalla). 388 words, ~709 tokens.

Download SKILL.mdSave it as .claude/skills/lens-extension-development-sync-dependencies/SKILL.md (or your agent's skills folder).
name
lens-extension-development-sync-dependencies
description
Align this extension's package.json dependency ranges with the versions bundled in the Lens build it runs in, then reinstall and rebuild. Use after a Lens upgrade, or when Lens reports "Declared range for ... is not compatible with Lens's ...".
user_invocable
true

Syncing dependency versions with the Lens build

Your job: make every host-provided dependency this extension declares compatible with the Lens build it is developed against, using the versions Lens itself publishes, then reinstall and rebuild so the change lands in dist/index.js.

Background

Lens serves react, mobx, @k8slens/*, @lensapp/* and a few other packages to extensions from its own bundle. Before loading an extension, Lens checks each range the extension declares for such a package against the bundled version and refuses to load the extension when the range does not match. The versions come from the Lens build, so they change whenever Lens is upgraded.

Procedure

  1. Read ~/.k8slens/extensions/extension-development-instructions/README.md and find the section headed ## Dependency versions in this Lens build. Its fenced JSON block maps each package name to the exact version this Lens build bundles. Lens regenerates the file on every app load, so it always describes the running Lens. If the section is missing, stop and tell the user their Lens build predates it. Do not guess versions.

  2. Read the extension's package.json. Walk dependencies, devDependencies and peerDependencies. Lens checks only dependencies and peerDependencies before loading, but devDependencies are synced too so the extension builds and type-checks against the versions it runs on. For every entry whose name appears in the JSON block, set its range to ^<version> using the version from the block. Leave every other entry exactly as it is: packages the block does not list are the extension's own, resolved from its node_modules, and Lens does not check them. Never add entries; the extension declares what it uses. Preserve key order, 2-space indentation and the trailing newline when writing the file back.

  3. If nothing changed, say so and stop. No install or build is needed.

  4. Otherwise run npm install in the extension directory, then npm run build.

  5. Report as a table: each package whose range changed, with the old and new range. Then one line listing the host-provided packages that were already in sync, and one line listing the declared packages the host does not provide, so the user knows those were deliberately left alone. If npm install or npm run build failed, quote the error verbatim.

Show full SKILL.md (24 more words)Show less

Always write the caret range. If the user wants a deliberately wider range for some package, they can say so and revert that row.

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

Files

Just SKILL.md in .claude/skills/lens-extension-development-sync-dependencies of nevalla/lens-resource-map-extension.

Open the folder on GitHubat commit dde5980

Compare with similar skills

Lens Extension Dependency Sync 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.

Lens Extension Dependency Sync compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Lens Extension Dependency Sync this skillnevalla/lens-resource-map-extension404—~709Automated safety check: PassMIT
Validator Dependency Upgradeexpress-validator/express-validator6.2k—~1.2kAutomated safety check: PassMIT
Claude Code Version Checkykdojo/claude-code-tips10k—~1.8kAutomated safety check: PassCustom licence
Linea Dependency MaintenanceConsensys-Incorporated/linea-attestation-registry1771 repos~3.7kAutomated safety check: WarnMIT
RStudio Electron Version Updaterstudio/rstudio5.1k—~964Automated safety check: PassCustom licence
Aube Package Manager Helperaubepkg/aube2k—~1.1kAutomated safety check: WarnMIT

Similar skills

  • Validator Dependency Upgrade

    express-validator/express-validator

    Walks maintainers through bumping the pinned validator package in express-validator and syncing chain types, implementations and options with the new release.

    6.2k GitHub stars~1.2k tokensUpdated 6 days ago
    DevelopmentAuto-check passed
  • Claude Code Version Check

    ykdojo/claude-code-tips

    Recommends whether to stay on the installed Claude Code version, update, or pin another one by comparing npm tags, release timing and the changelog.

    10k GitHub stars~1.8k tokensUpdated 15 days ago
    DevelopmentAuto-check passed
  • Linea Dependency Maintenance

    Consensys-Incorporated/linea-attestation-registry

    Safely plan and execute dependency maintenance for JavaScript/TypeScript (npm, pnpm) and GitHub Actions, including npm lockfiles, pnpm workspaces, catalogs, overrides, SHA-pinned action versions…

    177 GitHub starsUsed in 1 repo~3.7k tokens
    DevelopmentAuto-check: warnings
  • Bumps the pinned Electron version across the RStudio repository, updating NEWS.md, package.json, the lockfile and the allowScripts entry.

    5.1k GitHub stars~964 tokensUpdated today
    DevelopmentAuto-check passed
  • Manages Node.js dependencies, scripts and installs with aube, aubr and aubx, choosing the right command by its effect and preserving the project's existing lockfile and workspace format.

    2k GitHub stars~1.1k tokensUpdated today
    DevelopmentAuto-check: warnings
  • Automatically fetch and fix Dependabot security alerts by querying GitHub REST API for open alerts, identifying vulnerable packages, researching secure versions, and updating package.json files…

    114 GitHub stars~2k tokensUpdated yesterday
    DevelopmentAuto-check passed

More from nevalla/lens-resource-map-extension

  • Lens Extension Publisher

    nevalla/lens-resource-map-extension

    Gets a Lens Kubernetes-IDE extension ready for release and has the running Lens app publish it, instead of running npm login or npm publish directly.

    404 GitHub stars~764 tokensUpdated 3 days ago
    Auto-check passed
  • Lens Extension Missing Capability Report

    nevalla/lens-resource-map-extension

    Tells the user when a request needs something the Lens extension surface does not offer, reports the gap to Lens, and carries on with the nearest supported option.

    404 GitHub stars~726 tokensUpdated 3 days ago
    Auto-check passed
  • Lens Extension Idea Menu

    nevalla/lens-resource-map-extension

    Propose starter prompts for this Lens extension based on the host's current extension-development-instructions.

    404 GitHub stars~665 tokensUpdated 3 days ago
    Auto-check passed

Works with

Categories

Questions about Lens Extension Dependency Sync

What does Lens Extension Dependency Sync do?

Aligns a Lens extension's package.json ranges with the dependency versions bundled in the running Lens build, then reinstalls and rebuilds. Lens serves packages such as `react`, `mobx` and the `@k8slens` and `@lensapp` scopes to extensions from its own bundle and refuses to load an extension whose declared range does not match.k8slens/extensions`, finds the section listing exact bundled versions, and stops without guessing if that section is missing.

When should I use Lens Extension Dependency Sync?

Lens Extension Dependency Sync fits situations like: after upgrading Lens, when the extension no longer loads; when Lens reports that a declared range is not compatible with its bundled version; before rebuilding the extension against the Lens version you are developing on.

How do I install Lens Extension Dependency Sync in Claude Code?

Run `npx skills add nevalla/lens-resource-map-extension --skill lens-extension-development-sync-dependencies -a claude-code`. Or copy the skill folder (.claude/skills/lens-extension-development-sync-dependencies in nevalla/lens-resource-map-extension) into .claude/skills/lens-extension-development-sync-dependencies in your project. Claude Code loads it when a task matches its description.

How do I install Lens Extension Dependency Sync in Codex?

Run `npx skills add nevalla/lens-resource-map-extension --skill lens-extension-development-sync-dependencies -a codex`. Or copy the skill folder (.claude/skills/lens-extension-development-sync-dependencies in nevalla/lens-resource-map-extension) into .agents/skills/lens-extension-development-sync-dependencies in your project. Codex loads it when a task matches its description.

Can I use Lens Extension Dependency Sync 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 nevalla/lens-resource-map-extension --skill lens-extension-development-sync-dependencies -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/lens-extension-development-sync-dependencies, .gemini/skills/lens-extension-development-sync-dependencies, .github/skills/lens-extension-development-sync-dependencies and .opencode/skills/lens-extension-development-sync-dependencies in your project.

What does Lens Extension Dependency Sync need to run?

Going by SKILL.md and its folder, Lens Extension Dependency Sync needs the command-line tools its instructions call (npm). Our summary lists: A Lens extension project with `package.json`; A Lens build that writes the dependency versions section; npm.

Does Lens Extension Dependency Sync access the network?

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

Is Lens Extension Dependency Sync 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 Lens Extension Dependency Sync use?

Lens Extension Dependency Sync is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Lens Extension Dependency Sync use?

About 709 tokens (SKILL.md is roughly 2.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Lens Extension Dependency Sync?

Skills that share tags, products or a category with Lens Extension Dependency Sync: Validator Dependency Upgrade (express-validator/express-validator, 6.2k stars), Claude Code Version Check (ykdojo/claude-code-tips, 10k stars), Linea Dependency Maintenance (Consensys-Incorporated/linea-attestation-registry, 177 stars) and RStudio Electron Version Update (rstudio/rstudio, 5.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Lens Extension Dependency Sync?

nevalla (a GitHub user) maintains it in nevalla/lens-resource-map-extension, which has 404 GitHub stars. The repository holds 4 skills in this directory. The repository was last updated on October 6, 2026.

Source: nevalla/lens-resource-map-extension on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.