Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 74 additions & 0 deletions skills/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Konveyor CI Skills

This directory contains Claude Code skills for working with the Konveyor CI repository.

## Installation Convention

All skills in this repository can be installed using the standard installation script:

```bash
./skills/install.sh <skill-name>
```

For example:
```bash
./skills/install.sh konveyor-nightly-updater
```

The installation script will:
- Extract the skill to `.claude/skills/`
- Configure `.claude/settings.local.json` to enable the skill
- Verify the installation

**First-time setup:** If you don't have a `.claude/settings.local.json` file, the script will create one for you.

## Available Skills

### konveyor-nightly-updater.skill
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this duplicates the skill definition - may get out-of-sync in the future

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you referring to the .skill extantion or to the entire Available Skills section?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I referred to the entire Available Skills section. We might keep it as list of names and perhaps a brief summary but even then it will need to be updated with every skill added/removed.


Automates updating nightly CI workflows when a new Konveyor release is created.

**Use when:** Adding a new release nightly (e.g., release-0.9) and removing old releases (2 versions back).

**Example prompts:**
- "Update nightlies for release-0.9"
- "Add nightly for release-0.10 and remove release-0.8"

**What it does:**

**Automated changes in konveyor/ci:**
- Analyzes current releases and calculates what to add/remove
- Calculates cron schedules automatically (10 min after previous release)
- Creates new nightly workflow file
- Updates global-ci.yml with conditional blocks (both API and UI jobs)
- Updates README.md badge rows
- Deletes old nightly workflow file

**With your approval (shows full content first):**
- **CI issue**: Shows complete issue body, asks permission to create
- **CI PR**: Shows complete PR body, asks permission to create
- **Test repo issues**: Shows each issue separately, asks permission for each
- go-konveyor-tests issue (update tier workflows)
- kantra-cli-tests issue (add nightly workflow)

**Key feature:** You see the EXACT content before anything is created!

## Skill Contents

Each `.skill` file is a packaged set of:
- **Scripts** - Helper tools for analysis and validation
- **Templates** - File templates for workflows and documentation
- **References** - Detailed pattern documentation
- **Instructions** - Step-by-step workflow guidance

You can extract and explore the contents by unzipping the `.skill` file (it's just a zip file with a different extension).

## Contributing

To create or update skills for this repository:

1. Follow the [Claude Code skill creation guide](https://docs.anthropic.com/claude/docs/create-a-skill)
2. Test the skill thoroughly
3. Package it using the skill packaging tools
4. Add it to this `skills/` directory
5. Update this README with details about the new skill
81 changes: 81 additions & 0 deletions skills/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
#!/bin/bash
#
# Skill installation script for konveyor/ci repository
# Usage: ./skills/install.sh <skill-name>
#

set -e

SKILL_NAME="${1:-konveyor-nightly-updater}"
SKILL_FILE="skills/${SKILL_NAME}.skill"
SKILLS_DIR=".claude/skills"
SETTINGS_FILE=".claude/settings.local.json"

# Colors for output
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
RED='\033[0;31m'
NC='\033[0m' # No Color

echo "Installing skill: ${SKILL_NAME}"

# Check if skill file exists
if [ ! -f "$SKILL_FILE" ]; then
echo -e "${RED}Error: Skill file not found: ${SKILL_FILE}${NC}"
echo "Available skills:"
ls -1 skills/*.skill 2>/dev/null | sed 's/skills\// - /' | sed 's/\.skill$//' || echo " (none)"
exit 1
fi

# Create skills directory
echo -e "${YELLOW}Creating skills directory...${NC}"
mkdir -p "$SKILLS_DIR"

# Extract skill
echo -e "${YELLOW}Extracting skill...${NC}"
unzip -q -o -d "$SKILLS_DIR" "$SKILL_FILE"

# Update settings.local.json
if [ -f "$SETTINGS_FILE" ]; then
echo -e "${YELLOW}Updating existing settings file...${NC}"

# Check if enabledPlugins section exists
if grep -q '"enabledPlugins"' "$SETTINGS_FILE"; then
# Check if skill is already enabled
if grep -q "\"${SKILL_NAME}\"" "$SETTINGS_FILE"; then
echo -e "${GREEN}Skill already enabled in settings${NC}"
else
# Add skill to existing enabledPlugins
# This is a simple approach - for complex JSON manipulation, use jq
echo -e "${YELLOW}Note: Please manually add the following to enabledPlugins in ${SETTINGS_FILE}:${NC}"
echo " \"${SKILL_NAME}\": true"
fi
else
echo -e "${YELLOW}Note: Please add the following to ${SETTINGS_FILE}:${NC}"
echo ' "enabledPlugins": {'
echo " \"${SKILL_NAME}\": true"
echo ' }'
fi
else
echo -e "${YELLOW}Creating settings file...${NC}"
mkdir -p .claude
cat > "$SETTINGS_FILE" << EOF
{
"enabledPlugins": {
"${SKILL_NAME}": true
}
}
EOF
echo -e "${GREEN}Created ${SETTINGS_FILE}${NC}"
fi

# Verify installation
echo ""
echo -e "${GREEN}✓ Skill installed successfully!${NC}"
echo ""
echo "Installed files:"
tree "$SKILLS_DIR/$SKILL_NAME" -L 2 2>/dev/null || find "$SKILLS_DIR/$SKILL_NAME" -maxdepth 2 -type f | sed 's/^/ /'

echo ""
echo -e "${GREEN}Installation complete!${NC}"
echo "You can now use the ${SKILL_NAME} skill in your Claude Code sessions."
Binary file added skills/konveyor-nightly-updater.skill
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. binary files prevents reviewing future changes
  2. may be seen as obfuscation technique

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. It's better to upload the entire directory

Binary file not shown.
Loading