coop: bundle a version-locked stripe-coop Agent Skill - #1902
Open
tomelm wants to merge 2 commits into
Open
Conversation
…pters Embed a portable stripe-coop skill (SKILL.md + references) in the binary, install it atomically and idempotently into the selected harness's skill directory before launch, and shrink launch prompts to skill activation plus dynamic session context. Refactor the launcher into a harness adapter registry covering Claude Code, Codex, OpenCode, Cline, Roo Code, OpenHands, and Goose, and stamp protocol_version on agent-facing responses. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- goose launcher: put GOOSE_MODE before exec (bash only honors env assignments before the command word); add a test that executes the script - drop the all: embed prefix so build-machine dotfiles never ship - sweep abandoned staging/retired install debris older than an hour - sanitize angle brackets out of start-work notes so node titles like <PaymentElement> can't trip the placeholder validator - recommend now emits ok/protocol_version and structured recovery errors - correct skill docs: status --json shape, follow-up flow (start-followup is deploy-only; other next-action selections run from agent_prompt), and the dot-separated node-reference grammar Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
matv-stripe
reviewed
Aug 13, 2026
Comment on lines
+56
to
+58
| func agentsSkillsDir(home string) string { | ||
| return filepath.Join(home, ".agents", "skills") | ||
| } |
Contributor
There was a problem hiding this comment.
Is this duplicative of https://github.com/stripe/stripe-cli/tree/master/pkg/agentskills ?
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
Bundles a version-locked
stripe-coopAgent Skill inside the CLI binary and installs it into the selected coding harness beforestripe coop startlaunches an agent. The skill carries Co-op's stable lifecycle and safety contract, so launch prompts shrink to skill activation plus the dynamic session context.Why
The lifecycle contract was re-sent in full on every launch prompt and every command response. Moving it into a skill that the agent loads on demand keeps the prompt focused on the user's project and integration intent, and gives us one portable place to teach agents the protocol.
The skill is embedded (
go:embed) rather than downloaded: it is part of the Co-op protocol and must stay compatible with the exact CLI version, so it deliberately does not reuse the network-backedpkg/agentskillsinstaller.How it works
pkg/coop/skill/stripe-coop/:SKILL.mdplusreferences/{command-api,node-contracts,recovery}.md. The frontmatter description scopes activation to Co-op sessions and away from ordinary Stripe development..stripe-cli-skill.jsonmanifest). A same-name skill directory without that manifest is treated as user-authored and never overwritten; the launch falls back to the previous self-contained prompt. Abandoned staging/retired directories older than an hour are swept.pkg/cmd/coop/coop_harness.goreplaces the old name/path switch. Each adapter declares executables, skill directory, activation syntax, launch arguments, approval flags, and capability limits.stripe coop startinstalls.join,status,stop, andrecommenddo not.coop runand command responses stay self-contained for agents invoked directly.Harness support
Verified against current official harness docs (July 2026):
~/.claude/skills/stripe-coop--dangerously-skip-permissionsbypass~/.agents/skills$stripe-coop--dangerously-bypass-approvals-and-sandboxbypass~/.agents/skillsopencode --prompt,--auto~/.cline/skills/stripe-coop~/.agents/skills~/.agents/skillsopenhands -t,--always-approve~/.agents/skillsgoose run -t,GOOSE_MODEenv; no conversational discoveryHarnesses that cannot hold an interactive conversation from a prompt-seeded launch are rejected for no-blueprint discovery with an actionable message rather than silently launching into a broken flow. Unknown
--agentvalues get a generic positional-prompt launcher, no skill install, and the full fallback prompt.Protocol
Adds
protocol_versionto rendered agent responses so agents can detect contract drift.recommendnow emitsok/protocol_versionand structured recovery errors instead of plain text.start-worknotes strip angle brackets so node titles like<PaymentElement>cannot trip the placeholder validator.Testing
go test ./pkg/coop/... ./pkg/cmd/coop -count=1— greengolangci-lint run— 0 issues;go build ./...;git diff --checkcleanquick_validate.py— validstripe coop agentsubcommand is documented in the bundledcommand-api.mdAn adversarial multi-agent review of this branch surfaced 8 confirmed findings, all fixed in the second commit — most notably that the Goose launcher placed the env assignment after
exec, sobashtried to run a program literally namedGOOSE_MODE=autoand the harness could never start.Follow-ups (not in this PR)
${node...}outputs a typed schema in blueprints instead of free-formfield=valueJSON--yolovs--auto-approve; worth re-verifying before release🤖 Generated with Claude Code