SuperAPI AI Directory

gitcode-issue-analyzer

Data & analytics

View repository

Updated 10-16 05:00

About this skill

GitCode Issue Analyzer

This skill helps you retrieve and analyze issue information from GitCode repositories, especially for Ascend projects.

When to Call

Call this skill in the following situations:

  • The user wants to collect issue information from GitCode repositories
  • The user wants to analyze closed issues to find solutions
  • The user wants to get handling suggestions for open issues
  • The user mentions GitCode, issues, or Ascend projects (mind-cluster, RecSDK, etc.)

Supported Repositories

For Ascend projects, the following repositories are supported:

  • mind-cluster
  • RecSDK
  • IndexSDK
  • DrivingSDK
  • AgentSDK
  • VisionSDK
  • MultimodalSDK
  • RAGSDK
  • MindInferenceService
  • MEF
  • OMSDK
  • ascend-deployer
  • memfabric_hybrid
  • memcache

You can also find more repositories at the following link:https://gitcode.com/Ascend

Prerequisites

Environment Variable Configuration

This skill requires storing a GitCode API token in the environment variable GITCODE_TOKEN .

Before using this skill, guide the user to set the token:

Windows (PowerShell):

# 临时设置(仅当前会话有效)
$env:GITCODE_TOKEN = "your_token_here"

# 永久设置(用户级别)
[Environment]::SetEnvironmentVariable("GITCODE_TOKEN", "your_token_here", "User")

# 永久设置(系统级别 - 需要管理员权限)
[Environment]::SetEnvironmentVariable("GITCODE_TOKEN", "your_token_here", "Machine")

Linux/macOS:

# 临时设置(仅当前会话有效)
export GITCODE_TOKEN="your_token_here"

# 永久设置 - 添加到 ~/.bashrc 或 ~/.zshrc
echo 'export GITCODE_TOKEN="your_token_here"' >> ~/.bashrc
source ~/.bashrc

