agentleFS
Muriel-SalvanMuriel-Salvan/x_aeon_agents/skills/addressing-pull-request-comments/SKILL.md

addressing-pull-request-comments

Skill2 starsChanged 2 months agoBSD-3-ClauseView on GitHub

Addresses comments made on the GitHub Pull Request tracking changes of the current branch. What this does is read all Pull Requests comments addressed to the agent, improve or fix the code based on those comments, and reply too each one of those comments. Use this when the user is asking you to address the comments made on the current branch's Pull Request. Use this skill also in Plan mode.

The file

Show its rules and text

We split this skill into the rules it gives an agent

21 rules. About 0 are common, 16 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈16

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When addressing Pull Request comments, follow those steps.

    line 12
  2. Distinctive:

    Before executing anything, create a checklist named addressing-pull-request-comments Execution Checklist with all steps of these …

    line 16
  3. Distinctive:

    After completing each step of these instructions, mark the item in the addressing-pull-request-comments Execution Checklist as completed.

    line 18
  4. Distinctive:

    Do not skip any item.

    line 19
  5. Distinctive:

    If an item cannot be executed, explicitly explain why.

    line 20
  6. Distinctive:

    Never mark the task as completed while any item from the addressing-pull-request-comments Execution Checklist remains open.

    line 21
  7. Distinctive:

    Always tell the user "SKILL: I am addressing Pull Request comments" to inform the user that you are running this skill.

    line 25
  8. Very specific:

    Always use cli: ruby {skill_path}/scripts/check_unresolved_pr_comments to know about all the unresolved PR comments.

    line 30
  9. Distinctive:

    If yes, analyze the changes in Plan mode, the ask the user to switch to Act mode if not done already to perform those changes.

    line 95
  10. Distinctive:

    If no, skip code changes and continue to step 4.2.

    line 96
  11. Distinctive:

    If you added new commits because of that comment, then always explain what improvements you made in your reply body.

    line 109
  12. Distinctive:

    If the user was asking a question in his comment, then always give an answer to his question in your reply body.

    line 110
  13. Distinctive:

    If you think the user comment did not need any code change, then always explain the reason why you think so in your reply body.

    line 111
  14. Very specific:

    Always use agent: write_to_file tool to write the reply body in a temporary file (later referenced as {reply_body_file}), inside the …

    line 112
  15. Very specific:

    Always use cli: ruby {skill_path}/scripts/reply_to_comment {pull_request_number} {comment_database_id} {reply_body_file} to reply to the …

    line 131
  16. Very specific:

    Never use cli: gh directly to reply to comments.

    line 132
  17. Distinctive:

    Before declaring the task complete:

    line 141
  18. Distinctive:

    If any step was not executed, execute it now.

    line 145
  19. Very specific:

    Always use it every time another skill specifically mentions skill: addressing-pull-request-comments.

    line 150
  20. Distinctive:

    Always use it every time the user asks you to address Pull Request comments.

    line 151
  21. Distinctive:

    Always use it every time you need to address Pull Request comments.

    line 152

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Addressing Pull Request comments

Sequential steps to be followed when using this skill

When addressing Pull Request comments, follow those steps.

Create the addressing-pull-request-comments Execution Checklist (MANDATORY)

  • Before executing anything, create a checklist named addressing-pull-request-comments Execution Checklist with all steps of these instructions.
  • The addressing-pull-request-comments Execution Checklist must include all numbered steps explicitly.
  • After completing each step of these instructions, mark the item in the addressing-pull-request-comments Execution Checklist as completed.
  • Do not skip any item.
  • If an item cannot be executed, explicitly explain why.
  • Never mark the task as completed while any item from the addressing-pull-request-comments Execution Checklist remains open.

1. Inform the user

  • Always tell the user "SKILL: I am addressing Pull Request comments" to inform the user that you are running this skill.

2. Fetch Pull Request comments (can be done during Plan mode)

  • Find this skill directory path, later referenced as {skill_path}.
  • Always use cli: ruby {skill_path}/scripts/check_unresolved_pr_comments to know about all the unresolved PR comments.

Example with expected output as JSON:

