# Upgrade > Actualiza el plugin NotFair a la última versión: actualiza el repo del marketplace, instala la nueva versión en la caché y actualiza installed_plugins.json. Fuente: https://skillsagentes.com/skills/nowork-studio/notfair-plugin/upgrade Markdown: https://skillsagentes.com/skills/nowork-studio/notfair-plugin/upgrade.md Repositorio: https://github.com/nowork-studio/notfair-plugin Autor: nowork-studio Licencia: MIT Actualizado: hace 3 meses Coste de contexto: 82 tok instalada, 1.4k tok al activarse, 1.8k tok con todos los archivos del bundle Bundle: 2 archivos, 7 KB Permisos que pide: bash, read, askuserquestion ## Instalación Un skill son archivos markdown: los mismos archivos valen para cualquier agente y lo único que cambia es el directorio de destino, es decir la bandera `--agent`. Añade `-g` para instalarlo en todos los proyectos de la máquina. ```bash # Claude Code npx -y skills add nowork-studio/notfair-plugin --skill notfair-upgrade-skill --agent claude-code # Cursor npx -y skills add nowork-studio/notfair-plugin --skill notfair-upgrade-skill --agent cursor # Codex npx -y skills add nowork-studio/notfair-plugin --skill notfair-upgrade-skill --agent codex # Gemini CLI npx -y skills add nowork-studio/notfair-plugin --skill notfair-upgrade-skill --agent gemini # Windsurf npx -y skills add nowork-studio/notfair-plugin --skill notfair-upgrade-skill --agent windsurf # Cline npx -y skills add nowork-studio/notfair-plugin --skill notfair-upgrade-skill --agent cline ``` ## Qué hace - Actualiza el repositorio de marketplace de NotFair y crea un nuevo directorio versionado en la caché de plugins - Actualiza installed_plugins.json con la nueva versión, ruta e info de git - Limpia versiones antiguas de la caché conservando la más reciente y cualquier symlink 'dev' - Lee CHANGELOG.md y resume los cambios entre versiones en 3-7 bullets orientados al usuario - Detecta symlinks de desarrollo y detiene la actualización si el plugin está instalado en modo dev ## Cuándo usarla - El usuario pide 'upgrade notfair', 'update notfair' o 'get latest version' - Otro skill detecta UPGRADE_AVAILABLE al iniciar y hay que manejar el aviso de actualización inline ## Cuándo no - El plugin está instalado como symlink 'dev' que apunta al código fuente local ## Qué la activa - "Actualiza el plugin NotFair a la última versión" - "/notfair:upgrade" - "¿Hay una nueva versión de NotFair disponible?" ## Antes de instalar - Requiere el repositorio de marketplace clonado con git en ~/.claude/plugins/marketplaces/nowork-studio y acceso a Bash/Python3. - Necesita en el PATH: git, python3 - Variables de entorno: CACHE_DIR, GIT_SHA, INSTALLED_DIR, MARKETPLACE_DIR, NEW_CACHE_DIR, NEW_VERSION, OLD_VERSION - runs shell commands - reads environment config ## Archivos - SKILL.md — 6 KB - evals/evals.json — 1 KB ## SKILL.md Reproducido tal cual desde nowork-studio/notfair-plugin bajo MIT. Esta sección es el documento original y está en inglés. # /notfair:upgrade Upgrade the NotFair plugin to the latest version and show what's new. ## Key paths | What | Path | |------|------| | Marketplace repo | `~/.claude/plugins/marketplaces/nowork-studio/` | | Plugin cache | `~/.claude/plugins/cache/nowork-studio/notfair//` | | Installed plugins | `~/.claude/plugins/installed_plugins.json` | | Update state | `~/.toprank/` (intentionally preserved — see CHANGELOG 0.24.0) | --- ## Inline upgrade flow This section is used when a skill preamble outputs `UPGRADE_AVAILABLE`. ### Step 1: Auto-upgrade Log "Upgrading NotFair v{old} → v{new}..." and proceed to Step 2. --- ### Step 2: Detect current install First check for dev symlink (see "Dev symlink detection" section). If detected, stop — do not upgrade. ```bash # Find the currently installed plugin path INSTALLED_DIR=$(ls -d ~/.claude/plugins/cache/nowork-studio/notfair/*/ 2>/dev/null | grep -v '.bak' | head -1) if [ -z "$INSTALLED_DIR" ]; then echo "ERROR: NotFair plugin not found in cache"; exit 1 fi MARKETPLACE_DIR="$HOME/.claude/plugins/marketplaces/nowork-studio" if [ ! -d "$MARKETPLACE_DIR/.git" ]; then echo "ERROR: marketplace repo not found at $MARKETPLACE_DIR"; exit 1 fi echo "Current install: $INSTALLED_DIR" echo "Marketplace repo: $MARKETPLACE_DIR" ``` ### Step 3: Save old version ```bash OLD_VERSION=$(cat "$INSTALLED_DIR/VERSION" 2>/dev/null | tr -d '[:space:]' || echo "unknown") ``` ### Step 4: Update marketplace repo and install ```bash cd "$MARKETPLACE_DIR" git fetch origin git reset --hard origin/main NEW_VERSION=$(cat VERSION | tr -d '[:space:]') GIT_SHA=$(git rev-parse HEAD) # Create new versioned cache directory NEW_CACHE_DIR="$HOME/.claude/plugins/cache/nowork-studio/notfair/$NEW_VERSION" if [ -d "$NEW_CACHE_DIR" ]; then rm -rf "$NEW_CACHE_DIR" fi mkdir -p "$NEW_CACHE_DIR" # Copy plugin files (exclude .git to save space) rsync -a --exclude='.git' "$MARKETPLACE_DIR/" "$NEW_CACHE_DIR/" ``` If the copy fails, warn: "Upgrade failed — the old version is still active. Run `/notfair:upgrade` manually." and stop. ### Step 5: Update installed_plugins.json Read `~/.claude/plugins/installed_plugins.json`, then update the `notfair@nowork-studio` entry: ```bash python3 -c " import json, os from datetime import datetime, timezone path = os.path.expanduser('~/.claude/plugins/installed_plugins.json') with open(path) as f: data = json.load(f) data['plugins']['notfair@nowork-studio'] = [{ 'scope': 'user', 'installPath': os.path.expanduser('~/.claude/plugins/cache/nowork-studio/notfair/$NEW_VERSION'), 'version': '$NEW_VERSION', 'installedAt': data['plugins'].get('notfair@nowork-studio', [{}])[0].get('installedAt', datetime.now(timezone.utc).isoformat()), 'lastUpdated': datetime.now(timezone.utc).isoformat(), 'gitCommitSha': '$GIT_SHA' }] with open(path, 'w') as f: json.dump(data, f, indent=4) print('Updated installed_plugins.json: notfair@nowork-studio -> v$NEW_VERSION') " ``` ### Step 6: Clean up old cache versions Remove old versioned cache directories (keep only the new one). Never remove a `dev` symlink: ```bash for dir in ~/.claude/plugins/cache/nowork-studio/notfair/*/; do ver=$(basename "$dir") if [ "$ver" != "$NEW_VERSION" ] && [ "$ver" != "dev" ]; then rm -rf "$dir" echo "Removed old cache: $ver" fi done ``` ### Step 7: Write marker + clear update state ```bash mkdir -p ~/.toprank echo "$OLD_VERSION" > ~/.toprank/just-upgraded-from rm -f ~/.toprank/last-update-check rm -f ~/.toprank/update-snoozed ``` ### Step 8: Show What's New Read `$NEW_CACHE_DIR/CHANGELOG.md`. Find all version entries between the old version and the new version. Summarize as 3-7 bullets grouped by theme — focus on user-facing changes, skip internal refactors. Format: ``` NotFair v{new} — upgraded from v{old}! What's new: - [bullet 1] - [bullet 2] - ... The new version will be fully active on your next Claude Code session. ``` ### Step 9: Continue After showing What's New, continue with whatever skill the user originally invoked. --- ## Dev symlink detection Before upgrading, check if the installed cache directory is a symlink named `dev`: ```bash CACHE_DIR=$(ls -d ~/.claude/plugins/cache/nowork-studio/notfair/*/ 2>/dev/null | head -1) if [ -L "${CACHE_DIR%/}" ] && [ "$(basename "$CACHE_DIR")" = "dev" ]; then echo "DEV_SYMLINK" fi ``` If `DEV_SYMLINK`: tell the user "NotFair is installed as a dev symlink — it always points to your local source (v$(cat "$CACHE_DIR/VERSION" 2>/dev/null | tr -d '[:space:]')). No upgrade needed." and **stop**. Do not proceed with Steps 2–8. --- ## Standalone usage When invoked directly as `/notfair:upgrade`: 1. Check for dev symlink (see "Dev symlink detection" above). If detected, stop. 2. Force a fresh update check (bypass cache and snooze): ```bash _UPD_BIN=$(ls ~/.claude/plugins/cache/nowork-studio/notfair/*/bin/notfair-update-check 2>/dev/null | head -1) [ -n "$_UPD_BIN" ] && _UPD=$("$_UPD_BIN" --force 2>/dev/null || true) || _UPD="" echo "$_UPD" ``` 3. If `UPGRADE_AVAILABLE `: follow Steps 2–8 above. 4. If no `UPGRADE_AVAILABLE` output: tell the user "You're already on the latest version (v{LOCAL})." ## Dónde encaja - Categoría: [Herramientas para desarrolladores](https://skillsagentes.com/categorias/herramientas-desarrollo.md) — Skills que cambian cómo tu agente escribe, revisa y despliega código. - Creador: [nowork-studio](https://skillsagentes.com/creators/nowork-studio.md) — 45 skills en el directorio - [Todas las skills](https://skillsagentes.com/skills.md) - [Ranking de instalaciones](https://skillsagentes.com/ranking.md) ## Otras skills del mismo repositorio - [Meta Ads Audit](https://skillsagentes.com/skills/nowork-studio/notfair-plugin/meta-ads-audit.md): Auditoría de salud de cuenta de Meta Ads (Facebook + Instagram) y configuración del contexto de negocio. - [Google Ads Audit](https://skillsagentes.com/skills/nowork-studio/notfair-plugin/google-ads-audit.md): Auditoría del estado de la cuenta de Google Ads y configuración del contexto de negocio, para auditorías de salud de cuenta y onboarding en NotFair. - [Paid Ads](https://skillsagentes.com/skills/nowork-studio/notfair-plugin/paid-ads.md): Coordina trabajo de medios pagados seguro y basado en evidencia en Google Ads, Meta Ads, X Ads, LinkedIn Ads, TikTok, Amazon y ChatGPT Ads, enrutando a la skill correcta de NotFair. - [Google Ads Assets](https://skillsagentes.com/skills/nowork-studio/notfair-plugin/google-ads-assets.md): Planea, valida y publica de forma segura assets de Google Ads: sitelinks, callouts, structured snippets, image assets y briefs de assets para Performance Max. - [Paid Ads Launch](https://skillsagentes.com/skills/nowork-studio/notfair-plugin/paid-ads-launch.md): Planifica y prepara una nueva campaña de paid-media o test cross-channel antes de gastar presupuesto, en cualquier plataforma soportada. --- Skills Agentes · [Índice de páginas en markdown](https://skillsagentes.com/sitemap.md) · [Inicio](https://skillsagentes.com/index.md)