argv[1] is this plugin root: Cursor writes it into the command text when it loads the plugin.
Show Skill Finder's most recent per-prompt routing decision from its Cursor stage log.
Works with
claude-code (native)
Content
Run this plugin's own compass_ctl.py helper with the Shell tool and show its output verbatim so the user can see whether Skill Finder selected skills or abstained on the most recent prompt. The helper is resolved only from this plugin's install folder, never by searching plugin caches. Append any arguments the user supplied after /compass-last (for example --count 3 or --json) after the quoted plugin root.
python3 -c '
import json, os, stat, subprocess, sys
from pathlib import Path
NAME = "nvidia-skills"
# argv[1] is this plugin root: Cursor writes it into the command text when it loads the plugin.
# When it is empty (an older Cursor), only the fixed local install folder is tried; caches are never searched.
given = sys.argv[1].strip() if len(sys.argv) > 1 else ""
home = Path(os.environ.get("CURSOR_CONFIG_DIR", "").strip() or (Path.home() / ".cursor")).expanduser()
root = Path(given) if given else home / "plugins" / "local" / NAME
script = root / "scripts" / "compass_ctl.py"
try:
manifest = json.loads((root / ".cursor-plugin" / "plugin.json").read_text(encoding="utf-8"))
ok = root.is_absolute() and manifest.get("name") == NAME and stat.S_ISREG(os.lstat(script).st_mode)
except (OSError, ValueError, AttributeError):
ok = False
if not ok:
sys.exit("compass_ctl.py not found in the nvidia-skills plugin root %s; reinstall the plugin" % root)
raise SystemExit(subprocess.call([sys.executable, str(script), "last", *sys.argv[2:]]))
' "${CURSOR_PLUGIN_ROOT}"Source and license
- Source
- NVIDIA Skills
- Original
- NVIDIA/skills/plugins/nvidia-skills/cursor/commands/compass-last.md
- License
- Apache-2.0 AND CC-BY-4.0