ruby .cline/skills/addressing-pull-request-comments/scripts/check_unresolved_pr_comments
# => Repository Github handle: Muriel-Salvan/ruby-neural-nets
# Branch name: main
# Found 1 Pull Requests dealing with this branch (numbers 3)
# Unresolved review threads and comments found on Pull Request #3:
# {
#   "data": {
#     "repository": {
#       "pullRequest": {
#         "url": "https://github.com/Muriel-Salvan/ruby-neural-nets/pull/3",
#         "reviewDecision": null,
#         "reviewThreads": {
#           "edges": [
#             {
#               "node": {
#                 "isResolved": false,
#                 "comments": {
#                   "totalCount": 1,
#                   "nodes": [
#                     {
#                       "databaseId": 2718057900,
# [...]
#                       "body": "Tests are failing. Please check again and fix it.",
#                       "subjectType": "LINE",
#                       "path": "lib/ruby_neural_nets/datasets/file_to_image_magick.rb",
#                       "commit": {
#                         "oid": "9ca8a54eccded4df1ea32520a05bce6f8bc665dd",
#                         "message": "Silence ffmpeg output by monkey-patching Open3.capture3 and Kernel.system to intercept and silence ffmpeg commands"
#                       },
#                     }
#                   ]
#                 }
#               }
#             }
#           ]
#         }
#       }
#     }
#   }
# }

Example of an error case with a non-existing Pull Request:

ruby .cline/skills/addressing-pull-request-comments/scripts/check_unresolved_pr_comments
# => Repository Github handle: Muriel-Salvan/x_aeon_agents
# Branch name: main
# Found 0 Pull Requests dealing with this branch (numbers )

3. Consider all comments directed at the agent (can be done during Plan mode)

  • Select all the comments that start with the string /agent and that don't have a reply from an agent (starting with [Cline ({model})] in the reply).
  • Store those selected comments in a list referenced as {comments_list}.

4. Process each comment in {comments_list}

For each comment selected in {comments_list}, perform the following steps:

4.1. Check if the comment requests a change or improvement (can be done during Plan mode)

  • If yes, analyze the changes in Plan mode, the ask the user to switch to Act mode if not done already to perform those changes. Improve or fix the code as needed, following all existing rules.
  • If no, skip code changes and continue to step 4.2.

Example of a comment asking for a code change:

/agent Refactor this method as it is too big

Example of a comment just asking a question, without needing code changes:

/agent I don't understand. Why are we using this API?

4.2. Create a temporary file with your reply to the comment

  • If you added new commits because of that comment, then always explain what improvements you made in your reply body.
  • If the user was asking a question in his comment, then always give an answer to his question in your reply body.
  • If you think the user comment did not need any code change, then always explain the reason why you think so in your reply body.
  • Always use agent: write_to_file tool to write the reply body in a temporary file (later referenced as {reply_body_file}), inside the directory .x_aeon_agents/tmp/replies.

Example of a reply explaining a code change:

I refactored the method by splitting its parsing and publishing steps in 2 different methods:
* *query_parse*: Handles the parsing
* *query_publish*: Handles the publishing
I added the corresponding unit tests in spec/scenarios/queries_spec.rb

Example of a reply just answering a question without code change:

This API is mainly used to fetch the results from our database.
We use it as it is the official documented way of retrieving our data, and it handles security gates for us.

4.3. Reply to the comment

  • Find the Pull Request number (later referenced as {pull_request_number}) and original comment database ID (later referenced as {comment_database_id}) from the comment data.
  • Find this skill directory path, later referenced as {skill_path}.
  • Always use cli: ruby {skill_path}/scripts/reply_to_comment {pull_request_number} {comment_database_id} {reply_body_file} to reply to the comment.
  • Never use cli: gh directly to reply to comments.

Example:

ruby .cline/skills/addressing-pull-request-comments/scripts/reply_to_comment 3 2718057900 .x_aeon_agents/tmp/replies/comment_2718057900_reply.md

Final Verification (MANDATORY)

Before declaring the task complete:

  • Re-list all numbered steps from the addressing-pull-request-comments Execution Checklist.
  • Confirm each one was executed.
  • If any step was not executed, execute it now.

When to use it

  • This skill can be used when in Plan mode.
  • Always use it every time another skill specifically mentions skill: addressing-pull-request-comments.
  • Always use it every time the user asks you to address Pull Request comments.
  • Always use it every time you need to address Pull Request comments.

Usage and code examples

Those examples are given for a Linux environment. Adapt them if you are running in a Windows environment.

Steps to perform to address new comments

# 1. Get comments
ruby .cline/skills/addressing-pull-request-comments/scripts/check_unresolved_pr_comments
# 2. Loop over each unanswered comment that starts with `/agent`. For each one of them:
# 2.1. Apply necessary code changes if needed
# 2.2. Create .x_aeon_agents/tmp/replies/comment_1234567_reply.md with the appropriate reply
# 2.3. Reply to the comment
ruby .cline/skills/addressing-pull-request-comments/scripts/reply_to_comment 3 1234567 .x_aeon_agents/tmp/replies/comment_1234567_reply.md

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.