Agentic contribution skill

From RHEcosystemAppEng/agentic-plugins · View interactive version

Agentic contribution skill is an AI agent skill from the GitHub repository RHEcosystemAppEng/agentic-plugins. Interactive skill creation and import with automated validation and marketplace compliance. Use when: - "Create a new skill" - "Import an existing skill" - "Create a new agent plugin" - "Add skill to <plugin>" - "Build skill for <rh-product>" - User mentions "skill builder", "contribute", "new skill

How to use this skill

Skill file

/agentic-contribution-skill Skill

Interactive AI assistant for creating production-ready skills and agent plugins for Red Hat products and platforms with automated quality validation.

All skills created follow Red Hat product guidelines, official documentation standards (docs.redhat.com, access.redhat.com), and best practices for Red Hat Enterprise Linux, OpenShift Container Platform, Ansible Automation Platform, Red Hat Lightspeed, and other Red Hat ecosystem products.

Creates: Complete skill structure with YAML frontmatter, all mandatory sections, plugin integration, and new agent plugins (Lola-compatible)

Validates: Tier 1 (agentskills.io) + Tier 2 (repository design principles)

Applies: Red Hat documentation compliance (uses official Red Hat documentation to adapt skill content to manufacturer guidelines - not automated validation)

Marketplace: Registers plugins in marketplace/rh-agentic-collection.yml (agentic-catalog) for Lola package manager installation

Prerequisites

Required Tools:

Verification:

test -d .git && echo "✓ Git repo" || echo "✗ Not a git repo"
which uv >/dev/null && echo "✓ uv installed" || echo "✗ Install uv"
test -f SKILL_DESIGN_PRINCIPLES.md && echo "✓ Valid repo" || echo "✗ Wrong directory"

Human Notification Protocol:

If prerequisites fail:

❌ Cannot execute: <issue>
📋 Setup: <specific_steps>
🔗 Doc: CONTRIBUTING.md

Security: Never display git credentials or secrets.

When to Use This Skill

Use when:

Do NOT use when:

Workflow

Phase 0: Mode Selection

Ask: "Are you creating a new skill from scratch, or importing an existing SKILL.md?"

Phase 1: Discovery (5 questions max)

Ask concisely, validate before proceeding. Make additional questions if needed to gather complete context.

  1. Purpose & Red Hat Product: "What does the skill do? (1 sentence) For which Red Hat product(s) is this skill targeted?"
  2. Persona: "What role uses it?" (detect existing plugin or suggest new)
  3. Plugin: "Use <existing-plugin>? (yes/no/create-new)"
  4. MCP Tools:
  1. Operation Type: "Read-only, additive, or destructive?" (determines color)

Color Mapping (risk-based, with Red Hat/OpenShift examples):

| Color | Use Case | Examples |

|-------|----------|----------|

| 🔵 cyan | Read-only operations | list clusters, view VM status, check node health, get CVE data |

| 🟢 green | Additive operations | create VM, deploy cluster, generate playbook, add backup |

| 🔵 blue | Reversible operations | restart pod, pause MCP, start VM, stop service |

| 🟡 yellow | Destructive but recoverable | delete snapshot, remove annotation, uncordon node |

| 🔴 red | Critical/irreversible | upgrade cluster, delete cluster, restore ETCD, execute remediation |

Validation:

Phase 2: Definition (6 questions max)

  1. Name: Ask "Skill name? (kebab-case, unique)" → Validate if name is representative of purpose and Red Hat product. If NOT representative, propose 2-3 better alternatives and ask user to choose → Check: test -d <plugin>/skills/<name>/ for uniqueness
  2. Use Cases: "3-5 user phrases for 'Use when'" (concrete, not generic)
  3. Anti-Patterns: "NOT for? (with alternative)"
  4. Workflow: "Steps with MCP tools?" (e.g., "1. Validate VM - resources_get")
  5. Common Issues: "3+ issues: problem: cause: solution"
  6. Prerequisites: "Special requirements? (env vars, permissions)"
  7. External Resources: "Any external references/links/KB articles referenced?" (will be saved to references/ folder)

Quality over Speed: Focus on gathering complete, accurate information. Validation and iteration will ensure correctness - prioritize quality of final result over generation time.

Phase 1-Import: Analysis (import mode only)

  1. Get file: Ask for the path to the existing SKILL.md
  2. Read & parse: Read the file with Read tool. Parse YAML frontmatter, extract name, description, workflow steps, MCP tools mentioned
  3. Plugin suggestion: Analyze skill content keywords and suggest the best-fit plugin:

| Keywords in skill content | Suggested plugin |

|---|---|

| VM, virtual machine, KubeVirt, snapshot, migration, clone | rh-virt |

| CVE, vulnerability, remediation, compliance, RHEL, SRE | rh-sre |

| deploy, build, S2I, Helm, container, route, BuildConfig | rh-developer |

| cluster, install, Assisted Installer, multi-cluster, ROSA | ocp-admin |

| model, inference, GPU, vLLM, KServe, RHOAI, workbench | rh-ai-engineer |

| Ansible, AAP, playbook, governance, job template | rh-automation |

| CVE explanation, product lifecycle, support severity, diagnostics, patching, support case, troubleshooting, customer issue, knowledge base, must-gather | rh-basic |

  1. Color inference: If frontmatter has no color, analyze the skill's workflow steps and operations to infer the risk level. Present your conclusion to the user:

```

Inferred color: <color> — Reason: <operations are read-only/additive/destructive/etc.>

Confirm? (yes/override)

```

Use the color mapping table from Phase 1 (Discovery).

  1. MCP tool verification: Identify all MCP tools referenced in the skill. Read the target plugin's mcps.json and verify each tool exists. Flag any tools not found — they may need a new MCP server or the skill may need adaptation.
  1. Report analysis:

```

Analyzed: <path>

Name: <name> | Lines: <N> | Frontmatter: <valid/needs-fixes>

Suggested plugin: <plugin> (keywords: <matched>)

Color: <color> (<inferred or from frontmatter>)

MCP tools: <N verified, M not found>

Missing sections: <list or "none">

Proceed with adaptation? (yes/no/try another file)

```

If user says no: ask "Would you like to try a different file, or cancel?" and act accordingly.

Phase 2-Import: Adaptation (import mode only)

Document Consultation (REQUIRED): Read SKILL_DESIGN_PRINCIPLES.md using Read tool. Output: "I consulted SKILL_DESIGN_PRINCIPLES.md to ensure compliant adaptation."

  1. Fix frontmatter: Ensure model: inherit and color set (use value confirmed by user in Phase 1-Import). Add metadata block if missing
  2. Add missing sections: Per DP6/DP7 — Prerequisites, When to Use, Workflow, Common Issues, Dependencies. Keep existing content, add structure around it
  3. Validate naming: kebab-case, check uniqueness: test -d <plugin>/skills/<name>/
  4. Place file: Copy to <plugin>/skills/<skill-name>/SKILL.md
  5. Update routing: Add entry to <plugin>/AGENTS.md intent routing table
  6. Show changes: Present summary of all modifications to user, wait for confirmation

After confirmation → proceed to Phase 5 (Validation & Iteration).

Phase 3: Pre-Generation Summary & Document Consultation

Document Consultation (REQUIRED - Execute BEFORE generation):

  1. Action: Read SKILL_DESIGN_PRINCIPLES.md using Read tool to understand:
  1. Output to user: "I consulted SKILL_DESIGN_PRINCIPLES.md to ensure compliant generation."

Modularity Assessment:

Show complete spec:

## Review Before Generation

**Plugin**: <plugin> | **Skill**: <name> | **Color**: <color>

**Purpose**: <purpose>
**Red Hat Product**: <rh-product>

**Use When**: <3-5 examples>
**NOT for**: <anti-pattern>

**Workflow**: <N> steps
**Common Issues**: <N> documented
**MCP Tools**: <tool_count> tools (verified to exist)
**External Resources**: <count> (will be saved to references/)
**Human-in-the-Loop**: <Yes/No>

[If >10 steps or complex workflow]:
💡 **Modularity Note**: This skill has <N> steps. Options:
1. Single comprehensive skill (recommended for critical/cohesive workflows)
2. Subdivide into <N> modular skills (if logical separation exists)

Default: Option 1. Subdivide? (yes/no)

Proceed with generation? (yes/no)

Phase 4: Generation

Create structure:

mkdir -p <plugin>/skills/<skill-name>/
# If external resources provided by user:
mkdir -p <plugin>/skills/<skill-name>/references/

Generate files:

  1. SKILL.md: YAML frontmatter + mandatory sections (follow SKILL_DESIGN_PRINCIPLES.md template - already consulted in Phase 3)
  1. references/ folder (if applicable):
  1. Update <plugin>/AGENTS.md: Add intent routing entry
  2. Create <plugin>/mcps.json: If new MCP server needed (use ${ENV_VAR} format)
  3. Compass manifests: Run compass-manifest-maintenance (.claude/skills/compass-manifest-maintenance/) for registered plugins — skill catalog-info.yaml, Location targets, bidirectional dependsOn/dependencyOf on plugin and MCP manifests
  4. Update marketplace/rh-agentic-collection.yml in agentic-catalog: If new plugin (register plugin for Lola installation)
  5. Create plugin structure: If new plugin (README.md, AGENTS.md, skills/ directory)

Generate SKILL.md following the mandatory section template in SKILL_DESIGN_PRINCIPLES.md (already consulted in Phase 3). If SKILL.md becomes too long, move detailed content to references/ with references in main file.

Phase 5: Validation & Iteration

Validation always runs - quality is the priority, not speed.

Tier 1 - agentskills.io:

uv run python scripts/validate_skills_tier1.py <plugin>/skills/<skill-name>/SKILL.md

Tier 2 - Design Principles:

uv run python scripts/validate_skills_tier2.py <plugin>/skills/<skill-name>/SKILL.md

Report clearly:

Iteration Protocol (if validation fails):

  1. Analyze errors: Identify specific issues (line count, missing sections, format problems)
  2. Determine fix strategy:
  1. Apply fixes: Edit SKILL.md and/or create references/ files
  2. Re-validate: Run both Tier 1 and Tier 2 again
  3. Repeat until ✅ PASSED

Note: We iterate as many times as needed to achieve production-ready quality. Each iteration improves the skill.

Phase 6: Post-Validation Summary

Present a concise summary to the user:

Phase 7: Git Workflow (Optional - User Controls)

User has full control. Each step requires explicit confirmation:

  1. Branch: "Create feat/<skill-name>? (yes/no)"
  2. Stage: Show files, ask confirmation
  3. Commit: Propose message (feat: add <skill-name> skill to <plugin>), wait for approval
  4. Push: "Push changes? (yes/no)"
  5. PR: Use gh pr create if available, or provide manual steps

User can skip any step.

Phase 8: Final Summary

Report: skill path, quality status, PR URL (if created), and note that CI checks will run automatically.

Common Issues

Issue 1: "Description exceeds 500 tokens"

Fix: Shorten frontmatter - move details to body sections.

Issue 2: "Skill name exists"

Fix: Choose more specific name. Check: ls <plugin>/skills/

Issue 3: "MCP server not configured"

Fix: Add to <plugin>/mcps.json using ${ENV_VAR} format.

Issue 4: "Git push authentication failed"

Fix: Configure credentials:

# HTTPS
git config --global credential.helper store

# SSH
ssh-add ~/.ssh/id_ed25519

Issue 5: "uv not found"

Fix: Install:

curl -LsSf https://astral.sh/uv/install.sh | sh

Issue 6: "New plugin not installable via Lola"

Cause: Plugin not registered in marketplace/rh-agentic-collection.yml (agentic-catalog)

Fix: Add plugin entry to marketplace file:

- name: <plugin-name>
  version: 0.1.0
  description: <plugin-description>
  path: <plugin-name>

Issue 7: "Line count exceeds 500"

Cause: Skill content is comprehensive but exceeds agentskills.io 500-line limit

Fix: Iterate to move detailed content to references/ folder:

  1. Create <skill>/references/ directory
  2. Move detailed workflow explanations to references/workflow-details.md
  3. Move full troubleshooting KB articles to references/common-issues.md
  4. Move comprehensive examples to references/examples.md
  5. Keep main SKILL.md concise with references to references/
  6. Re-run validation

Example:

## Common Issues

See [references/common-issues.md](references/common-issues.md) for detailed solutions.

### Issue 1: Snapshot Fails
Storage doesn't support snapshots.
**Solution**: Use snapshot-capable storage. [Details](references/common-issues.md#issue-1)

Dependencies

Required MCP Servers

None - This skill operates on repository files and git operations only. No MCP servers required.

Required MCP Tools

None - Uses Claude Code built-in tools (Read, Write, Edit, Bash, Skill) for file operations and validation.

Related Skills

None - agentic-contribution-skill is self-contained and doesn't invoke other skills.

Repository Files

System Requirements

See Prerequisites section for required system tools (git, uv, bash).

Reference Documentation

Internal:

External:

Critical: Human-in-the-Loop Requirements

MUST confirm before:

  1. File Generation: Show pre-generation summary, wait for "yes"
  2. Git Branch: Ask before creating branch
  3. Git Commit: Show commit message, wait for approval
  4. Git Push: Confirm before pushing to remote
  5. Quality Enforcement: Block on validation errors, warn on warnings

NEVER:

Why: User controls their repository. Quality standards ensure CI success.

Security Considerations

Example Usage

See references/examples.md for comprehensive examples.

Quick Example: Creating VM Backup Skill

User: "Create skill for rh-virt to backup VMs"

Skill guides through:
1. Discovery (5 questions) - Verifies MCP tools exist
2. Definition (6 questions) - Gathers workflow details
3. Pre-generation summary - Consults SKILL_DESIGN_PRINCIPLES.md
4. Generation - Creates SKILL.md with all mandatory sections
5. Validation - Tier 1 + Tier 2, iterates if needed
6. Git workflow - User confirms each step

Result: Production-ready skill in rh-virt/skills/vm-backup-create/

More examples: references/examples.md

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.