繁體中文 | English
The Other Memory of the Bene Gesserit Reverend Mothers — the complete memories and experiences of every predecessor, inherited. A new session inherits everything from the old one.
— after Dune
A Claude Code skill that condenses your current session into a self-contained
handover prompt — copied to the clipboard, ready to paste into any fresh session
(Claude Code, claude.ai, or another tool). Invoke with /handover.
git clone https://github.com/Clementtang/other-memory.git ~/.claude/skills/handoverRestart your Claude Code session and it's ready. If you manage ~/.claude as a
dotfiles repo, pin the version with a git submodule instead:
cd ~/.claude && git submodule add https://github.com/Clementtang/other-memory.git skills/handoverWhen a session gets too long, or the work needs to continue elsewhere:
/handover
Extra instructions are supported:
/handover focus on the deployment pitfalls
/handover in English
The handover is copied to the clipboard and shown in full in the reply — open a
fresh session and paste. On non-macOS systems (no pbcopy) the full text is
shown for manual copying.
The skill's instructions are written in Traditional Chinese and the handover
defaults to it; pass /handover in English (or any language) to override.
A handover from a debugging session (actual behavioral-test output, translated from the original Traditional Chinese; the scenario is a fictional project)
# Handover: Fix false-positive LINE bot webhook signature validation (Fremkit)
**TL;DR:** Root cause found (a middleware does `JSON.parse` → `stringify` on the
raw body, breaking the byte sequence so the HMAC never matches), but the fix
isn't settled; next step is helping the user pick a raw-body reading strategy
and implementing it.
## Task Goal
Fix the webhook signature validation logic of the ~/fremkit LINE bot — about
5% of requests are wrongly rejected as invalid-signature and dropped.
## Constraints & Preferences (stated by the user; violating them means rework)
- Do not take the "re-`JSON.stringify` + normalize unicode before validation"
route — already proven not to work
- The raw-body reading strategy is the user's call, not yet decided — do not
pick one and implement it on your own
## Failed Approaches (do not retry)
1. Re-`JSON.stringify` the body and normalize unicode escapes before signature
validation → LINE computes the signature over the original bytes; any
reconstruction has edge cases that don't match → already reverted
## Environment Gotchas
- `~/fremkit/api/webhook.ts` has 3 debug `console.log` lines not yet removed,
one of which prints the computed signature — remove them once the fix lands
- Local reproduction needs the `LINE_CHANNEL_SECRET` and
`LINE_CHANNEL_ACCESS_TOKEN` environment variables. **Never write the actual
values** — ask the user when needed
## Open Questions (for the user to decide)
- Raw-body reading: (a) `micro`'s `buffer()` or (b) `Request.arrayBuffer()`?
## Repo State (verified 2026-07-17)
- branch: `fix/webhook-signature`
- Uncommitted: `~/fremkit/api/webhook.ts` has 3 debug `console.log` lines
## Next Steps (priority order)
1. Assess how the two raw-body strategies affect the other routes, so the
user can decide
2. Once decided, switch HMAC validation to the raw body buffer
3. Remove the 3 debug `console.log` lines
## First Action
Read `~/fremkit/api/webhook.ts`, confirm the current validation logic and the
`console.log` locations, and confirm the raw-body strategy with the user.- Failed paths are mandatory — "what was tried and why it failed" saves more downstream time than any list of successes
- Only what code can't tell you — committed work gets one line; git has the rest
- Repo state verified live — git commands run at generation time, never recalled from conversation memory
- Constraints, open questions, and todos kept apart — "not this time", "not decided yet", and "do next" each get their own section
- No secrets in a handover — env vars by name only, never by value; the clipboard counts as leaving the machine
- Fully-qualified paths — absolute or
~/-prefixed, commands paste-ready - Non-coding sessions (research, writing, business analysis) skip the repo section automatically
Built with TDD: a baseline run without the skill documented the failure modes, then the skill was written and verified against 8 behavioral scenarios (discovery triggering, extra-instruction override, non-git session, very short session, session containing secrets, fresh-agent read-back, and more) — all passing before deployment. Every revision starts with failing test evidence, then the fix, then a re-test.
- handoff skill in hanamizuki/solopreneur — the secrets rule, fully-qualified paths, the open-questions section, and the no-conversational-shorthand rule come from here
- REMvisual/claude-handoff — the failed-paths-first principle
- vedovelli's handover gist — clipboard delivery (pbcopy + quoted heredoc)