# Update Skills

> Updates local Cursor skill repositories by pulling the latest changes from a remote GitHub repo. Use when syncing skills to the newest version; prefers the public Snyk-General-Support gemini-cli-support-skills repo when a private remote blocks scripts.

- Skill: `snyk-general-support/update-skills` (Agent Skill, multi-file: 3 files)
- Install (CLI): `npx skillmds@latest add snyk-general-support/update-skills`
- Raw SKILL.md: https://api.skillmd.com/api/skills/snyk-general-support/update-skills/raw
- Safety review: pending (external: skill-scanner PASS, skillspector WARNING)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: Snyk-General-Support (https://skillmd.com/u/snyk-general-support)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/snyk-general-support/update-skills

---


# Update Skills

This skill keeps your local skill repositories up to date by pulling the latest changes from a remote GitHub repository.

## Canonical skills repository (public)

Use the **public** repo so scripts work without access to a private organization:

| | |
|--|--|
| **Repo** | `Snyk-General-Support/gemini-cli-support-skills` |
| **HTTPS** | `https://github.com/Snyk-General-Support/gemini-cli-support-skills.git` |

Clone or point `origin` at that URL. Details: [references/remote.md](references/remote.md).

## Assumptions

- You have a **Git clone** of the skills repo locally (for example `~/Documents/Snyk/gemini-cli-support-skills`).
- `origin` points at GitHub (HTTPS or SSH).
- For **private** remotes only: set `GITHUB_TOKEN` or `GH_TOKEN`. **Public** remotes do not require a token.

## Configuration

- **Target directory (required):** local path to the skills repo → `SKILL_REPO`.
- **Optional:** `GIT_REMOTE_NAME` (default: `origin`).
- **Token (optional for public repos):** `GITHUB_TOKEN` or `GH_TOKEN`.
- **Install directory (optional):** where to sync skills into Cursor → `INSTALL_DIR` (default: `~/.cursor/skills`).

## Workflow

1. **Ensure `origin` uses the public repo** (if migrating from a private remote): see [references/remote.md](references/remote.md).
2. **Set `SKILL_REPO`** to your local clone path.
3. **Token:** export `GITHUB_TOKEN` only if `origin` is private or your environment requires auth.
4. **Run the update script:**

   ```bash
   chmod +x update/scripts/update_skills.sh
   SKILL_REPO=~/Documents/Snyk/gemini-cli-support-skills ./update/scripts/update_skills.sh
   ```

5. **Verify:** script prints branch, remote URL, fetch/pull result, and then syncs (installs/updates) any skills found as top-level directories containing a `SKILL.md`.

## Script location

- `update/scripts/update_skills.sh`

Behavior:

- Validates `SKILL_REPO` is a git repo.
- For **HTTPS** `https://github.com/...` without embedded credentials: if a token is set, temporarily sets `origin` to `https://TOKEN@github.com/...` for `fetch`/`pull`, then restores the original URL.
- If **no token** is set: runs normal `git fetch` / `git pull --ff-only` (works for **public** repos).
- Then syncs skills:
  - For each top-level directory under `SKILL_REPO` that contains a `SKILL.md`, copies/syncs that directory into `INSTALL_DIR`.
  - This ensures **newly added skills are installed** and existing ones are updated.

## References

- Remote URL, clone, and `git remote set-url`: [references/remote.md](references/remote.md)

