Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/skills-drift.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: skills-drift

# Fails if the vendored shared skills (skills/opik, skills/agent-ops) have drifted
# from the source of truth (comet-ml/opik-mcp) at the pinned CANON_REF.
# No-ops while CANON_REF is UNPINNED (OPIK-7471, until skills land in opik-mcp).

on:
pull_request:
paths: ["skills/**", "scripts/sync-shared-skills.sh", ".github/workflows/skills-drift.yml"]
push:
branches: [main]

jobs:
drift:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Re-vendor and check for drift
run: |
bash scripts/sync-shared-skills.sh
if ! git diff --quiet -- skills; then
echo "::error::Vendored shared skills differ from source (comet-ml/opik-mcp)."
echo "Run 'CANON_REF=<ref> bash scripts/sync-shared-skills.sh' and commit the result."
git --no-pager diff --stat -- skills
exit 1
fi
echo "no drift"
38 changes: 38 additions & 0 deletions scripts/sync-shared-skills.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/usr/bin/env bash
# Vendor the shared Opik skills from the canonical source (OPIK-7471).
#
# Source of truth: comet-ml/opik-mcp (src/opik_mcp/skills). The skills listed in
# SHARED are OWNED THERE — do not hand-edit them in this repo; edit the source
# and re-sync. This repo keeps its own non-shared assets (commands/, agents/,
# hooks/, the logger).
#
# Usage: CANON_REF=<commit-or-tag> bash scripts/sync-shared-skills.sh
set -euo pipefail

CANON_REPO="${CANON_REPO:-https://github.com/comet-ml/opik-mcp.git}"
CANON_REF="${CANON_REF:-UNPINNED}" # bump to a canonical commit/tag to actually sync
SRC="src/opik_mcp/skills" # skills path within opik-mcp
DEST="skills"
SHARED=(opik evaluate)

if [ "$CANON_REF" = "UNPINNED" ]; then
echo "CANON_REF is UNPINNED — set it to an opik-mcp ref once the skills have landed"
echo "there (OPIK-7471, opik-mcp#154). Nothing to sync yet; exiting cleanly."
exit 0
fi

tmp="$(mktemp -d)"
trap 'rm -rf "$tmp"' EXIT
git clone --quiet "$CANON_REPO" "$tmp"
git -C "$tmp" checkout --quiet "$CANON_REF"

for s in "${SHARED[@]}"; do
if [ ! -d "$tmp/$SRC/$s" ]; then
echo "skip '$s' — not yet in opik-mcp@$CANON_REF"
continue
fi
rm -rf "${DEST:?}/$s"
cp -R "$tmp/$SRC/$s" "$DEST/$s"
echo "synced $s"
done
echo "Done. Vendored ${SHARED[*]} from opik-mcp@$CANON_REF"
13 changes: 13 additions & 0 deletions skills/SHARED.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Shared skills are vendored — don't hand-edit them

`skills/opik/` and `skills/agent-ops/` are **vendored from the source of truth**,
`comet-ml/opik-mcp` (`src/opik_mcp/skills`, OPIK-7471). Do not edit them here —
edit them in `opik-mcp` and re-sync:

```bash
CANON_REF=<commit-or-tag> bash scripts/sync-shared-skills.sh
```

A CI drift check (`.github/workflows/skills-drift.yml`) fails if these directories
diverge from the pinned source ref. This repo still owns everything else:
`commands/`, `agents/`, `hooks/`, and the session logger.
106 changes: 0 additions & 106 deletions skills/agent-ops/SKILL.md

This file was deleted.

Loading
Loading