/summer:summer-friendsfrom Summer Engine
Adds friends list, profiles, chat, and direct messages to a game using the Summer social platform. Handles consent flow and permission declarations.
Ships in Summer Engine. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Friendships belong to the player's Summer account. The Summer app owns the social graph itself:
Your game gets two client-only facades.
Summer.client.friends
show_friends() and show_chat(user_id). They ask the Summer app to show its own screen over the game.show_profile(user_id) is the same. The profile includes add friend, message, invite to party and report, so it is the social feature most games need.offline, online, in_this_game or in_other_game. Another game is never named.Summer.client.messages
show_chat(user_id) unless chat is central to your game.Reading friends or messages needs two things:
summer.build.json.request_access.Declining never blocks play. A game must work without these permissions.
Availability:
SummerClientFriends. On older engines, Summer.client.friends does not exist and scripts that use it fail to parse. Check the class reference for SummerClientFriends before using this skill.is_available() is false in Local Play and editor runs, for guests, for accounts the platform keeps out of social features (age_restricted, under 13), and in Summer apps without player.friends@1 (friends) or player.messaging@1 (messages).capability_unavailable or ui_unavailable.Add a top-level permissions array to summer.build.json, next to schema
and gameId. List only what the game uses; each entry is an upper bound on
what you may ask for.
"permissions": ["social.friends.read"],
| Permission | Allows |
|---|---|
social.friends.read | get_friends(), statuses, the changed signal |
social.messages.read | list_conversations, list_messages, list_messages_after |
social.messages.send | send |
social.messages.read_state.write | mark_read |
Unknown or duplicate entries are rejected when you publish. Without a
declaration, get_access() reports undeclared, and request_access() fails
at once with permission_undeclared.
client/friends.gd, a child Friends of Main. In client/main.gd's _ready(), call
$Friends.start() right after Summer.initialize succeeds:
extends Node
## The player's Summer friends, with their consent, and the Summer app's
## friend screens over the game.
signal friends_changed(rows: Array) # [{user_id, name, status}]
signal status(text: String)
var friends: SummerClientFriends
## Main calls this right after Summer.initialize succeeds: a child's _ready
## runs before that, while Summer.client is still null.
func start() -> void:
friends = Summer.client.friends
friends.changed.connect(_render)
friends.access_changed.connect(func(_state: StringName) -> void: _render())
_render()
## The Friends button: asks for consent once, then shows the list.
func open() -> void:
if not friends.is_available():
status.emit("Friends are not available here.")
return
if friends.get_access() != &"granted":
var decision: SummerResult = await friends.request_access().get_result_or_completed_signal()
if not decision.ok:
status.emit("Your friends list stays private.")
return
_render()
func _render() -> void:
var rows := []
for friend in friends.get_friends():
rows.append({"user_id": friend.user_id, "name": friend.display_name, "status": friend.status})
friends_changed.emit(rows)
## The Summer app's profile for any other player this game knows. No consent needed.
func show_profile(user_id: String) -> void:
var shown: SummerResult = await friends.show_profile(user_id).get_result_or_completed_signal()
if not shown.ok:
status.emit("That screen is not available right now.")
## The Summer app's direct-message thread with a friend, over the game.
func show_chat(user_id: String) -> void:
var shown: SummerResult = await friends.show_chat(user_id).get_result_or_completed_signal()
if not shown.ok:
status.emit("That screen is not available right now.")
How it behaves:
changed, the engine re-reads the list on every change hint, after a consent decision, on refresh(), and about every 60 seconds while the game is in front. Never poll yourself.in_this_game friends first. unknown means presence couldn't be read; it is not offline.user_id; each read replaces the SummerFriend objects.players map in summer-world-chat, step 1) and call show_profile(user_id). Your own id fails with invalid_argument.summer-parties).## Sends one direct message, asking for the send permission once.
func send_message(user_id: String, text: String) -> void:
var messages := Summer.client.messages
if not messages.is_available():
return
if messages.get_access(&"social.messages.send") != &"granted":
var decision: SummerResult = await messages.request_access(PackedStringArray(["social.messages.send"])).get_result_or_completed_signal()
if not decision.ok:
return
var sent := messages.send(user_id, text)
var result: SummerResult = await sent.get_result_or_completed_signal()
if result.ok:
print("sent #%d" % sent.message.sequence)
elif result.code == &"text_not_allowed":
status.emit("That message was not sent.")
elif result.code == &"target_unavailable":
status.emit("You can't message this player.")
Reading a thread works the same way:
social.messages.read, then messages.list_messages(user_id). Read op.messages, newest page first; pass op.next_cursor for older pages.messages_changed, call list_messages_after(user_id, last_sequence). Today messages_changed fires only after a stream resync, so also reload when the chat screen opens.mark_read(user_id, sequence) needs social.messages.read_state.write. It marks the thread read on every device.send takes 1–4000 characters and no control characters except newline and tab. Each call is one message; the engine never sends it twice.| Code | Meaning | Show |
|---|---|---|
permission_not_requested, permission_declined, permission_revoked | The player hasn't granted it | A "Show friends" button that calls request_access() again later |
permission_undeclared | summer.build.json lacks it | Fix the declaration (step 1) |
capability_unavailable | Local Play, guest or older Summer app | Hide the feature |
age_restricted | Under-13 account | Hide the feature |
ui_unavailable | The app can't show a sheet now | "Try again" |
operation_in_progress (retryable) | Another Summer sheet (party or friends) is open | Wait |
text_not_allowed | Filtered; nothing stored | "Not sent" |
target_unavailable | Not a friend, blocked, or gone | "You can't message this player" |
rate_limited, unavailable (retryable) | Busy, or the Player Host is unreachable | Retry later, never in a loop |
Local Play has no accounts, so check the hidden path locally:
is_available() is false;summer_project_setting key="summer/local_play/players" value=2
summer_play
summer_get_diagnostics
summer_stop
Then test on Summer staging with two accounts that are friends: grant, decline
and revoke access in the Summer app, and watch access_changed.
SummerClientFriends.summer.build.json declares exactly the permissions the code asks for.in_this_game; show_profile opens for another player in the match.changed.| Don't | Do | Why |
|---|---|---|
| Ask for consent at startup | Ask when the player opens a friends feature | A consent sheet without context gets declined |
| Gate play on friends access | Treat it as optional | Declining must never block the game |
| Build friend requests, blocking or a profile screen | show_friends(), show_profile(), show_chat() | The Summer app owns them, with no consent needed |
Treat unknown as offline | Show it as unknown | It means presence couldn't be read |
Poll refresh() on a timer | Connect changed | The engine already re-reads while a handler is connected |
| Declare every permission "just in case" | Declare only what you use | The consent sheet lists each declared permission |
| Use friends to put players in one match | summer-parties | Parties are how players play together |
summer-parties: playing together, the invite sheetsummer-world-chat: chat inside a matchmultiplayer-publish: summer.build.json and publishing a Buildmultiplayer-testing: what Local Play can and can't testNo Summer MCP tools in this session? Run each one as a command; when summer --version is missing or below 4.0, use npx -y summer-engine@latest in place of summer. Fields are flags in kebab-case (--scene-path res://main.tscn) or one --input '<json>', and summer ops describe <op> prints the exact input. The summer-cli skill has the rest.
| In this skill | Command |
|---|---|
summer_get_diagnostics | summer engine get-diagnostics |
summer_get_script_errors | summer engine get-script-errors |
summer_play | summer engine play |
summer_project_setting | summer engine project-setting |
summer_stop | summer engine stop |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub summerengine/summer --plugin summer123 skills in this plugin
/3d-lightingLight a 3D scene: sun, omni and spot lights, WorldEnvironment, sky, shadows and ambient./adaptive-musicWire music stems to game state: combat, explore, boss and tension crossfades on a shared bus./agent-playtestingPlaytest by driving the live game: deterministic launch, frame-stamped probes, scripted or recorded input./ambient-bedGenerate a long looping location ambience (forest, dungeon, city, cave) on the Ambient bus./animated-loopGenerate a short seamless video loop: splash background, animated logo backdrop, idle title screen./animation-treeWire AnimationTree state machines and blend trees: locomotion blends, attack interrupts, hit reactions.Other plugins' skills for the same job