agentleFS
bbvch-aibbvch-ai/aihub-core/.claude/skills/implement-feedback-from-pr/SKILL.md

implement-feedback-from-pr

Skill16 starsChanged 3 days agoApache-2.0View on GitHub

Implement review feedback from a pull request. Fetches PR comments, distinguishes human from bot feedback, prioritizes and implements changes, then validates. Use when user says 'implement PR feedback', 'address review comments', 'fix PR review', 'apply PR suggestions', 'handle reviewer feedback', or 'implement changes from review'. Takes a PR number as argument. Do NOT use for pre-PR code review (use /review-diff) or PR creation (use /create-pr).

  • Reads credentials

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 3 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use the GitHub GraphQL API via gh api graphql to fetch only unresolved, non-outdated review threads:

    line 13
  2. Very specific:

    Use the file list from Step 1 (gh pr view --json files) to determine which monorepo scopes need testing.

    line 77
  3. Distinctive:

    After all changes are implemented:

    line 90
  4. Distinctive:

    Every human comment addressed or responded to

    line 113
  5. Distinctive:

    All critical SonarCloud and test-module findings resolved

    line 114

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 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

Implement PR Feedback - Turn Reviews into Improvements

Implement review feedback from PR $ARGUMENTS in the bbvch-ai/aihub-core monorepo.

Step 1: Fetch Unresolved Feedback Only

Use the GitHub GraphQL API via gh api graphql to fetch only unresolved, non-outdated review threads:

gh api graphql -f query='
{
  repository(owner: "bbvch-ai", name: "aihub-core") {
    pullRequest(number: $PR_NUMBER) {
      reviewThreads(first: 50) {
        nodes {
          isResolved
          isOutdated
          comments(first: 10) {
            nodes {
              body
              path
              line
              author { login }
              createdAt
            }
          }
        }
      }
    }
  }
}'

Filter to only threads where isResolved: false and isOutdated: false. Resolved and outdated threads have already been addressed — skip them entirely.

Also fetch CI status and changed files for scope detection:

gh pr checks $PR_NUMBER -R bbvch-ai/aihub-core
gh pr view $PR_NUMBER -R bbvch-ai/aihub-core --json files

Step 2: Triage Feedback

Human Comments (TOP PRIORITY)

Implement all unresolved human reviewer feedback. Read the referenced file before making changes. Skip resolved threads — they have already been addressed in previous commits.

Bot Feedback (EVALUATE CRITICALLY)

This repo's CI pipeline (.github/workflows/analyze-test-pr.yml) runs these bot checks:

  • test-modules — pytest across scopes. Failures here are real — fix the code.
  • pytest-coverage-comment — coverage delta. Add tests only if the uncovered code is meaningful.
  • env-check — .env.prod vs rendered compose consistency. Failures are real — run make generate-compose and make check-env.
  • sonarcloud-scan — scans one SonarCloud project per package (keys in packages/*/sonar-project.properties, e.g. aihub-core_lib-core for packages/core, aihub-core_api-core for packages/api, aihub-core_agents-core for packages/agent).

    SonarCloud bugs and vulnerabilities: almost always fix. Code smells: fix if straightforward. Security hotspots: evaluate case-by-case.

Step 3: Identify Affected Scopes

Use the file list from Step 1 (gh pr view --json files) to determine which monorepo scopes need testing. Map changed file paths to scopes: packages/core/ → packages/core, packages/api/ → packages/api, packages/agent/ → packages/agent, packages/pipeline/ → packages/pipeline, packages/process/ → packages/process, packages/bot/ → packages/bot, packages/web/ → packages/web, plus packages/backup/, packages/sysadmin-api/, packages/sysadmin-web/ the same way.

Step 4: Implement Changes

For each comment, read the referenced file, make the change, and move to the next. Work through human comments first, then bot findings.

Step 5: Validate

After all changes are implemented:

# Lint all affected scopes
make pr-ready

# Run tests in affected scopes (or delegate to /test-scope)
make -C packages/core test    # if packages/core was affected
make -C packages/api test    # if packages/api was affected

Troubleshooting

ProblemSolution
gh pr view returns no PRVerify PR number: gh pr list
Inline comments not visibleQuery reviewThreads via GraphQL (Step 1), not gh pr view --comments
SonarCloud findings unclearCheck the SonarCloud link in the bot comment for detailed explanation
make pr-ready fails after changesFix lint errors introduced by your fixes, re-run
Tests fail in unrelated scopeCheck if packages/core changes broke a downstream scope

Done When

  • Every human comment addressed or responded to
  • All critical SonarCloud and test-module findings resolved
  • make pr-ready runs clean from repo root
  • make test passes in all affected scopes

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.