Intelligent CodeArts Repo Automation with CodeArts Agent
CodeArts Repo can be integrated with CodeArts Agent through a CodeArts toolchain plug-in. Based on the plug-in architecture, you can flexibly configure prompts and skills to enable CodeArts Agent to accurately understand your intents and efficiently and accurately complete code repository operations. This provides an intelligent and all-in-one repository management solution for R&D teams.
You can use natural language prompts in the CodeArts Agent chat window to invoke relevant skills for tasks like committing code, merging requests, and reviewing code. There is no need to learn console operations or manually invoke or switch to an independent repository management interface. This ensures a seamlessly connected and efficient R&D workflow.
Core Benefits
- Natural language interaction: You can invoke relevant skills to complete repository management tasks simply by describing your requirements in natural language in the chat window. This eliminates the need to learn complex console specifications and significantly lowers the tool usage requirements.
- Intelligent repository management: With the plug-in architecture and configurable prompts and skills, CodeArts Agent can accurately understand your intentions and efficiently complete code repository operations.
- End-to-end process: You can complete tasks like committing code, merging requests, and reviewing code in the chat window, without having to manually invoke or switch to an independent repository management page, eliminating cross-platform operation costs.
- Seamless R&D collaboration: Repository management capabilities are deeply integrated into daily R&D chat scenarios, turning prompts into actions seamlessly and efficiently. This boosts teamwork and drives up your entire team's productivity.
Principles
CodeArts Repo makes its API capabilities available to CodeArts Agent through the CodeArts toolchain plug-in. After you enter a natural language prompt in the CodeArts Agent chat window, it interprets your intents, matches the skill, calls the CodeArts tool chain API via Koo Command Line Interface (KooCLI) to perform the corresponding operations, and returns the results to the chat window.
CodeArts Toolchain Plug-in
The CodeArts toolchain plug-in integrates CodeArts R&D services, such as CodeArts Req, CodeArts Repo, CodeArts Check, CodeArts TestPlan, CodeArts Pipeline, CodeArts Build, CodeArts Artifact, and CodeArts Deploy, into CodeArts Agent as skills and sub-agents. After the plug-in is installed, you can trigger service operations directly through natural language prompts in the agent chat window. There is no need to switch to the console. After the primary agent receives a prompt, it obtains execution specifications and routing strategies via skills. Skills guide interactive operations step by step, while sub-agents handle complex orchestration tasks, executing them autonomously in an isolated context and returning results. For details about the skills and sub-agents included in the CodeArts toolchain plug-in, see All CodeArts Sub-agents and Skills.
CodeArts Repo provides three skills and a sub-agent in the CodeArts toolchain plug-in.
- The commit-messages skill is an expert in standardizing code commit messages. It covers scenarios such as commit message generation, format verification, and atomic commit splitting. It can automatically detect existing commit standards of a project and generate structured commit messages.
- The mr-description skill is an expert in intelligently writing descriptions for merging requests. By reading branch differences and merge request metadata, it automatically infers the change intent and generates structured descriptions that cover standard sections such as the change summary, feature description, and impact scope. Finally, it applies the descriptions to the merge request through the UpdateMergeRequest API.
- The mr-review skill is an expert in reviewing merge request code. By reading merge request differences, commit records, and file change trees, it analyzes the code file by file in terms of correctness, security, maintainability, and performance. It then generates a structured review report with priority levels (P0 to P3) and can publish review comments to the merge request as inline comments or general comments after your confirmation.
For complex tasks requiring multi-step orchestration or autonomous decisions, the skills hand the task off to the sub-agent (codearts-repo). The sub-agent runs autonomously in an independent context, without consuming primary chat resources. It uses the CLI tool to perform complex orchestration tasks such as code commits, merge request creation and merging, repository management, branch policy configuration, and protected branch management. These skills use built-in parameter confirmation rules and write operation security policies to process tasks and return structured result reports.
Application Scenarios
The following CodeArts Repo scenarios are supported by CodeArts Agent.
| Scenario | Scenario Description | Natural Language Prompt Example |
|---|---|---|
| Code commit | When you commit code, the agent generates a commit message, verifies it against the specifications, and provides modification suggestions for non-compliant commit messages. | Create a code repository named repo-task, create a sample file (repo-file.java) in the repository, enter the commit message, and commit the code. |
| Merge request description update | When you create or update a merge request, the agent generates related descriptions, reducing manual writing costs. | Create a merge request with the title of mr-demo and description of mr-description in the repo-task repository and submit the request. |
| Merge request review | When you initiate a code review request, the agent identifies potential issues and generates review comments based on intelligent semantic understanding. | In the repo-task repository, add review comments to the code example in mr-demo and view the result. |
Prerequisites
- You have installed and logged in to CodeArts Agent.
- KooCLI has been installed.
- Tokens or credits in your CodeArts Agent account are consumed when this operation invokes tools or runs LLM inference.
Procedure
- Click to download the CodeArts toolchain plug-in.
- Click install.bat in the plug-in package to install the plug-in and KooCLI.
- Complete KooCLI initialization to store your permanent AK/SK and region information in the configuration file, so there is no need to repeatedly enter this information when performing operations.
- Open the CodeArts Agent chat panel and tell it what you want to do using natural language.
- The first time you use CodeArts Agent to perform code management operations, the analysis process takes longer. As usage increases, the analysis speed gradually improves and response time shortens.
- The interface style varies across different CodeArts Agent clients; refer to the actual display in the tool you are using for the exact operations.
Scenario 1: Committing Code
The following is an example prompt you could use to commit code:
Create a code repository named repo-task. Create a code sample file named repo-file.java in the repository, enter the commit message, and commit the code.
The agent begins analyzing and executing the task, with the entire process displayed in real time within the chat. Once the creation is complete, you can view the created task in the repository list on the CodeArts Repo console.
Example result

Scenario 2: Creating a Merge Request
The following is an example prompt you could use to create a merge request task:
Create a merge request with the title of mr-demo and description of mr-description in the repo-task repository and submit the request.
Once the creation is complete, you can view the description of the created merge request in the repository list on the CodeArts Repo console.
Example result

Scenario 3: Reviewing a Merge Request
The following is an example prompt you could use to add review comments to a merge request:
In the change file (repo-file.java) of the merge request (mr-demo), add review comments to the fourth line: "The command is repeated. Please modify it."
The agent will add review comments as prompted. You can view the review comments in the comment area of the change file (repo-file.java).
Example result

Helpful Links
For more use cases of the CodeArts toolchain plug-in, see Developing a Travel Assistant Using the CodeArts Toolchain Plug-in.
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot