generated from konveyor/template-repo
-
Notifications
You must be signed in to change notification settings - Fork 15
✨ Add konveyor-nightly-updater skill for automating release updates #188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
mguetta1
wants to merge
1
commit into
konveyor:main
Choose a base branch
from
mguetta1:claude-skill
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
|
|
||
| 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 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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." |
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
.skillextantion or to the entireAvailable Skillssection?There was a problem hiding this comment.
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 Skillssection. 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.