How to get a GitCode token:

  1. Log in to GitCode (https://gitcode.com)
  2. Go to Settings -> Access Tokens
  3. Generate a new token with appropriate permissions

Workflow

Step 1: Extract the repository name

From the user's prompt, extract the repository name using the following patterns:

  1. Direct repository name: "Collect issue information under the mind-cluster repository" -> repo = "mind-cluster"
  2. Extract from URL:"https://gitcode.com/Ascend/mind-cluster" -> repo = "mind-cluster"
  3. Partial match: If the user mentions a project name, match it against the list of supported repositories

Step 2: Retrieve Issues

Retrieve issues by calling the script via a bash command, replacing ${repo} with the repository name extracted from the user's prompt:

The retrieval script is located in the skill directory:.opencode/skill/gitcode-issue-analyzer/scripts/fetch/

Retrieve open issues:

Save the xlsx file to this directory:.opencode/skill/gitcode-issue-analyzer/

python scripts/fetch/fetch_open_issues.py ${repo}

Retrieve closed issues:

Save the xlsx file to this directory:.opencode/skill/gitcode-issue-analyzer/

python scripts/fetch/fetch_closed_issues.py ${repo}

Retrieve all comments under the repository issues:

Save the xlsx file to this directory:.opencode/skill/gitcode-issue-analyzer/

python scripts/fetch/fetch_issue_comments.py ${repo}

Verify whether the issue spreadsheet was created successfully:

python scripts/validate/validate_issue.py ${repo}

The script will automatically:

  1. Read GITCODE_TOKEN from the environment variable
  2. Call the GitCode API to retrieve issue data
  3. Save the data as ${repo_open_issue.xlsx} and ${repo_closed_issue.xlsx} as well as ${repo_issue_comments.xlsx}
  4. Verify whether the issue spreadsheet was created successfully

Step 3: Generate the issue comment handling document

Process the issues by calling the script via a bash command, replacing ${repo} with the repository name extracted from the user's prompt:

The classification script is located in the skill directory:.opencode/skill/gitcode-issue-analyzer/scripts/classify/

Generate the issue comment handling document:

python scripts/classify/classify_issue_comments.py ${repo_issue_comments.xlsx}

Place the generated issue comment handling document in the references directory of the skill directory:.opencode/skill/gitcode-issue-analyzer/references/

Note: first finish generating the issue comment handling document before proceeding to Step 4: Analyze Issues

Step 4: Analyze Issues

Match from the local handling suggestions document

The matching script is located in the skill directory:.opencode/skill/gitcode-issue-analyzer/scripts/match/

First match from the local issue handling suggestions document in the references directory by calling the python script:

python scripts/match/match_open_issues.py ${repo_open_issue.xlsx}

The script will automatically:

  1. Read the ${repo_open_issue.xlsx} file
  2. Load the issue handling suggestion documents in the references directory
  3. Match based on title similarity (threshold 80%)
  4. Write the matching results into the output directory categorized by tag

For open_issues that are not matched, search on the corresponding repository on the web. If the match is high, write the matching suggestions to the markdown document in the references directory:.opencode/skill/gitcode-issue-analyzer/references/

Match handling suggestions from repository documents

Match handling suggestions from documents in each repository's doc directory:

Search the README document under the repository and the documents in the docs directory:

  • README document:https://gitcode.com/Ascend/{repo}/blob/master/README.md
  • docs directory:https://gitcode.com/Ascend/{repo}/tree/master/docs

For example, the mind-cluster repository:

  • https://gitcode.com/Ascend/mind-cluster/blob/master/README.md
  • https://gitcode.com/Ascend/mind-cluster/tree/master/docs

Match from public information on the web

If no match is found by searching the corresponding repository on the web, use public information on the web:

Important requirements:

  • There must be a reliable and trustworthy source of information
  • The source link must be provided
  • Do not fabricate arbitrarily

If the match is high, write the matching suggestions to the markdown document in the references directory:.opencode/skill/gitcode-issue-analyzer/references/

Analyze closed Issues:

When analyzing closed issues, focus on the following:

  1. Common patterns - Common patterns in issue titles and content
  2. Resolution indicators - The status in the issue_state field (such as "DONE")
  3. Related issues - Issues with similar keywords or tags
  4. Comment activity - Issues with more comments may have detailed discussions

Usage example

User request:

"Help me collect issue information under the mind-cluster repository, and analyze the closed issues to give handling suggestions"

Execution steps:

  1. Extract repo = "mind-cluster"
  2. Check the GITCODE_TOKEN environment variable
  3. Execute python scripts/fetch/fetch_open_issues.py mind-cluster
  4. Execute python scripts/fetch/fetch_closed_issues.py mind-cluster
  5. Execute python scripts/fetch/fetch_issue_comments.py mind-cluster
  6. Execute python scripts/validate/validate_issue.py mind-cluster
  7. Execute the script to analyze the handling comments of the issue
  8. Provide handling suggestions for open issues

Output format

Excel file:

  • mind-cluster_open_issue.xlsx - Contains all open issues
  • mind-cluster_closed_issue.xlsx - Contains all closed issues
  • mind-cluster_issue_comments.xlsx - Contains comments on all issues

Analysis report:

Provide a summary, including:

  1. The total number of open/closed issues
  2. Common issue types and their distribution
  3. Key patterns found in closed issues
  4. Specific handling suggestions for open issues
  5. Reference links to similar closed issues

Error handling

  1. Token not found: Guide the user to set the GITCODE_TOKEN environment variable
  2. Repository not found: Verify the repository name and suggest checking the URL
  3. API rate limit: Wait and retry, or suggest that the user wait
  4. Empty result: Notify the user that no issue was found

Notes

  • Ensure the Excel file is saved in UTF-8 encoding to prevent character encoding issues
  • The API may return paginated results; handle pagination if needed
  • Comply with API rate limits and implement appropriate delays between requests