Skip to main content
Jeden Skill in Manus ausführen
mit einem Klick

unsaved-changes-guard

Implement or debug a "discard unsaved changes?" confirm dialog that intercepts both browser back button and in-page Back/Cancel buttons on Next.js App Router edit pages. Use when the user needs navigation guards on create/edit forms, when browser back is not firing the dialog, when history stack gets polluted with duplicate edit entries, or when history.go/router.push causes overshoot into about:blank or navigation loops. Applies specifically to Next.js 13+ App Router with the "use client" directive.

Überblick

Implement or debug a "discard unsaved changes?" confirm dialog that intercepts both browser back button and in-page Back/Cancel buttons on Next.js App Router edit pages. Use when the user needs navigation guards on create/edit forms, when browser back is not firing the dialog, when history stack gets polluted with duplicate edit entries, or when history.go/router.push causes overshoot into about:blank or navigation loops. Applies specifically to Next.js 13+ App Router with the "use client" directive.

Installationsbefehl
npx skills add https://github.com/truongnat/demo-route-confirm-leave --skill unsaved-changes-guard

Kopieren Sie diesen Befehl und fügen Sie ihn in Claude Code ein, um den Skill zu installieren

Sterne0
Forks0
Aktualisiert10. April 2026 um 00:19
SKILL.md
readonly