Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/calm-clips-rewind.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@agent-native/skills": patch
"@agent-native/core": patch
---

Install Rewind through Agent Native's complete local Screen Memory setup instead of treating it as a plain public skill, reject disconnected installs that disable its required MCP connection, and guide first-time users through consent-gated Clips Desktop setup.
10 changes: 9 additions & 1 deletion .github/workflows/sync-public-skills.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
- "templates/plan/.agents/skills/visual-plan/**"
- "templates/plan/.agents/skills/visual-recap/**"
- "packages/core/src/cli/skills.ts"
- "packages/core/src/cli/skills-content/rewind-skill.ts"
- ".github/workflows/sync-public-skills.yml"
workflow_dispatch:

Expand All @@ -21,7 +22,7 @@ concurrency:

jobs:
dispatch:
name: Ask BuilderIO/skills to sync visual skills
name: Ask BuilderIO/skills to sync exported skills
runs-on: ubuntu-latest
steps:
- name: Generate app token
Expand All @@ -43,3 +44,10 @@ jobs:
-f "client_payload[sourceRepository]=${{ github.repository }}" \
-f "client_payload[sourceSha]=${{ github.sha }}" \
-f "client_payload[sourceRunUrl]=${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"

gh api repos/BuilderIO/skills/dispatches \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Dispatch target has no listener for the new public-skill event

The added agent-native-public-skills-updated dispatch is currently a no-op: the current BuilderIO/skills repository only declares a repository_dispatch listener for agent-native-plan-skills-updated. GitHub accepts repository-dispatch event names without a matching workflow, so this step succeeds while never mirroring Rewind. Add or land the corresponding downstream listener and sync logic before emitting this event, or dispatch an event that an existing receiver handles.

Additional Info
Verified against the current BuilderIO/skills default branch via GitHub API: only ci.yml and update-agent-native-plan-skills.yml exist, and the latter listens only for agent-native-plan-skills-updated.

Fix in Builder

--method POST \
-f event_type=agent-native-public-skills-updated \
-f "client_payload[sourceRepository]=${{ github.repository }}" \
-f "client_payload[sourceSha]=${{ github.sha }}" \
-f "client_payload[sourceRunUrl]=${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
3 changes: 2 additions & 1 deletion packages/core/src/cli/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { fileURLToPath } from "url";
import * as Sentry from "@sentry/node";

import { resolveDeployPostBuildInvocation } from "./deploy-build.js";
import { shouldTrackCliRun } from "./telemetry-routing.js";
import { createCliTelemetry } from "./telemetry.js";

// Resolve version once at module scope — used by both --version and --help
Expand Down Expand Up @@ -604,7 +605,7 @@ function runBuildStep(
});
}

trackCli("cli.run");
if (shouldTrackCliRun(command, args)) trackCli("cli.run");

switch (command) {
case "dev": {
Expand Down
40 changes: 36 additions & 4 deletions packages/core/src/cli/skills-content/rewind-skill.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,38 @@ metadata:
Use Clips Rewind as local screen memory. Start broad enough to find the right
moment, then read only the smallest relevant range.

## First-Run Setup

Call \`screen_memory_status\` before assuming Rewind is ready. If the tool is
unavailable, do not stop at a missing-tool error and do not silently install
anything:

1. Explain that Rewind requires the signed Clips Desktop app on macOS plus a
local agent connection.
2. Ask whether Clips is installed, or use a non-mutating native application
lookup when the host supports one. Do not inspect Clips' app-data folders.
If Clips is absent or its presence cannot be confirmed, ask permission
before opening or downloading anything: “Clips Desktop is required for
Rewind. Would you like me to open the official installer and guide you
through setup?”
3. Only after affirmative permission, open
\`https://clips.agent-native.com/download\` in the user's browser. Complete
native installation steps only when the current host can safely do so and
the user explicitly permitted them. Never bypass Gatekeeper, accept macOS
permission prompts, or enable screen/audio capture on the user's behalf.
4. If native UI control is unavailable, return the download link and wait for
the user to confirm that Clips is installed and running.
5. Ask the user to enable Rewind in the Clips tray and choose the intended
capture mode. Then configure the local connection with:

\`npx -y @agent-native/core@latest skills add rewind --client <client> --scope user --yes\`

Replace \`<client>\` with the current compatible host: \`codex\`,
\`claude-code\`, \`cursor\`, \`opencode\`, \`github-copilot\`, or \`cowork\`.
6. Restart the host only if it cannot reload MCP servers in place, then retry
\`screen_memory_status\`. Do not claim setup succeeded until it reports
Rewind enabled and unpaused.

## Retrieval Flow

1. Call \`screen_memory_status\` first. If the newest segment is still open,
Expand Down Expand Up @@ -41,12 +73,12 @@ moment, then read only the smallest relevant range.
bypass the Screen Memory MCP broker.
- Do not upload frames returned by local Screen Memory tools.
- Treat foreground apps and chapter labels as evidence, not proof of intent.
- If the Screen Memory MCP is missing, explain that the one-time setup needs to
be repaired with:
- If Clips is installed and Rewind is enabled but the Screen Memory MCP is
missing, explain that only the agent connection needs repair with:

\`npx -y @agent-native/core@latest skills add rewind --client <client> --scope user --yes\`

Replace \`<client>\` with the current compatible host: \`codex\`,
\`claude-code\`, \`cursor\`, \`opencode\`, \`github-copilot\`, or \`cowork\`.
Ask the user to restart the host if it cannot reload MCP servers in place.
- Never conflate installing Clips Desktop with installing the skill/MCP
connection, and never claim either succeeded without direct evidence.
`;
Loading
Loading