본문으로 건너뛰기
cccskills
무료GitHub에 공개

lumen-consumer-upgrade

Upgrade a consumer repo to the latest Lumen: audit the gap, bump every `@ledgerhq/lumen-*` package, apply each migration crossed, verify, and open the PR. Run from the consumer repo's root, only when asked to upgrade or audit Lumen there.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(5)

  • SKILL.md6.7 KB
  • references/audit-template.md1.2 KB
  • references/breaking-changes.md20.7 KB
  • references/pr-template.md817 B
  • scripts/lumen-api-diff.mjs7.9 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

lumen-consumer-upgrade

Run from the consumer repo's root. Two phases with a stop between them: the audit changes nothing, and the upgrade starts only once a human has read the audit.

What changed between two versions comes from two sources, used together. Never infer it from memory.

1. Audit (read-only)

  1. Map the repo. Find every package.json that declares a Lumen package (monorepos: all workspaces, plus pnpm catalogs). Include retired and renamed packages listed in the catalog's Setup section. Note the package manager.

  2. Installed versions come from the lockfile, not the ranges in package.json.

  3. Target versions: npm view @ledgerhq/<pkg> version for each. Packages that pin each other as peers (check their peerDependencies) move together.

  4. Select rows with the catalog's "Which rows apply" rule. List skipped ids in one line. If a selected row's fix says Stop, report it and stop.

  5. Run each selected row's detection. Record file:line hits. A row with no hits is listed as "checked, not used". Never skip a row because it looks unlikely.

  6. Diff each package between its installed and target versions:

    node <this skill>/scripts/lumen-api-diff.mjs @ledgerhq/<pkg> <installed> <target>
    

    The script resolves typescript from the working directory. If the repo's dependencies aren't installed, run it from a scratch folder that has typescript installed.

    Grep the app for every removed export, file, var(--token) and class pattern. A hit no row explains goes under "Uncatalogued".

  7. Write the audit with references/audit-template.md, then stop: ask for the judgment calls and whether to proceed. Print the audit in your reply first: the user must be able to read it before answering.

2. Upgrade

One branch and one PR per repo. Apply in this order. Each step leaves the repo building.

  1. Repo conventions, before the first branch or commit. The consumer's rules beat this skill's templates. Read its CONTRIBUTING.md, AGENTS.md and .github/workflows (PR-title, branch-name and release-marker validators), and note:

    • Branch name: match the validator's regex exactly (e.g. chore/no-issue-upgrade-lumen-<version>, not chore/upgrade-lumen-…). A pushed branch can't be renamed under an open PR, so get it right first.
    • Commit and PR title format (e.g. gitmoji + scope + ticket): it overrides the title in the PR template. Test your title against the regex.
    • Release intent: if the diff touches a published package, add what the repo requires (.nx/version-plans/, .changeset/, a label) in the same PR, following an existing file's format. If the consumer is itself published and releases from its package.json version (no marker files), bump it in the same PR or nothing ships. A dependency-only upgrade is a patch; use minor only if the user asks or the repo's history does.
    • Toolchain: the pinned Node/package manager (.prototools, .nvmrc, packageManager). If it isn't installed, say so up front and list which checks ran under a different version.
  2. Setup rows first: they change packages or build setup that later steps depend on.

  3. Bump every Lumen package to its target and reinstall.

  4. 🔊 Loud rows: fix every Lumen typecheck error with its row's fix. The typecheck is the checklist: keep going until it's clean.

  5. 🔇 Silent rows: fix every audit hit. These produce no error.

  6. ⚖️ Judgment rows: apply only confirmed choices. Never pick a size, color or behavior silently. If unconfirmed, use the row's default and list it in the PR.

  7. ♻️ Replacement rows: Lumen now provides something the app built itself. For each local version the detection found:

    • If it does nothing beyond Lumen's (the row says what to check), point it at Lumen's export so call sites stay untouched. Delete it only when nothing else lives in that file.
    • If it adds behavior of its own, keep it and flag it in the PR for the owning team.
    • Remove dependencies the local version needed only once nothing imports them.

    ♻️ steps inside other rows' fixes follow the same rule, applied with their row.

  8. 👁 Visual rows: no code change. List each affected screen in the PR.

Bump packages the repo already uses. Don't add new Lumen packages in this PR: list them as follow-ups.

3. Verify

  • Install, typecheck, lint, test and build pass. A failure that also exists on the base branch is reported as pre-existing, not fixed.
  • Re-run every applied row's detection and every pattern from the diff.
    • Patterns matching the old API (a removed name, value, class, token or file): zero hits.
    • Patterns matching call sites (<Avatar\b…) still match after a correct fix: check each hit against the fix and list it as reviewed.
  • Open the screens listed under 👁 in the running app. If you can't run it, say so in the PR.

4. PR

Use references/pr-template.md for the body. Cite the row id behind every change. The branch name, PR title and release marker follow step 0, not the template.

Committing and pushing may need credentials the agent can't reach (commit signing, GitHub login). Check early with a dry run, and if blocked, hand the user the exact commands instead of retrying around it.

Rules

  • Scope: the upgrade only. Other findings go under "Follow-ups", not in the diff.
  • Lumen gaps: if a fix needs something Lumen doesn't have, don't hand-roll it. List it under "Lumen gaps".
  • No guessing: if a row's fix doesn't fit a call site, leave it, explain why in the PR, and ask.
  • The published code wins over release notes and catalog text when they disagree. Check the dist of both versions.
  • Catalog drift: never edit the catalog during an audit or upgrade. Once the PR is open, turn each "Uncatalogued" finding into a row in a separate Lumen PR.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Creates and maintains Figma Code Connect files (`*.figma.tsx`) that map Figma components to code via the parser-based `figma.connect()` API. Use when the user mentions Code Connect, Figma component mapping, design-to-code translation, or asks to create/update .figma.tsx files.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

LedgerHQ/lumen232026년 10월 22일 업데이트

Use when creating, naming, or placing a file or folder in libs/*, or when modifying or adding a file to an existing component (even when the barrel isn't touched) — component vs utility naming, the one-responsibility-per-file layout, when a folder needs an `index.ts` barrel (public API only), and the required set of files a component needs per lib. Load this before scaffolding or restructuring a component so the layout matches the codebase.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

LedgerHQ/lumen232026년 10월 22일 업데이트

Use when designing or changing a component's public API, its composition, or its state model in libs/ui-react or libs/ui-rnative — layering (core vs internal vs primitives), BaseProps/Props splits, converting a component to compound / changing its composition with createSafeContext, controlled/uncontrolled state, prop-naming conventions, and cross-platform API parity. Load this before shaping a new component, changing its props, or refactoring its composition.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

LedgerHQ/lumen232026년 10월 22일 업데이트

Use when writing or editing Storybook MDX docs (*.mdx) — the two-tab Overview/Implementation structure, story-backed `<Source>` examples, and doc table guidelines.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

LedgerHQ/lumen232026년 10월 22일 업데이트

Use when creating or editing Storybook stories (*.stories.tsx, React or React Native) — story layout, controls, and export naming conventions.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

LedgerHQ/lumen232026년 10월 22일 업데이트

Use when building or styling a component in libs/ui-react or libs/ui-rnative — the cross-platform styling principles, plus routing to the platform mechanics: Tailwind + cva + cn on web, useStyleSheet + themeJS + lx on React Native. Load this before writing component styles.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

LedgerHQ/lumen232026년 10월 22일 업데이트

LedgerHQ의 스킬 모두 보기

이 스킬의 문제 신고