Repository navigation
Conversation
The lint pipeline had two bare recursive deletes of mktemp directories, in cgw_snapshot_tree and check_lint.sh's snapshot cleanup. A new cgw_rm_tmpdir helper is now the only one: it deletes nothing unless the path is an existing directory named cgw-*, so an empty or wrong variable can never widen the delete. Marketplace scanners flag bare recursive deletes, and the standalone skill zips ship these files. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds three portable skills under agensi/ (gitignore-and-local-config, git-merge-conflict-resolution, safe-git-workflow) and scripts/dev/build_agensi.sh, which packages each into dist/agensi/<name>.zip with skill-relative script paths, drops sections for scripts it does not ship, defaults the packaged npx markdownlint fallback to off, and fails on frontmatter, portability, link and script checks. tests/integration/build_agensi.bats builds every skill and runs the packaged commit_enhanced.sh against a scratch repo. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The skip-ratchet check (tests/check_skipped_bats.sh) counts any line that starts with `skip` as unconditional, so the if/fi form failed Validate Branch State. Use the `cond || skip` form the other suites use; behaviour is the same. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merging development carried them into the released v0.22.2 section, which shipped without them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
v0.22.0 made undo_last.sh amend-message apply the subject hard cap and refuse a non-conventional message under --non-interactive. Say so in the portable skill's commit-format and undo guidance. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jessesep
left a comment
There was a problem hiding this comment.
Verdict: do not merge until skill names are validated before deletion.
PR #80 forkni/claude-git-workflow, 15 files, base main.
Blocking - a skill argument can delete the output directory's parent.
_build_one() only checks whether agensi/<name> exists before passing the name to rm -rf.
The name .. passes that check, so --out <dir> .. requests deletion of <dir>/...
That can remove the repository or unrelated files, depending on the output path.
Fix: reject every selected name not in ALL_SKILLS before creating output or deleting anything.
Checked: full 15-file diff and pinned build script; an isolated run intercepted rm and confirmed its parent-directory target.
The intercepted command returned97 and stopped the script before deletion.
No real deletion or package upload was executed; the full packaging suite was not rerun.
|
Thanks for the review. The finding is correct. The fix is in 6c05156, and CI is green on it. Cause. What I reproduced. With a stub
A bare Fix.
Test. The new A note on the review text: the base branch of this PR is |
jessesep
left a comment
There was a problem hiding this comment.
Verdict: APPROVE — the unsafe-delete blocker is fixed.
PR #80 packages three existing Git skills; base is the default branch, main.
The earlier review covered all 15 files; this review covers all three changed files since that review.
The base is unchanged, so the earlier duplicate-work check still applies.
Resolved: unsafe skill names are rejected before any output or deletion.
Every selected name must exactly match the shipped skill list, with a second check inside the builder.
A bad name alongside a valid name also stops the entire build before output creation.
Verified: six isolated negative cases pass on this head and fail on the previous head.
Deletion was intercepted throughout those comparisons; no real deletion occurred.
All three archives built from exact, pinned source inputs and passed ZIP integrity and path checks.
All nine GitHub checks are successful on this head.
The Bats executable is unavailable locally; equivalent negative checks ran locally, rather than claiming a local Bats run.
No blocking findings remain in the reviewed diff.
Resolve the CHANGELOG conflict: keep the Agensi entries under Unreleased, above the new v0.23.1 and v0.23.0 sections. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Resolve the CHANGELOG conflict: keep the Agensi entries under Unreleased, above the new v0.23.2 section. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Resolve the CHANGELOG conflict: keep the Agensi entries under Unreleased, above the new v0.23.3 section. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
v0.23.3 added the three types to commit_enhanced.sh, which the skill ships. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Resolve the CHANGELOG conflict: keep the Agensi entries under Unreleased, above the new v0.24.0 section. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
v0.24.0 documents branch_switch.sh in wrapper-recipes.md, which the skill ships, so the build failed its documented-script check. The script needs only _common.sh, so the skill now ships it (25 scripts) and lists it in its operations table. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…kill-zips Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Resolve the CHANGELOG conflict: keep the Agensi entries under Unreleased, above the new v0.25.0 section. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…into feat/agensi-skill-zips Resolve the CHANGELOG conflict: keep the Agensi entries under Unreleased, above v0.25.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…flow The skill ships commit_enhanced.sh, which now takes the body as flags. Add both to the flags table and a short note to the commit-format section. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…si-skill-zips Resolve the CHANGELOG conflict: keep the Agensi entries under Unreleased, above v0.26.2. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…kflow Mirror the autosquash rule from the canonical skill, without the pre-push hook, which the Agensi zip does not ship. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Before: the toolkit installs only as a Claude Code skill. The hooks, slash command and
.claude/paths are part of that install, so it can't be listed as a portable Agent Skill that any agent readingSKILL.mdcan load.After:
bash scripts/dev/build_agensi.shbuilds three self-contained skill zips intodist/agensi/(gitignored):gitignore-and-local-config,git-merge-conflict-resolutionandsafe-git-workflow. Each zip holds one<name>/SKILL.mdfolder that uses onlynameanddescriptionfrontmatter, so the same zip works in Claude Code, Codex, Cursor, Copilot and other agents.The two knowledge-only skills ship a SKILL.md and edited copies of their canonical references.
safe-git-workflowships 25 scripts, 5 references andassets/cgw.conf.example, with./scripts/git/paths rewritten to<skill-dir>/scripts/. Its packaged_config.shdefaultsCGW_MARKDOWNLINT_NPX_FALLBACKto 0, so a downloaded skill never fetches an npm package on its own.How:
agensi/holds the sources and a README that covers the build, its checks and the portable copies to keep in sync.The build drops sections about scripts it doesn't ship, points links to unshipped references at their GitHub copies, and normalises permissions. It fails on any of these:
bash -n--list(checked before any output or delete)It also lists commonly scanned patterns for a human to review.
A separate commit adds
cgw_rm_tmpdirto_lib_lint.sh. The helper only deletescgw-*temp directories, and the lint temp-dir deletes in_lib_lint.shandcheck_lint.shnow go through it. It has 3 unit tests.Kept current with
developmentthrough v0.26.2 and the Dec 2 log-folder and fixup-subject changes:developmentis merged in.safe-git-workflowSKILL.md notes thatundo_last.sh amend-messagenow applies the subject hard cap and, with--non-interactive, refuses a non-conventional message.build:,ci:andrevert:types that v0.23.3 added tocommit_enhanced.sh.branch_switch.shinwrapper-recipes.md, which the skill ships, so the build's documented-script check failed. The script needs only_common.sh, sosafe-git-workflownow ships it and lists it in its operations table.index.lockfix in_lib_lock.shrides in the shipped copy; theconfigure.shandsync_cgw_tooling.shfixes are in scripts the zips don't ship.--body,--body-file) are documented in the skill's commit-format section and flags table.fixup!,squash!andamend!subjects pass, and that a fixup commit is folded withrebase_safe.sh --autosquashbefore it reaches a shared branch. The pre-push hook part is left out, since the zip doesn't ship hooks.CGW_LOG_DIRand the v0.26.x script fixes ride in the shipped scripts and the copiedscript-reference.md.create_pr.sh(v0.25.0) isn't shipped.worktree_manage.shandmerge_pr.sharen't shipped, the typecheck and hook-compare changes ride in the shipped_lib_lint.sh,_config.shand_common.sh, and the skill description changes are toskill/SKILL.md, which the build doesn't read.Testing:
tests/integration/build_agensi.batshas 7 tests. They build every skill, check each zip's layout and the packaged config, and run the packagedcommit_enhanced.shagainst a scratch repo.tests/integration/build_agensi_args.batshas 6 tests for rejected skill names.On the current tree, these pass locally:
build_agensifilesCI runs the full set on this PR.
Generated by Claude Code