next-role: Skill for Claude Code

.agents/skills/upgrade-frontend-deps/SKILL.md

upgrade-frontend-deps is a skill for Claude Code, Codex from tam159/next-role. It costs 154 tokens per session (3,134 once invoked), scanned C, original, MIT.

A workflow for upgrading dependencies in a Next.js frontend that uses pnpm, a JavaScript package manager. It updates packages in checked waves while preserving version-pin rules and checking browser behavior against a baseline.

In plain words
What is it for?
Use it to update frontend packages, remove verified-unused dependencies, handle coordinated LangChain package updates, and manage major upgrades one at a time.
Why use it?
Dependency upgrades can introduce lockfile conflicts, duplicate packages, peer-dependency problems, or regressions. The workflow isolates upgrades and includes repository-specific checks for those risks.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions CLAUDE.md; mentions subagents; installed under .agents/ (shared by several agents).

This is tam159/next-role's own configuration. It tells Claude Code and Codex how to work on next-role itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything next-role configures →

Reuse

Borrowing it

Nothing to install: this file belongs to tam159/next-role. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/tam159/next-role/main/.agents/skills/upgrade-frontend-deps/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/tam159/next-role

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 upgrade-frontend-deps

README.md
[![agentmods](https://agentmods.dev/badge/skills/tam159/next-role/upgrade-frontend-deps/github.svg)](https://agentmods.dev/skills/tam159/next-role/upgrade-frontend-deps)
Your own site
<a href="https://agentmods.dev/skills/tam159/next-role/upgrade-frontend-deps"><img src="https://agentmods.dev/badge/skills/tam159/next-role/upgrade-frontend-deps/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 upgrade-frontend-deps

Your own site · 80×15
<a href="https://agentmods.dev/skills/tam159/next-role/upgrade-frontend-deps"><img src="https://agentmods.dev/badge/skills/tam159/next-role/upgrade-frontend-deps.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 154 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,134 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. 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.00154 $0.03134
Opus 5 $0.00077 $0.01567
Sonnet 5 $0.00031 $0.00627
Haiku 4.5 $0.00015 $0.00313

Measured 5d ago against content hash 6aa3e948036c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade C, and why

upgrade-frontend-deps scanned grade C with 1 finding 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 5d 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

Full visual checklist vs baseline (light + dark, dialogs, selects, hover, print page), plus a cold-build check: `rm -rf frontend/.next && pnpm --dir frontend build` and grep the emitted CSS.
.agents/skills/upgrade-frontend-deps/SKILL.md · 145 lines

How it starts

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

Upgrade the frontend's pnpm dependencies in revertable waves, preserving exact-pin style and the single-resolved-version invariant, with browser verification against a pre-upgrade baseline.

Ground rules

  • Exact pins stay exact. react, react-dom, and @langchain/langgraph-sdk have no ^ in package.json. Upgrade them with pnpm --dir frontend add -E [email protected]; everything else gets a new ^ floor (pnpm --dir frontend add pkg@^x.y.z).
  • A held-back line needs a ~ range. ^x.y.z admits every later minor, and pnpm resolves the highest match — pnpm add better-auth@^1.6.30 installed 1.7.2, the version being held back. When a package must stay on its current minor (schema migration, peer gate), pin ~x.y.z, say so under "Held back", and restore ^ in the PR that lifts the hold. Always read the + pkg x.y.z line pnpm prints after add — it is the installed version, not the range you typed.
  • One resolved version per dep. The lockfile must not carry two copies of anything that crosses a package boundary (the @langchain/langgraph-sdk single-copy invariant in frontend/CLAUDE.md is the critical one; scripts/check-langchain-sdk-sync.mjs guards it).
  • One commit per wave (majors: one per package) so any regression reverts surgically.
  • Lockfile changes need docker compose restart frontend; source edits hot-reload. Never restart for source-only changes; never skip the restart after pnpm add/remove.
  • @types/node tracks the Docker runtime, not npm latest. Read the major from frontend/Dockerfile's FROM node:XX-alpine and stay on @types/node@^XX. Document it under "Held back".
  • vitest + @vitest/coverage-v8 are an exact-version lockstep pair (coverage is an exact peer of the runner) — bump both together in one command; a split pair breaks pnpm test:coverage. Since vitest 5, vite is a required peer rather than a dependency: keep it as an explicit devDependency (vite@^8) so the resolved version is declared, not left to pnpm's auto-installed peers.

Read the full file on GitHub · 145 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. 5d ago Changed · +4 lines 6aa3e948036c
  2. 10d ago First seen · 141 lines · 154 tokens per session scan C 9f00c876a855

Subscribe to this mod's changes

upgrade-frontend-deps is a skill published in the GitHub repository tam159/next-role (50 stars, last pushed 2d ago), licensed MIT. It adds 154 tokens to every session and 3,134 once invoked, about $0.0008 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.