# Update With Comments

> Check comments from the Pull Request on the GitHub and update code.

- Skill: `alibaba/update-with-comments` (Agent Skill)
- Install (CLI): `npx skillmds@latest add alibaba/update-with-comments`
- Raw SKILL.md: https://api.skillmd.com/api/skills/alibaba/update-with-comments/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: alibaba (https://skillmd.com/u/alibaba)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/alibaba/update-with-comments

---


## User Input

```text
$ARGUMENTS
```

You **MUST** consider the user input before proceeding (if not empty).


## Outline


1. **Locate the Pull Request**:
    - If user explicitly provides the PR ID
        - Stash current changes and checkout to the PR branch.
    - If user does not provide the PR ID
        - Search the PR on the current branch
    - If there is multiple PRs or no PR, **STOP** and report to users.

2. **Get PR comments**:
    - Obtain conversation comments: `gh pr view <pr-id> --comments`.
    - Obtain inline comments: `gh api repos/:owner/:repo/pulls/<pr-id>/comments`.
    - Analysis all comments and align intention, e.g., Approve, Question, Request Changes, etc.

3. **Update Code**:
    - If a comment intention is `Approve`, skip the update.
    - If a comment intention is `Question`, you have to explain your understanding based on the code and comments.
    - If a comment intention is `Request Changes`, e.g., typos, code style, potential bugs, optimization chances, etc.
        - Try to update the code to fix the problem in the workspace.
        - If the update is successfully fixed and pass tests, add a new comments to confirm the update.
        - Otherwise, report the problem and ask users to review the comment.

4. **Report & Submit**: Generate a summary to show all comments and their updates. Then, commit the changes and push to the PR branch.
