Skip to content
Merged
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
6 changes: 3 additions & 3 deletions .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"name": "git",
"source": "./plugins/git",
"description": "Git Plugin",
"version": "0.0.6",
"version": "0.0.7",
"category": "tooling",
"keywords": [
"git",
Expand Down Expand Up @@ -116,7 +116,7 @@
"name": "utils",
"source": "./plugins/utils",
"description": "A generic utilities plugin serving as a catch-all for various helper commands",
"version": "0.0.11",
"version": "0.0.12",
"category": "tooling",
"keywords": [
"utilities",
Expand Down Expand Up @@ -396,7 +396,7 @@
"name": "openshift-developer",
"source": "./plugins/openshift-developer",
"description": "Bundle of curated plugins, skills, and MCP servers useful to any OpenShift engineer",
"version": "1.0.0",
"version": "1.1.0",
"category": "bundle",
"keywords": [
"openshift",
Expand Down
1 change: 1 addition & 0 deletions .skillsaw.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ rules:
- "bash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/gofmt.sh"
- "bash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/notify.sh '🔔 Claude Code' 'Claude needs your input'"
- "bash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/notify.sh '✅ Claude Code' 'Claude finished your task'"
- "${CLAUDE_PLUGIN_ROOT}/scripts/ensure-precommit.sh"
settings-dangerous:
enabled: true
severity: error
Expand Down
43 changes: 30 additions & 13 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1134,7 +1134,7 @@ <h1>ai-helpers</h1>
{
"name": "git",
"description": "Git workflow automation and utilities",
"version": "0.0.6",
"version": "0.0.7",
"has_readme": true,
"commands": [
{
Expand Down Expand Up @@ -1219,6 +1219,12 @@ <h1>ai-helpers</h1>
}
],
"skills": [
{
"name": "git-commit-format",
"description": "Apply conventional commit formatting rules. Use when generating commit messages or creating commits.",
"description_html": "Apply conventional commit formatting rules. Use when generating commit messages or creating commits.",
"meta": ""
},
{
"name": "suggest-reviewers",
"description": "Git blame analysis helper for the suggest-reviewers command",
Expand Down Expand Up @@ -2317,12 +2323,31 @@ <h1>ai-helpers</h1>
{
"name": "openshift-developer",
"description": "Bundle of curated plugins, skills, and MCP servers useful to any OpenShift engineer",
"version": "1.0.0",
"version": "1.1.0",
"has_readme": true,
"commands": [],
"skills": [],
"skills": [
{
"name": "address-review-pr",
"description": "Fetch and address all PR review comments — categorize by priority, make code changes, post replies, and push. Use when the user wants to address, respond to, or work through PR review feedback.",
"description_html": "Fetch and address all PR review comments — categorize by priority, make code changes, post replies, and push. Use when the user wants to address, respond to, or work through PR review feedback.",
"meta": ""
},
{
"name": "address-review-precommit",
"description": "Fix code review findings before committing. Use when the user wants to address pre-commit review feedback, fix review findings in the current branch, or apply code review fixes and push.",
"description_html": "Fix code review findings before committing. Use when the user wants to address pre-commit review feedback, fix review findings in the current branch, or apply code review fixes and push.",
"meta": ""
}
],
"agents": [],
"hooks": [],
"hooks": [
{
"event_type": "SessionStart",
"matcher": ".*",
"hooks_json": "[\n {\n \"command\": \"${CLAUDE_PLUGIN_ROOT}/scripts/ensure-precommit.sh\",\n \"type\": \"command\"\n }\n]"
}
],
"mcp_servers": [],
"rules": [],
"category": "bundle",
Expand Down Expand Up @@ -2798,17 +2823,9 @@ <h1>ai-helpers</h1>
{
"name": "utils",
"description": "A generic utilities plugin serving as a catch-all for various helper commands and agents",
"version": "0.0.11",
"version": "0.0.12",
"has_readme": true,
"commands": [
{
"name": "address-reviews",
"full_name": "utils:address-reviews",
"description": "Fetch and address all PR review comments",
"description_html": "Fetch and address all PR review comments",
"synopsis": "/utils:address-reviews [PR number (optional - uses current branch if omitted)] [--preview]",
"body_html": "This command automates the process of addressing PR review comments by fetching all comments from a pull request, categorizing them by priority (blocking, change requests, questions, suggestions), and systematically addressing each one. It intelligently filters out outdated comments, bot-generated content, and oversized responses to optimize context usage. The command handles code changes, posts replies to reviewers, and maintains a clean git history by amending relevant commits rather than creating unnecessary new ones."
},
{
"name": "auto-approve-konflux-prs",
"full_name": "utils:auto-approve-konflux-prs",
Expand Down
2 changes: 1 addition & 1 deletion plugins/git/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "git",
"description": "Git workflow automation and utilities",
"version": "0.0.6",
"version": "0.0.7",
"author": {
"name": "github.com/openshift-eng"
}
Expand Down
137 changes: 137 additions & 0 deletions plugins/git/skills/git-commit-format/SKILL.md

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I am not 100% sure these skills belong here, should this remain as a meta-module that pulls in others?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Me neither, I put it here initially instead of in the git plugin to avoid bringing many of those specs which are unneeded here as a dependency. This skill has a concrete use case and as a principle seems easier to iterate with less deps.
I moved it there and added the dependency with the git plugin. I would expect eventually we enforce distribution of a .gitlint file that runs on precommit hook

Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
---
name: git-commit-format
description: "Apply conventional commit formatting rules. Use when generating commit messages or creating commits."
---

## Name
openshift-developer:git-commit-format

## Synopsis
```
/openshift-developer:git-commit-format
```

## Description
Applies conventional commit formatting rules when generating commit messages. This skill is loaded as context for other skills and workflows — it defines the commit message format, required footers, and validation rules.

## Implementation

### Commit Message Format

```
<type>(<scope>): <description>

[optional body]

[footers]
```

### Commit Types

- **feat**: New features
- **fix**: Bug fixes
- **docs**: Documentation changes
- **style**: Code style changes (formatting, etc.)
- **refactor**: Code refactoring (no functional changes)
- **test**: Adding/updating tests
- **chore**: Maintenance tasks
- **build**: Build system or dependency changes
- **ci**: CI/CD changes
- **perf**: Performance improvements
- **revert**: Revert previous commit

### Breaking Changes

With `!` to draw attention:
```
feat!: send email when product shipped
```

With `BREAKING CHANGE` footer:
```
feat: allow config to extend other configs

BREAKING CHANGE: `extends` key now used for extending config files
```

### Required Footers

#### Signed-off-by

**ALWAYS include `Signed-off-by`** footer with name and email.

Get credentials in this priority order:
1. Environment variables: `$GIT_AUTHOR_NAME` and `$GIT_AUTHOR_EMAIL`
2. Git config: `git config user.name` and `git config user.email`
3. If neither configured, ask user to provide details

#### Commit-Message-Assisted-by

**ALWAYS include** when Claude assists with creating or generating the commit message:
```
Commit-Message-Assisted-by: Claude (via Claude Code)
```

### Gitlint Validation Rules

- Run `make run-gitlint` to validate commit messages (if the repo has a gitlint target)
- **Title line**: 120 characters maximum
- **Body line**: 140 characters maximum per line
- Use conventional commit format
- Include required footers (Signed-off-by)
- No trailing whitespace

## Return Value
- **Commit message**: A conventional commit message with type, scope, description, body, and all required footers

## Examples

1. **Simple commit**:
```
docs: correct spelling of CHANGELOG

Signed-off-by: Jane Doe <jdoe@example.com>
Commit-Message-Assisted-by: Claude (via Claude Code)
```

2. **With scope**:
```
feat(azure): add workload identity support

Signed-off-by: Jane Doe <jdoe@example.com>
Commit-Message-Assisted-by: Claude (via Claude Code)
```

3. **Multi-paragraph with footers**:
```
fix: prevent racing of requests

Introduce request ID and reference to latest request. Dismiss
incoming responses other than from latest request.

Remove timeouts which were used to mitigate racing but are
obsolete now.

Reviewed-by: John Smith
Refs: #123
Signed-off-by: Jane Doe <jdoe@example.com>
Commit-Message-Assisted-by: Claude (via Claude Code)
```

## Arguments
- None. This skill provides formatting rules as context for other skills and workflows.

## Quick Checklist

When creating commits:
- [ ] Use conventional commit format: `<type>(<scope>): <description>`
- [ ] Title under 120 characters
- [ ] Body lines under 140 characters
- [ ] Include `Signed-off-by` footer
- [ ] Include `Commit-Message-Assisted-by: Claude (via Claude Code)` footer
- [ ] Validate with `make run-gitlint` if available
- [ ] Use "!" or `BREAKING CHANGE` for breaking changes

## Reference

Conventional Commits Specification: https://www.conventionalcommits.org/en/v1.0.0/#specification
7 changes: 4 additions & 3 deletions plugins/openshift-developer/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
{
"name": "openshift-developer",
"description": "Bundle of curated plugins, skills, and MCP servers useful to any OpenShift engineer",
"version": "1.0.0",
"version": "1.1.0",
"author": {
"name": "github.com/openshift-eng"
},
"dependencies": [
{ "name": "jira", "version": "^0.5.0" },
{ "name": "jira", "version": "^0.7.0" },
{ "name": "ci", "version": "^0.0.42" },
{ "name": "golang", "version": "^0.3.0" },
{ "name": "prodsec-skills", "marketplace": "prodsec-skills" }
{ "name": "prodsec-skills", "marketplace": "prodsec-skills" },
{ "name": "git", "version": "^0.0.6" }
]
}
47 changes: 46 additions & 1 deletion plugins/openshift-developer/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,29 @@
# openshift-developer

Bundle of curated plugins, skills, and MCP servers useful to any OpenShift engineer.
Executable workflows for OpenShift development.

These workflows are meant to be a common engine for different consumption models:

- Developer's laptop
- Shared infrastructure like Prow for the OCPBUG autofix platform
- Slack chai-bot

Each skill and command is a self-contained unit of work that any of these environments can invoke identically.

## Common workflows

### Pre-PR (author loop)

1. `/jira:solve` — Pick up a Jira issue, analyze it, implement the fix.
2. `/code-review:pre-commit-review` — Run a code review on the local changes before pushing.
3. `/openshift-developer:address-review-precommit` — Apply the review findings, run verification, commit, and push.

### Post-PR (review loop)

1. `/code-review:pr` — Review an open PR for correctness and improvements.
2. `/openshift-developer:address-review-pr` — Fetch reviewer comments, categorize by priority, make code changes, post replies, and push.

Repeat steps 4-5 until the PR is approved.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Fix the step reference in the Post-PR workflow iteration instruction.

Line 26 references "steps 4-5", but the Post-PR workflow (lines 21–24) only defines 2 steps. This appears to be a stale or copy-pasted reference.

Based on the workflow, the repetition instruction should likely be "Repeat steps 1-2 until the PR is approved" (i.e., iterate the review cycle: code review → address comments → push).

🔧 Proposed fix
-Repeat steps 4-5 until the PR is approved.
+Repeat steps 1-2 until the PR is approved.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
Repeat steps 4-5 until the PR is approved.
Repeat steps 1-2 until the PR is approved.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/openshift-developer/README.md` at line 26, The instruction on line 26
references "steps 4-5" but the Post-PR workflow section (lines 21-24) only
defines 2 steps. Update the text "Repeat steps 4-5 until the PR is approved" to
"Repeat steps 1-2 until the PR is approved" to correctly reference the review
cycle steps that were actually defined in the Post-PR workflow section.


## What's included

Expand All @@ -10,11 +33,32 @@ Bundle of curated plugins, skills, and MCP servers useful to any OpenShift engin
- `ci` — OpenShift CI / Prow job analysis
- `golang` — Go development tools
- `prodsec-skills` — Product security skills
- `git` — Git workflow automation and utilities

### Skills

- **jira:solve** — Pick up a Jira issue, analyze it, implement the fix, and open a PR. (via `jira` plugin)
- **git:git-commit-format** — Conventional commit formatting rules: types, scopes, required footers (Signed-off-by, Commit-Message-Assisted-by), and gitlint validation. (via `git` plugin)
- **code-review:pre-commit-review** — Run a code review on local changes before pushing. (via `code-review` plugin)
- **address-review-precommit** — Fix code review findings in the current branch before committing: applies fixes, runs verification, and pushes.
- **code-review:pr** — Review an open PR for correctness and improvements. (via `code-review` plugin)
- **address-review-pr** — Fetch and address all PR review comments: categorizes by priority, makes code changes, posts replies, and pushes.

### Hooks

- **ensure-precommit** — On `SessionStart`, installs pre-commit and pre-push hooks via `pre-commit` if the repo has a `.pre-commit-config.yaml`. Fails if `pre-commit` is not installed. Every commit and push is then gated by the repo's hooks at zero ongoing token cost.

### MCP Servers

- **atlassian** — Atlassian MCP server (`https://mcp.atlassian.com/v1/mcp`)

## Prerequisites

- `pre-commit` — hook manager (`pip install pre-commit` or `brew install pre-commit`)
- `gitlint` — commit message linter (`pip install gitlint`)
- `gopls` — Go language server (`go install golang.org/x/tools/gopls@latest`)
- `gh` — GitHub CLI, authenticated (`brew install gh`)

## Installation

Add the marketplaces (one-time):
Expand All @@ -37,3 +81,4 @@ This bundle can also be installed via APM with `--target`:
```sh
apm install openshift-eng/ai-helpers/plugins/openshift-developer --global --target cursor
```

14 changes: 14 additions & 0 deletions plugins/openshift-developer/hooks/hooks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"hooks": {
"SessionStart": [
{
"hooks": [
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/scripts/ensure-precommit.sh"
}
]
}
]
}
}
18 changes: 18 additions & 0 deletions plugins/openshift-developer/scripts/ensure-precommit.sh
Comment thread
stbenjam marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env bash
set -euo pipefail

if [ ! -f .pre-commit-config.yaml ]; then
exit 0
fi

if ! command -v pre-commit &>/dev/null; then
echo "ERROR: pre-commit is required but not found on PATH" >&2
exit 2
fi

SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
python3 "$SCRIPT_DIR/validate_precommit_config.py" || exit $?

pre-commit install --hook-type pre-commit >&2
pre-commit install --hook-type pre-push >&2
echo "pre-commit hooks installed" >&2
Loading