feat(connections): offer both API and CLI screenpipe skills in agent cards#3941
Merged
Conversation
…cards The Hermes and OpenClaw agent cards' Skill tab served a single hardcoded SKILL.md (API/curl only). screenpipe ships two skills: screenpipe-api (query screen history) and screenpipe-cli (manage pipes and connections). The tab now offers both behind an API/CLI switcher, each with its own install one-liner, Save-to-Downloads filename, and target path. agent-card.tsx: SCREENPIPE_SKILL_MD becomes SCREENPIPE_API_SKILL_MD plus a new SCREENPIPE_CLI_SKILL_MD; the skill prop becomes skills: SkillVariant[]; SkillSection renders a variant switcher plus a per-variant SkillVariantBody. hermes-card.tsx and openclaw-card.tsx pass both API and CLI variants. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ILL.md
Replace the hand-written inline skill snippets with the real content from
.claude/skills/{screenpipe-api,screenpipe-cli}/SKILL.md so the cards' copy and
save SKILL.md text is the source of truth from the repo and cannot drift.
- scripts/gen-skill-content.js: reads the two canonical SKILL.md files and
writes lib/generated/screenpipe-skills.ts (defensive: keeps the existing
generated file if sources are unreadable, so it never breaks the build).
- package.json: wire codegen into predev and prebuild; add skills:generate.
- agent-card.tsx: re-export the two constants from the generated module.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
what
The Hermes and OpenClaw agent cards (Settings > Connections) had a Skill tab that only served one hardcoded SKILL.md (an API/curl snippet). screenpipe actually ships two skills, so the tab now offers both behind an API/CLI switcher:
Each variant has its own install one-liner, Save-to-Downloads filename, and target path, so the two SKILL.md files land in separate folders instead of colliding.
source of truth
The copy the cards serve is not hand-written.
scripts/gen-skill-content.jsreads the canonical.claude/skills/{screenpipe-api,screenpipe-cli}/SKILL.md(the same folders the... skills install github:...one-liners install from) and generateslib/generated/screenpipe-skills.ts. It runs onpredev/prebuild, so the cards always reflect the real skills and cannot drift. The generator is defensive: if the sources can't be read it keeps the existing generated file rather than failing the build.ui
API selected (left) vs CLI selected (right), same tab:
changes
scripts/gen-skill-content.js(new): canonical SKILL.md ->lib/generated/screenpipe-skills.ts.package.json: wire codegen intopredev+prebuild; addskills:generate.agent-card.tsx:skillprop becomesskills: SkillVariant[];SkillSectionrenders an API/CLI switcher over a reusableSkillVariantBody; the two skill constants are re-exported from the generated module.hermes-card.tsx/openclaw-card.tsx: pass both API + CLI variants.MCP / Sync (remote) / Connect tabs are untouched.
test plan
bun scripts/gen-skill-content.js: generated content matches the source SKILL.md byte-for-bytebunx tsc --noEmit: clean, 0 errorsbunx next build: compiled successfully, all routes generated (incl./settings)🤖 Generated with Claude Code