AgentSkillsCN

versions

在安装软件包之前,务必先核对版本号。关键——自动调用: - 即将安装任何软件包时(如 bun add、npm install); - 用户询问“最新版本”、“更新软件包”; - 在使用任何库进行开发之前。 务必牢记:切勿在未核对版本号的情况下随意安装软件包。

SKILL.md
--- frontmatter
name: versions
description: |
  Check package versions before installing. CRITICAL - AUTO-INVOKE when:
  - About to install any package (bun add, npm install)
  - User asks about "latest version", "update package"
  - Before implementing with any library

  MANDATORY: Never install packages without checking version first.
allowed-tools: [Bash]

Package Version Checker

CRITICAL: Always check latest version before installing ANY package.

Check Version

bash
# Check latest version
bun info <package>

# Examples
bun info gsap
bun info lenis
bun info @react-three/fiber
bun info framer-motion

Install with Version

bash
# Install latest
bun add gsap@latest

# Install specific version
bun add gsap@3.12.5

Check Darkroom Package Versions

bash
# Lenis (smooth scroll)
bun info lenis

# Hamo (performance hooks)
bun info hamo

# Tempus (RAF management)
bun info tempus

Check Outdated Packages

bash
# List outdated packages in project
bun outdated

Why This Matters

  1. Security - Old versions may have vulnerabilities
  2. Features - Latest versions have new APIs
  3. Compatibility - Mismatched versions cause issues
  4. Training data - Your knowledge may be outdated

Workflow

  1. Check version - bun info <package>
  2. Fetch docs - Use context7 for current documentation
  3. Install - bun add <package>@latest
  4. Verify - Check package.json has correct version

Output

Report:

  • Package: Name
  • Latest version: Current release
  • Your version: What's in package.json (if applicable)
  • Action: Install/update recommendation