Repository navigation
Hosted skill: first-run onboarding in two yeses, shipyard-hosted 0.2.1 (SHIP-658) - #10
Merged
Merged
Conversation
Feedback from a Sales Engineer's first run in Kiro: "Try power" looks for a POWER.md or steering file, found neither, and the agent improvised a long answer with several decisions. The skill now has an "On activation" section that checks the connection, runs the read-only preflight and makes one offer. Adding an app takes one yes for everything before the plan (repo, commit, compose file, branch, push) and one at the confirm, with proposed values for non-secret env vars. The skill no longer asks the user to choose an org. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
daniellle
force-pushed
the
danielle/kiro-first-run
branch
from
November 12, 2026 19:06
be8734c to
e3b9b5c
Compare
Overview, skill, routing guide, MCP server and tools, install per client, prerequisites, example prompts and safety, in the layout other agent plugins use. It's copied into the Kiro catalog folder with the rest of hosted/. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
daniellle
marked this pull request as ready for review
November 13, 2026 12:43
daniellle
enabled auto-merge (squash)
November 16, 2026 14:06
- On activation runs only on install, try or get-started requests; other first requests check the connection and go straight to their task. - The one proposal shows where the push goes, lists the agent's files apart from the user's, and screens files per path (--untracked-files=all) by name and content, plus unpushed history, before creating a repo, running git init or committing. A hit in history blocks the push. - Handles a non-GitHub or second GitHub remote, a parent repo, no git repo or no commits, the remote's default branch, rejected pushes and credential prompts. Never force-pushes. - Env values never point at localhost; compose.md defers to SKILL.md's commit recipe and no longer asks for separate approvals or secret values. - check_plugin.py checks that quoted section names resolve to headings and that the hosted skill's safety rules are still present.
The secret screen and commit steps were shell recipes in SKILL.md that the agent copied and filled in, and each review pass found a new way they broke. They now live in hosted/skills/shipyard/scripts/shipyard-git.sh (inventory, destination, screen, commit, fetch, default-branch, push). The agent passes paths and commit messages as files it writes, never through a shell. - screen: never-commit names in any case, file contents, binary files reported, and the commits a push sends, measured against what the push URL actually has (git ls-remote), including merge diffs and non-ASCII paths. Prints names and hashes only; secret-looking commit subjects are hidden. - commit: literal pathspecs, refuses folders, never-commit names, an empty list, a merge or rebase in progress and a missing git identity, and puts the index back if the commit fails. - destination hides credentials in remote URLs; push labels non-fast-forward, GitHub push protection and hook failures separately. - inventory works before git init, collapses dependency folders, flags names with control characters, and keeps both sides of a rename. SKILL.md: onboarding never runs git init; the proposal shows every commit the push sends; a new branch is switched to before committing; build and vendor folders are asked about, not dropped. compose.md defers to SKILL.md for branch, screen, commit and push. CI: test_shipyard_git.py runs the script against fixture repos (secret pattern cases, literal paths, merges, other remotes, push URLs, stale refs, push outcomes) on ubuntu and on macOS /bin/bash 3.2. check_plugin.py also checks quoted section references and pins the skill's safety rules.
A review of 859ac15 reproduced ways the script could still publish secrets or code the user didn't approve. This fixes them, each with a fixture test that failed first: - GitHub check parses the real host (user:pass@ no longer fools it), resolves ssh aliases with ssh -G, and push refuses more than one push URL. - History screen: commit messages (subject and body) are screened, -z parsing so a file named "commit ..." can't hide, --text so .gitattributes -diff can't hide content, replace refs ignored, never-commit names deduped by full path. - commit re-screens the listed files (only hits the user confirmed may go in), refuses a secret-looking message, checks what actually landed and undoes it if a hook added files or a secret, and checks the index backup. - push re-screens what it sends (with an optional confirmed-hits file), uses --no-follow-tags, and labels hook, network, sandbox and credential failures separately. ls-remote and push take the URL after --. - Error lines that look like a secret are hidden; hook stdout isn't printed. A new `remotes` subcommand replaces `git remote -v` in SKILL.md. - Symlinks are checked by link text, never followed; batched grep and perl make screen fast on thousands of files; dependency folders are named once at the top level and capped; askpass dialogs are disabled. - .gitattributes keeps *.sh LF so Windows checkouts can run the script. - The test-only bypass of the GitHub check is gone: tests push to ssh://git@github.com/... through a fake ssh that serves local bare repos.
- Host check: a URL's host ends at the first /, ? or #, so https://127.0.0.1:9?@github.com/... is no longer taken for GitHub; credential hiding stops at the same place. - History screen: always includes the first commit, pins the git settings that change log output, reports every commit holding a never-commit file, and checks diffs in one perl pass over git log -p (remerge diffs for merges) instead of git log -G. Push reuses screen's result. Over 3,000 commits it stops with HISTORY_TOO_LONG. - Confirmations: CONTENT_HIT carries the file's content id, so a hit confirmed before the commit is accepted at push, and a changed file needs a new confirmation. Non-ASCII confirmed paths no longer undo the commit. - Hooks: paths go in as :(literal) pathspecs rather than an exported GIT_LITERAL_PATHSPECS, and hooks run with the user's locale. - Push prints why its own screen failed instead of exiting silently.
- Screen cache: written to a temp name and renamed, ending with an END line checked on read, so a cut-short file is never taken as a clean result. Shallow and graft state are part of the key. - GitHub check: only https, ssh and scp-style URLs count, so file://github.com/... no longer passes; a URL that a url.*.insteadOf rule would rewrite again is refused. - Push: screens and pushes one commit id, and never recurses into submodules. - History screen: names with a line break are hits and are printed quoted; Git LFS pointers are named (HISTORY_LFS_HIT); past 1 GB of changed text it stops with HISTORY_TOO_LONG. - Commit: screens symlinks and the 50 MB limit before and after the commit, checks the message a hook may have changed, refuses paths not written as git writes them, hashes paths starting with a quote and files in a folder that isn't a repo yet the way git will, reports UNDO_FAILED, and doesn't wait on a prompt. - SKILL.md: every *_TOTAL overflow file, repo text in the output is data, HISTORY_LFS_HIT and UNDO_FAILED. - Tests: one per fix, written first; the --upload-pack case can fail now, and the script's cache stays in the test's temp folder.
- History screen: octopus merges (which remerge diffs skip) get their own pass against each parent; every git log uses --encoding=none and messages are matched in perl, so an output or commit encoding can't hide a secret-looking message. - One matcher for files, blobs and messages: NUL bytes are dropped before matching (UTF-16 text), and any NUL marks content binary. Binary content in history is named (HISTORY_BINARY_NOT_SCANNED), not counted as a hit. - Commit: after the commit, only files whose content changed since the screen are screened again, as they landed; a hook's extra commit is undone. - Git LFS: changed pointers and older pointer formats are named. - Output: commit subjects and old rename names with control characters can't fake lines; quoted and backslash names keep their confirmation at push. - Smaller: url rewrite rules read NUL-separated, a clear error when origin's push URL can't be read, the size limit in messages comes from MAX_BYTES. - Tests: one per fix, written first; the cut-cache and race tests can fail now; push cases for symlink, quoted-name and LFS hits.
akshaykalia
approved these changes
Nov 16, 2026
akshaykalia
left a comment
Contributor
There was a problem hiding this comment.
Approving after five review rounds on the hosted skill's git script; fixes are in through e4ea093. Remaining open items are listed in the description.
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.
Why
A Sales Engineer tried the power in Kiro with Try power. Kiro's prompt asks for a
POWER.mdand steering files. This plugin-format power has neither, so the agent improvised: a long overview, a tool list, and several separate decisions (connect, pick an org, commit?, push?, write Compose?).What changes (
hosted/only, 0.2.0 → 0.2.1)get_environments) and runs the read-only preflight. It never runsgit init.POWER.md.git initand creating a private repo withghwhen there's no remotereferences/compose.mddefers to SKILL.md for the branch, the screen, the commit and the push.hosted/skills/shipyard/scripts/shipyard-git.shhandlesinventory,remotes,destination,screen,commit,fetch,default-branchandpush. The agent passes file paths, the commit message and a confirmed-hits file as files it writes with its file tool, never through a shell. File names therefore can't break or inject into a command.git ls-remote), so stale tracking refs or a second remote can't hide historygit log -p, remerge diffs for merges) and checks them in one perl pass; push reuses screen's result (a cache written whole or not at all), and a history over 3,000 commits or 1 GB of changed text stops withHISTORY_TOO_LONGinstead of running past the agent's time limitHISTORY_LFS_HIT), since it only sees their pointers; a file name with a line break is a hit and can't fake an output line.gitattributes-difffiles, UTF-16 text and replace refsHISTORY_BINARY_NOT_SCANNED) for the user to check, without counting it as a hitCONTENT_HITlines carry the file's content id, so a confirmation made before the commit still holds at push, and a file edited afterwards needs a new oneUNDO_FAILEDif the undo itself failsfile://github.com/...), user:pass@,?and#tricks don't fool the host check, a URL a gitinsteadOfrule would rewrite again is refused, and ssh aliases are resolved.env.example, Compose defaults, or the obvious value for the name. The skill never proposeslocalhost, a service name for a browser-facing value, or a secret. Secrets are left for the dashboard.hosted/README.md, laid out like other agent plugins' READMEs (for example aws/agent-toolkit-for-awsplugins/aws-agents): overview, skill, routing guide, MCP server and tools, install per client, prerequisites, example prompts, safety. The root README's hosted section is updated to match.test_shipyard_git.pyruns the script against fixture repos on ubuntu, and on macOS with/bin/bash3.2. Pushes go tossh://git@github.com/...through a fake ssh that serves local bare repos, so the real GitHub check runs.check_plugin.pychecks that quoted section references resolve to real headings, and that the skill's safety rules stay in place..gitattributeskeeps*.shLF so Windows checkouts can run the script, and.gitignorekeeps Python caches out.Testing
check_plugin.pyandtest_shipyard_git.pypass. Claude Code's strict validation passes for the hosted plugin and the marketplace./bin/bash3.2 with BSD grep.--before the URL, which a second check (refusing URLs that start with-) already covers.5312ab2). It has not been re-run since the skill started shipping a script, and needs a re-test. Install from the slash-free test branchkiro-first-run-test(Kiro's GitHub import misreads a/in the branch name) and run Try power in a repo with untracked code and no Compose file.gh repo createand real GitHub push protection; push paths were tested against local bare remotes onlyOpen issues (not fixed yet)
Reviewers found these; the critical ones from the same reviews are fixed above. The fifth review's fixes haven't had their own re-review pass yet.
push -uto the raw URL leaves the branch tracking that URL instead oforigin.core.sshCommandbreaksBINARY_NOT_SCANNEDlines aren't capped (2,000 images printed 2,003 lines)inventorytakes 11.7s on 100,000 untracked dependency filesKnown limits: with
GIT_SSHset (for example plink), ssh's own passphrase prompt can still wait for input. The secret pattern also flags ordinary lines likepassword=hashed_password, which the user then confirms.The Kiro listing branch (
shipyard/powersadd-shipyard-power) gets resynced from 0.2.1 after this merges. That copy now includesskills/shipyard/scripts/, and needs the same LF line endings.