Skip to content

skills: add a review skill for Gophercloud - #3986

Open
winiciusallan wants to merge 2 commits into
gophercloud:mainfrom
winiciusallan:review-skill
Open

skills: add a review skill for Gophercloud#3986
winiciusallan wants to merge 2 commits into
gophercloud:mainfrom
winiciusallan:review-skill

Conversation

@winiciusallan

Copy link
Copy Markdown
Contributor

This commit introduces a new skill for helping reviewers and authors to thoroughly review their codes and follow the best project practices, leveraging the use of AI to achieve this.

@github-actions github-actions Bot added semver:patch No API change backport-v2 This PR will be backported to v2 labels Aug 27, 2026
@coveralls

coveralls commented Aug 27, 2026

Copy link
Copy Markdown

Coverage Status

coverage: 63.588% (+0.008%) from 63.58% — winiciusallan:review-skill into gophercloud:main

This commit introduces a new skill for helping reviewers and authors to
thoroughly review their codes and follow the best project practices,
leveraging the use of AI to achieve this.

@mandre mandre left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is most welcome, thanks! I believe we should try to rely more on AGENTS.md rather than trying to restating some of the project conventions.

Comment thread .agents/skills/review/SKILL.md Outdated
- Follow existing package patterns over inventing new ones.
- List `Page` types whose JSON body has more than one top-level key (besides `*links`) must implement `pagination.KeyedPage` (`ResourceKey()`), so `AllPages` does not guess the collection key. See `pagination/pager.go` and [gophercloud#3947](https://github.com/gophercloud/gophercloud/pull/3947).
- Assertion order is **expected, actual**: `th.AssertEquals(t, expected, actual)`.
- Cite code with `startLine:endLine:path`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't it be path:line as above (line 43)? Or perhaps path:startLine-endLine for multiline citations.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup! specified that.

Comment thread .agents/skills/review/SKILL.md Outdated
---
name: review-gophercloud
description: Review Gophercloud Go SDK code for API coverage gaps, convention violations, microversion mistakes, missing tests, and bugs. Use when the user invokes this skill or asks to review Gophercloud packages, PRs, diffs, or OpenStack API implementations.
disable-model-invocation: true

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may actually want to remove the disable-model-invocation: true setting so that the skill is visible to the agent. Otherwise it forces you to invoke the skill with a slash command, which kinda defeats the purpose IMO.

@winiciusallan winiciusallan Sep 8, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is tipically the review that you, as a user, would invoke, but is not harmful if your favorite clanker decide to start reviewing some code (there should be something in the context to do so).

With other changes, I removed the model invocation boolean.

Comment thread .agents/skills/review/checklist.md Outdated
@@ -0,0 +1,91 @@
# Gophercloud review checklist

Copy this list into the review notes and check items that apply. Skip items that are N/A and say so.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This new skill has a LOT of overlap with AGENTS.md, which is always loaded as project context. I'd suggest reworking this skill to be more about verification than explaining the project conventions.

Having overlapping content is also another potential source of drift over time.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

YES! This makes a lot of sense and I learned a lot how agents work with skills.

Now we have a much smaller skill file and now keeping the project conventions in AGENTS.md as a single source of truth for this. Now, we have general and discoverable instructions about the review process. My personal experience is doing great... if you want to try it out.

The skill drops from ~280 to ~98 lines and no longer restates conventions that
belong in AGENTS.md.
@github-actions github-actions Bot added semver:minor Backwards-compatible change and removed semver:patch No API change labels Sep 8, 2026
@winiciusallan

Copy link
Copy Markdown
Contributor Author

@mandre may I have another round of review? :)

Comment thread AGENTS.md
## Key Reminders
### 5.3 KeyedPage interface

`AllPages` concatenates list bodies. By default it picks the first top-level JSON key that is not `*links` and whose value is an array.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit:

Suggested change
`AllPages` concatenates list bodies. By default it picks the first top-level JSON key that is not `*links` and whose value is an array.
`AllPages` concatenates list bodies. By default it picks an arbitrary top-level JSON key that is not `*links` and whose value is an array.

(go map iteration order is non-deterministic).

@@ -0,0 +1,98 @@
---
name: review-gophercloud
description: Review Gophercloud Go SDK code for API coverage gaps, convention violations, microversion mistakes, missing tests, and bugs. Use when the user invokes this skill or asks to review Gophercloud packages, PRs, diffs, or OpenStack API implementations.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's quite a long description, and the second sentence is redundant. Keep in mind that the frontmatter always end up in the system prompt, so if we can save a few char it's nice.

Suggested change
description: Review Gophercloud Go SDK code for API coverage gaps, convention violations, microversion mistakes, missing tests, and bugs. Use when the user invokes this skill or asks to review Gophercloud packages, PRs, diffs, or OpenStack API implementations.
"Gophercloud: Review packages, PRs, and diffs for convention violations, API coverage gaps, microversion mistakes, missing tests, and bugs."


## Patterns

Do not restate repository conventions here. Read [AGENTS.md](../../../AGENTS.md) and cite the matching section when a finding is a pattern violation, for example `AGENTS.md § 2.4` or `see § 5.3`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pick one convention, and stick with it.

Suggested change
Do not restate repository conventions here. Read [AGENTS.md](../../../AGENTS.md) and cite the matching section when a finding is a pattern violation, for example `AGENTS.md § 2.4` or `see § 5.3`.
Do not restate repository conventions here. Read [AGENTS.md](../../../AGENTS.md) and cite the matching section when a finding is a pattern violation, for example `AGENTS.md § 2.4`.


Do not restate repository conventions here. Read [AGENTS.md](../../../AGENTS.md) and cite the matching section when a finding is a pattern violation, for example `AGENTS.md § 2.4` or `see § 5.3`.

Consult AGENTS.md for: running tests and lint (§ 1); imports, file layout, naming, and OptsBuilder (§ 2.1–2.3); pointers, `omitempty`, errors, and GoDoc (§ 2.4–2.6); unit and acceptance tests (§ 2.7); microversions (§ 3, § 6); pull requests (§ 4); `context.Context`, pagination, and the KeyedPage interface (§ 5).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a suspicion the paragraph number is going to drift very quickly :D. Consider removing them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-v2 This PR will be backported to v2 semver:minor Backwards-compatible change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants