| name | radisha-update |
| description | Update radisha skills to the latest version - works with symlinks, git clones, and submodules |
Update Radisha
Use this skill when the user asks to update radisha skills.
Overview
Default Repository: https://github.com/ROCm/rocprofiler-systems-skills.git
Auto-Update: On first skill invocation in a session, radisha automatically checks for updates and pulls the latest version before executing any skill. This ensures you always have the latest skills.
Radisha can be installed in different ways:
- Symlink -
~/.claude/skills or .cursor/skills points to radisha repo
- Git clone - Radisha cloned directly into skills folder
- Git submodule - Radisha added as submodule
- Copy - Files copied (no git, cannot auto-update)
Update Process
┌─────────────────────────────────────────────────────────────────┐
│ User asks to update radisha │
└─────────────────────────────────────────────────────────────────┘
│
▼
┌───────────────────────┐
│ Phase 1: Detect Setup │
│ - Find skills location│
│ - Check if symlink │
│ - Check if git repo │
└───────────────────────┘
│
▼
┌───────────────────────┐
│ Phase 2: Update │
│ - Pull latest changes │
│ - Handle conflicts │
└───────────────────────┘
│
▼
┌───────────────────────┐
│ Phase 3: Update │
│ Project Files │
│ - CLAUDE.md │
│ - .cursorrules │
└───────────────────────┘
│
▼
┌───────────────────────┐
│ Phase 4: Report │
│ - Show what changed │
│ - List new skills │
└───────────────────────┘
Phase 1: Detect Setup
Find Skills Location
Check these locations in order:
if [ -L ~/.claude/skills ]; then
RADISHA_PATH=$(readlink -f ~/.claude/skills)
echo "Symlink found: ~/.claude/skills -> $RADISHA_PATH"
elif [ -d ~/.claude/skills ]; then
RADISHA_PATH=~/.claude/skills
echo "Direct install: $RADISHA_PATH"
elif [ -L .cursor/skills/radisha ]; then
RADISHA_PATH=$(readlink -f .cursor/skills/radisha)
echo "Symlink found: .cursor/skills/radisha -> $RADISHA_PATH"
elif [ -d .cursor/skills/radisha ]; then
RADISHA_PATH=.cursor/skills/radisha
echo "Direct install: $RADISHA_PATH"
elif [ -d ~/.cursor/skills/radisha ]; then
RADISHA_PATH=~/.cursor/skills/radisha
echo "User install: $RADISHA_PATH"
fi
Check if Git Repo
cd "$RADISHA_PATH" && git status >/dev/null 2>&1
if [ $? -eq 0 ]; then
echo "Git repository detected"
git remote -v
else
echo "Not a git repository - cannot auto-update"
fi
Phase 2: Update Skills
Standard Update (no local changes)
cd "$RADISHA_PATH"
git fetch origin
echo "Changes to be pulled:"
git log --oneline HEAD..origin/main
git pull origin main
If Local Changes Exist
If git status shows uncommitted changes:
**Local changes detected in radisha:**
[show git status output]
**Options:**
1. **Stash and update** - Temporarily save changes, update, restore
2. **Reset to remote** - Discard local changes, match remote exactly
3. **Cancel** - Don't update, keep current state
Which option?
Use AskUserQuestion tool to let user choose.
Option 1: Stash and update
git stash
git pull origin main
git stash pop
Option 2: Reset to remote
git fetch origin
git reset --hard origin/main
If Conflicts Occur
git status
echo "Conflicts detected in:"
git diff --name-only --diff-filter=U
Ask user how to resolve.
Phase 3: Update Project Files
After updating skills, check if project files need updating.
Find Radisha Repo Root
The radisha repo root is the parent of the skills directory:
if [ -L ~/.claude/skills ]; then
RADISHA_REPO=$(dirname "$(readlink -f ~/.claude/skills)")
else
RADISHA_REPO=$(dirname "$RADISHA_PATH")
fi
Check for Project Files
If the current project has CLAUDE.md or .cursorrules, offer to update them:
if [ -f "CLAUDE.md" ]; then
if ! diff -q "CLAUDE.md" "$RADISHA_REPO/CLAUDE.md" >/dev/null 2>&1; then
echo "CLAUDE.md differs from latest version"
fi
fi
if [ -f ".cursorrules" ]; then
if ! diff -q ".cursorrules" "$RADISHA_REPO/.cursorrules" >/dev/null 2>&1; then
echo ".cursorrules differs from latest version"
fi
fi
Offer to Update
Use AskUserQuestion to ask:
{
"questions": [{
"question": "Project files differ from latest radisha. Update them?",
"header": "Update files",
"options": [
{"label": "Update both", "description": "Update CLAUDE.md and .cursorrules to latest"},
{"label": "Update CLAUDE.md only", "description": "Only update Claude Code rules"},
{"label": "Update .cursorrules only", "description": "Only update Cursor rules"},
{"label": "Skip", "description": "Keep current project files"}
],
"multiSelect": false
}]
}
Apply Updates
cp "$RADISHA_REPO/CLAUDE.md" "CLAUDE.md"
cp "$RADISHA_REPO/.cursorrules" ".cursorrules"
Phase 4: Report
Show What Changed
git log --oneline HEAD@{1}..HEAD 2>/dev/null || echo "Fresh pull"
git diff --stat HEAD@{1}..HEAD 2>/dev/null
Check for New Skills
find "$RADISHA_PATH" -name "SKILL.md" -type f | \
sed 's|/SKILL.md||' | \
sed "s|$RADISHA_PATH/||"
Report Format
## Radisha Updated Successfully
**Location:** [path]
**Previous:** [commit hash before]
**Current:** [commit hash after]
### Commits Pulled
- [commit 1]
- [commit 2]
- [commit 3]
### Files Changed
- [file 1]
- [file 2]
### Project Files Updated
- [x] CLAUDE.md
- [x] .cursorrules
### Available Skills
[List all skills currently available]
Execution Script
Complete script to run:
#!/bin/bash
RADISHA_PATH=""
if [ -L ~/.claude/skills ]; then
RADISHA_PATH=$(readlink -f ~/.claude/skills)
elif [ -d ~/.claude/skills/.git ]; then
RADISHA_PATH=~/.claude/skills
elif [ -L .cursor/skills/radisha ]; then
RADISHA_PATH=$(readlink -f .cursor/skills/radisha)
elif [ -d .cursor/skills/radisha/.git ]; then
RADISHA_PATH=.cursor/skills/radisha
elif [ -d ~/.cursor/skills/radisha/.git ]; then
RADISHA_PATH=~/.cursor/skills/radisha
fi
if [ -z "$RADISHA_PATH" ]; then
echo "ERROR: Could not find radisha installation"
exit 1
fi
echo "Found radisha at: $RADISHA_PATH"
cd "$RADISHA_PATH"
if ! git status >/dev/null 2>&1; then
echo "ERROR: Not a git repository, cannot update"
exit 1
fi
if ! git diff --quiet || ! git diff --cached --quiet; then
echo "WARNING: Local changes detected"
git status --short
exit 1
fi
BEFORE=$(git rev-parse HEAD)
git fetch origin
git pull origin main
AFTER=$(git rev-parse HEAD)
if [ "$BEFORE" = "$AFTER" ]; then
echo "Already up to date"
else
echo "Updated from $BEFORE to $AFTER"
echo ""
echo "Changes:"
git log --oneline $BEFORE..$AFTER
fi
Common Issues
| Issue | Solution |
|---|
| "Not a git repository" | Radisha was copied, not cloned. Re-clone from https://github.com/ROCm/rocprofiler-systems-skills.git |
| "Permission denied" | Check file permissions on skills directory |
| "Merge conflicts" | Ask user to resolve or reset to remote |
| "Symlink broken" | Re-create symlink to radisha repo |
| "Cannot find radisha" | Check all possible locations, ask user |
Manual Installation Options
If radisha is not installed or needs fresh install:
Claude Code (recommended: symlink)
git clone https://github.com/ROCm/rocprofiler-systems-skills.git ~/work/radisha
ln -sf ~/work/radisha-skills ~/.claude/skills
cp ~/work/radisha/CLAUDE.md .
cp ~/work/radisha/.cursorrules .
Cursor (recommended: symlink)
git clone https://github.com/ROCm/rocprofiler-systems-skills.git ~/work/radisha
ln -sf ~/work/radisha-skills .cursor/skills/radisha
ln -sf ~/work/radisha-skills ~/.cursor/skills/radisha
cp ~/work/radisha/.cursorrules .
Using Install Script
The easiest way to install or update:
cd ~/work/radisha
./install.sh
curl -fsSL https://raw.githubusercontent.com/ROCm/rocprofiler-systems-skills/main/install.sh | bash