agentleFS
ROCmROCm/rocprofiler-systems-skills/skills/radisha-update/SKILL.md

radisha-update

Skill5 starsChanged 17 days agoMITView on GitHub

Update radisha skills to the latest version - works with symlinks, git clones, and submodules

  • Pipes a download into a shell
  • Deletes or force-pushes

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 6 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill when the user asks to update radisha skills.

    line 8
  2. Distinctive:

    Check these locations in order:

    line 64
  3. Distinctive:

    If git status shows uncommitted changes:

    line 119
  4. Very specific:

    Use AskUserQuestion tool to let user choose.

    line 136
  5. Distinctive:

    Ask user how to resolve.

    line 162
  6. Distinctive:

    After updating skills, check if project files need updating.

    line 166
  7. Very specific:

    If the current project has CLAUDE.md or .cursorrules, offer to update them:

    line 183
  8. Very specific:

    Use AskUserQuestion to ask:

    line 202
  9. Distinctive:

    If radisha is not installed or needs fresh install:

    line 348

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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:

# 1. Check if ~/.claude/skills is a symlink (Claude Code)
if [ -L ~/.claude/skills ]; then
    RADISHA_PATH=$(readlink -f ~/.claude/skills)
    echo "Symlink found: ~/.claude/skills -> $RADISHA_PATH"
# 2. Check if ~/.claude/skills exists (Claude Code direct)
elif [ -d ~/.claude/skills ]; then
    RADISHA_PATH=~/.claude/skills
    echo "Direct install: $RADISHA_PATH"
# 3. Check project .cursor/skills (Cursor)
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"
# 4. Check user .cursor/skills (Cursor global)
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"

# Fetch and show what will change
git fetch origin
echo "Changes to be pulled:"
git log --oneline HEAD..origin/main

# Pull changes
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

# After stash pop, if conflicts:
git status  # Show conflicted files

# Report to user
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 symlink
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:

# Check if project has outdated files
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

# Update CLAUDE.md
cp "$RADISHA_REPO/CLAUDE.md" "CLAUDE.md"

# Update .cursorrules
cp "$RADISHA_REPO/.cursorrules" ".cursorrules"

Phase 4: Report

Show What Changed

# Show commits pulled
git log --oneline HEAD@{1}..HEAD 2>/dev/null || echo "Fresh pull"

# Show changed files
git diff --stat HEAD@{1}..HEAD 2>/dev/null

Check for New Skills

# List all skill directories
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

# Detect radisha location
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"

# Check if git repo
if ! git status >/dev/null 2>&1; then
    echo "ERROR: Not a git repository, cannot update"
    exit 1
fi

# Check for local changes
if ! git diff --quiet || ! git diff --cached --quiet; then
    echo "WARNING: Local changes detected"
    git status --short
    exit 1  # Let AI handle with user interaction
fi

# Fetch and update
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

IssueSolution
"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)

# Clone radisha repo
git clone https://github.com/ROCm/rocprofiler-systems-skills.git ~/work/radisha

# Create symlink
ln -sf ~/work/radisha-skills ~/.claude/skills

# Copy project files
cp ~/work/radisha/CLAUDE.md .
cp ~/work/radisha/.cursorrules .

Cursor (recommended: symlink)

# Clone radisha repo
git clone https://github.com/ROCm/rocprofiler-systems-skills.git ~/work/radisha

# Create symlink for project
ln -sf ~/work/radisha-skills .cursor/skills/radisha

# Or global
ln -sf ~/work/radisha-skills ~/.cursor/skills/radisha

# Copy project files
cp ~/work/radisha/.cursorrules .

Using Install Script

The easiest way to install or update:

# From existing clone
cd ~/work/radisha
./install.sh

# Or one-liner from GitHub
curl -fsSL https://raw.githubusercontent.com/ROCm/rocprofiler-systems-skills/main/install.sh | bash

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.