Skip to content

ci: add sync-skills workflow - #1806

Merged
ko3n1g merged 3 commits into
mainfrom
ko3n1g/ci/sync-skills
Apr 15, 2026
Merged

ko3n1g merged 3 commits into
mainfrom
ko3n1g/ci/sync-skills

Conversation

@ko3n1g

@ko3n1g ko3n1g commented Apr 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This PR adds .github/workflows/sync-skills.yml, which keeps agent-tool directories in sync whenever the skills/ directory or AGENTS.md changes on main.

What the workflow does:

  • Triggers on push to main when skills/** or AGENTS.md is modified (also available via workflow_dispatch)
  • Symlinks skills/ → .claude/skills and .agents/skills so both Claude Code and the Agents framework discover the same skill guides
  • Symlinks AGENTS.md → CLAUDE.md so Claude Code picks up the project's agent instructions automatically
  • Commits and pushes the resulting symlinks back to the branch (no-ops if nothing changed)

Background

There is no common standard for markdown file discovery across agent frameworks — each tool looks in a different place. This PR addresses that gap by coupling the generic AGENTS.md / skills/ layout with a sync job that runs on push to main, so every agent runtime finds the files it expects without per-framework duplication.

Signed-off-by: oliver könig <okoenig@nvidia.com>
@ko3n1g
ko3n1g requested a review from a team as a code owner April 14, 2026 17:28
@greptile-apps

greptile-apps Bot commented Apr 14, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds .github/workflows/sync-skills.yml, a thin caller workflow that delegates to the reusable NVIDIA-NeMo/FW-CI-templates/_sync_skills.yml@v0.91.0 template. The file follows the established pattern used by every other reusable-workflow caller in the repo (same structure as cherry-pick-release-commit.yml, same secrets.PAT forwarding).

Confidence Score: 5/5

Safe to merge — the file is a minimal, well-patterned delegation to a versioned reusable workflow with no P0/P1 issues.

The only finding is a P2 suggestion to add a concurrency group to avoid potential push conflicts on rapid successive pushes. All other aspects of the file are consistent with the repo's established workflow conventions.

No files require special attention; the single changed file is straightforward.

Important Files Changed

Filename Overview
.github/workflows/sync-skills.yml New workflow that delegates to reusable _sync_skills.yml@v0.91.0 template; follows existing repo patterns but lacks a concurrency group, which could cause push conflicts if multiple commits land on main simultaneously.

Sequence Diagram

sequenceDiagram
    participant GH as GitHub (main branch)
    participant Caller as sync-skills.yml
    participant Template as _sync_skills.yml@v0.91.0
    participant Repo as Repository (main)

    GH->>Caller: push to main (skills/** or AGENTS.md changed) OR workflow_dispatch
    Caller->>Template: uses reusable workflow, secrets: PAT
    Template->>Repo: ln -s skills/ .claude/skills
    Template->>Repo: ln -s skills/ .agents/skills
    Template->>Repo: ln -s AGENTS.md CLAUDE.md (if exists)
    Template->>Repo: git commit and push symlinks back to main
Loading

Reviews (3): Last reviewed commit: "Merge branch 'main' into ko3n1g/ci/sync-..." | Re-trigger Greptile

Comment thread .github/workflows/sync-skills.yml Outdated
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add .claude/skills .agents/skills CLAUDE.md

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 git add CLAUDE.md fails when AGENTS.md is absent

The preceding step guards symlink creation with [ -f AGENTS.md ] && … || true, so when the workflow is triggered by a skills/** change only (and AGENTS.md has never been committed to the repo), CLAUDE.md is never created. The unconditional git add CLAUDE.md then exits with fatal: pathspec 'CLAUDE.md' did not match any files, aborting the whole step before the skills symlinks are committed.

Suggested change
git add .claude/skills .agents/skills CLAUDE.md
git add .claude/skills .agents/skills
[ -f CLAUDE.md ] && git add CLAUDE.md || true

Comment thread .github/workflows/sync-skills.yml Outdated
uses: actions/checkout@v4
with:
token: ${{ secrets.PAT }}
ref: ${{ github.head_ref || github.ref_name }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 github.head_ref is always empty for these event types

github.head_ref is only populated for pull_request events. For both push and workflow_dispatch (the only triggers here), it is always an empty string, so the || github.ref_name fallback is unconditional. The github.head_ref reference is dead code in this context and may confuse future readers.

Suggested change
ref: ${{ github.head_ref || github.ref_name }}
ref: ${{ github.ref_name }}

Signed-off-by: oliver könig <okoenig@nvidia.com>

This branch was previously deployed

2 inactive deployments
nemo-ci — 8c131ee2 Deployed Apr 15, 2026 by copy-pr-bot[bot] via L0_Unit_Test_GPU-audio #3899
test — 8c131ee2 Deployed Apr 15, 2026 by copy-pr-bot[bot] via cicd-wait-in-queue #3899
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.

2 participants