Review potential overlaps with existing ai-helpers (Claude Code Plugins, Commands, Skills, Sub-agents, or Hooks) and open PRs
Analyzes potential overlaps with existing ai-helpers commands, skills, agents, or hooks before contributing.
/plugin marketplace add openshift-eng/ai-helpers/plugin install utils@ai-helpers[--idea TEXT] [--pr NUMBER] [--verbose]utils:review-ai-helpers-overlap
/utils:review-ai-helpers-overlap [--idea "description"] [--pr NUMBER] [--verbose]
Review potential overlaps between your planned or implemented work and existing Claude Code Plugins, Commands, Skills, Sub-agents, or Hooks in the openshift-eng/ai-helpers repository to avoid duplicating effort and find collaboration opportunity.
This command is specifically designed for contributors and reviewers to the openshift-eng/ai-helpers repository. It checks for overlaps in:
plugins/*/commands/*.md)plugins/*/skills/*/SKILL.md and helper scripts)agents/*.md).claude/hooks/*.sh and .claude/hooks/*.py)Modes:
--idea "TEXT"): Check if your idea already exists before writing code--pr NUMBER): Check if a specific PR overlaps with othersThis command helps contributors avoid duplicate work and helps reviewers identify related PRs that should be consolidated.
Phased duplicate detection with token-efficient early returns:
Parse $ARGUMENTS:
--idea "TEXT" provided - extract idea description--pr <NUMBER> provided - extract PR numberStore flags: verbose
This command only works with the openshift-eng/ai-helpers repository.
Validate repository:
# Check if we're in the ai-helpers repository
REPO_URL=$(git remote get-url upstream 2>/dev/null || git remote get-url origin)
if ! echo "$REPO_URL" | grep -q "openshift-eng/ai-helpers"; then
echo "Error: This command only works in the openshift-eng/ai-helpers repository"
exit 1
fi
# Hardcode repository for all gh commands
REPO="openshift-eng/ai-helpers"
Idea Mode: Extract keywords from idea description using Claude's semantic understanding
Contributor Mode:
# Get all ai-helpers changes in one pass (commands, skills, agents, hooks)
CHANGED_FILES=$(git diff --name-only main...HEAD | grep -E '(^plugins/.*/commands/.*\.md$|^plugins/.*/skills/.*/SKILL\.md$|^plugins/.*/skills/.*\.py$|^agents/.*\.md$|^\.claude/hooks/.*\.(sh|py)$)')
PR Review Mode:
gh pr view <NUMBER> --repo "$REPO" --json files --jq '.files[].path'gh pr diff <NUMBER> --repo "$REPO" -- <file_path>Fetch open PRs (metadata only): gh pr list --repo "$REPO" --state open --json number,title,body,author,createdAt --limit 100
Match keywords semantically:
If potential overlap found, prompt user: "Continue with deep comparison? (y/n)"
Run if Step 3 flagged overlaps (user confirmed) OR --verbose flag OR no obvious overlaps in Step 3.
For flagged PRs:
gh pr diff <PR_NUMBER> --repo "$REPO" -- plugins/<plugin>/commands/<command>.mdgh pr diff <PR_NUMBER> --repo "$REPO" -- plugins/<plugin>/skills/<skill>/SKILL.mdgh pr diff <PR_NUMBER> --repo "$REPO" -- agents/<agent>.mdgh pr diff <PR_NUMBER> --repo "$REPO" -- .claude/hooks/<hook>.(sh|py)Idea Mode: Scan all ai-helpers files:
find plugins/*/commands/*.mdfind plugins/*/skills/*/SKILL.mdfind agents/*.mdfind .claude/hooks/*.{sh,py}Use Read for frontmatter descriptions, flag if 3+ keyword overlap or semantic similarity
Contributor/PR Review Mode: List existing files in changed areas:
ls plugins/<plugin>/commands/*.mdls plugins/<plugin>/skills/*/SKILL.mdls agents/*.mdls .claude/hooks/*.{sh,py}Check for duplicate names and description similarity
Use progressive disclosure (3 layers):
--verbose): Side-by-side comparison with differentiation suggestionsIf overlaps found, save detailed report to .work/review-ai-helpers-overlap/report-{timestamp}.md with summary, PRs compared, findings, and recommendations. Display file path to user.
Idea validation (before coding):
/utils:review-ai-helpers-overlap --idea "command to analyze Jira issues and create PRs"
/utils:review-ai-helpers-overlap --idea "command to analyze test coverage"
Checks if a similar command already exists in ai-helpers plugins or there are opened PR(s) for similar purpose
Check local changes before raising a PR (ai-helpers contributor workflow):
/utils:review-ai-helpers-overlap
Checks your local command/skill/agent/hook changes against main branch and open PRs.
PR review (check if PR overlaps with others):
/utils:review-ai-helpers-overlap --pr 123
Check if PR #123 overlaps with other open PRs
Structured overlap analysis with progressive disclosure:
--verbose): Side-by-side comparisons with differentiation suggestionsOptionally saves report to .work/review-ai-helpers-overlap/report-{timestamp}.md when overlaps found.
openshift-eng/ai-helpers repositorygh) and git/utils:review-ai-helpers-overlap --idea during planning, run /utils:review-ai-helpers-overlap during developing; reviewers use --pr <NUMBER> during reviewing--idea "TEXT": Check if your idea exists before coding (activates idea validation mode)--pr <NUMBER>: Check if specific PR overlaps with others (reviewer mode)--verbose: Show detailed side-by-side comparisons (Layer 3 output)