Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

list-components

БесплатноЗапускает вложенные скриптыНе проверен

List all OCPBUGS components, optionally filtered by team

openshift-engот openshift-eng★ 123 звезды на GitHub

Об этом скилле

List Components

This skill provides functionality to list all OCPBUGS component names from the team component mapping, with optional filtering by team.

When to Use This Skill

Use this skill when you need to:

  • Display all OCPBUGS component names
  • Display OCPBUGS components for a specific team
  • Validate OCPBUGS component names before using them in other commands
  • Get a complete list of OCPBUGS-tracked components
  • Count how many OCPBUGS components are in the system or per team
  • Find component names for filing or querying OCPBUGS issues

Prerequisites

  1. Python 3 Installation

    • Check if installed: which python3
    • Python 3.6 or later is required
    • Comes pre-installed on most systems
  2. jq Installation

    • Check if installed: which jq
    • Required for JSON parsing
    • Usually pre-installed on most systems
    • macOS: brew install jq
    • Linux: sudo apt-get install jq or sudo yum install jq
  3. Team Component Mapping File

    • The mapping file team_component_map.json should be in the repository
    • Located at: plugins/teams/team_component_map.json
    • This file is committed to the repository - no download needed
    • To regenerate: python3 plugins/teams/generate_team_component_map.py

Implementation Steps

Step 1: Verify Repository

Ensure you are in the repository root directory:

# Verify you are in the repository root
pwd
# Expected output: /path/to/ai-helpers

Step 2: Run the list-components Script

List all OCPBUGS components:

python3 plugins/teams/skills/list-components/list_components.py

List OCPBUGS components for a specific team:

python3 plugins/teams/skills/list-components/list_components.py --team "API Server"

Note: Use the exact team name from the list-teams command output.

Step 3: Process the Output

The script outputs JSON with the following structure:

All components:

{
  "total_components": 87,
  "components": [
    "Auth",
    "apiserver-auth",
    "config-operator",
    "..."
  ]
}

Components filtered by team:

{
  "total_components": 8,
  "components": [
    "apiserver-auth",
    "config-operator",
    "kube-apiserver",
    "kube-controller-manager",
    "kube-storage-version-migrator",
    "openshift-apiserver",
    "openshift-controller-manager / controller-manager",
    "service-ca"
  ],
  "team": "API Server"
}

Field Descriptions:

  • total_components: Total number of OCPBUGS components found
  • components: Alphabetically sorted list of OCPBUGS component names
  • team: (Optional) The team name used for filtering

Error Handling

The script handles several error scenarios:

  1. Mapping file missing:

    Error: Team component mapping file not found at ...
    This file should be in the repository. Please check your installation.
    

    Solution: Verify repository checkout or regenerate with generate_team_component_map.py

  2. Invalid JSON in mapping:

    Error: Failed to parse mapping file. File may be corrupted.
    

    Solution: Regenerate the mapping file

  3. Team not found:

    Error: Team 'Invalid Team' not found in mapping.
    Use list-teams to see available teams.
    

    Solution: Run list-teams to get correct team name, ensure exact match (case-sensitive)

  4. No OCPBUGS components for team:

    Warning: No OCPBUGS components found for team 'Team Name'.
    The team may not have any OCPBUGS components assigned.
    

    Note: This is a warning, not an error. Some teams may not have OCPBUGS components.

Output Format

The script outputs JSON to stdout:

  • Success: Exit code 0, JSON with component list
  • Error: Exit code 1, error message to stderr

Examples

Example 1: List All Components

python3 plugins/teams/skills/list-components/list_components.py

Output:

{
  "total_components": 87,
  "components": [
    "Auth",
    "apiserver-auth",
    "..."
  ]
}

Example 2: List Components for a Specific Team

python3 plugins/teams/skills/list-components/list_components.py --team "API Server"

Output:

{
  "total_components": 8,
  "components": [
    "apiserver-auth",
    "config-operator",
    "kube-apiserver",
    "..."
  ],
  "team": "API Server"
}

Example 3: Count Components

python3 plugins/teams/skills/list-components/list_components.py | jq '.total_components'

Output:

87

Example 4: Search for Specific Component

python3 plugins/teams/skills/list-components/list_components.py | jq '.components[] | select(contains("apiserver"))'

Output:

"apiserver-auth"
"kube-apiserver"
"openshift-apiserver"

Notes

  • Only OCPBUGS components are included in the mapping
  • Team names must match exactly (case-sensitive) - use list-teams to get correct names
  • When filtering by team, only components owned by that team are returned
  • Component names
Полный SKILL.md на GitHub

Установить list-components в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

list_components.py

FAQ

Что делает скилл list-components?

List all OCPBUGS components, optionally filtered by team

Как установить скилл list-components?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл list-components запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить list-components с