mirror-local-state-to-a-remote-account
Installation
SKILL.md
Mirroring a local flag onto a remote account
The feature is one switch: when I mark a record as followed here, mark it followed on my account too. Almost all the difficulty is in what the switch means at its two edges, and in what the per-item call is allowed to return.
// adapted — the whole contract, in the repository interface
/**
* Records the flag locally, and mirrors it onto the account when mirroring is enabled.
*
* Returns null when mirroring is off or was not attempted, true when the account was updated,
* false when the call failed — the caller decides whether that is worth telling the user about.
* The local flag is written either way: marking a record must not depend on the network.
*/
suspend fun setFollowed(recordId: String, followed: Int): Boolean?