Skip to content

fix: stage skills before the change check in sync workflow#5

Merged
stefanjudis merged 1 commit into
mainfrom
fix-sync-untracked-files
Jun 24, 2026
Merged

fix: stage skills before the change check in sync workflow#5
stefanjudis merged 1 commit into
mainfrom
fix-sync-untracked-files

Conversation

@stefanjudis

Copy link
Copy Markdown
Collaborator

Bug

The Commit and push if changed step gated on git diff --quiet skills/. git diff (no --cached) only inspects tracked files, so a brand-new untracked file is invisible to it. The job reported "No skill changes" and exited before git add.

This is deterministic, not a caching/timing issue — re-running never helps. Practical effect: no skill that introduces a new file has ever synced. Only edits and deletions to already-tracked files propagated. (The recently-added playwright skill landed via PR, not the daily job — which is why this went unnoticed.)

Fix

Stage first, then gate on the staged diff (git diff --cached --quiet). The step already ran git add skills/ immediately before committing, so this just moves that line above the guard — the smallest correct change.

git add skills/
if git diff --cached --quiet skills/; then
  echo "No skill changes — nothing to commit."
  exit 0
fi
...
git commit -m "chore: sync skills"
git push

Test plan

  • Pre-commit hook (lint/format/typecheck) clean
  • Next scheduled run (or a manual workflow_dispatch) commits new files; CI logs confirm the staged-diff gate sees them

git diff (no --cached) ignores untracked files, so a brand-new file — a new
skill directory, or a new references/*.md — read as no change and the job
exited before git add. Only edits and deletions to already-tracked files
ever propagated. Stage first, then gate on the staged diff so new files are
seen.
@stefanjudis stefanjudis merged commit c6133e8 into main Jun 24, 2026
1 check passed
@stefanjudis stefanjudis deleted the fix-sync-untracked-files branch June 24, 2026 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant