Skip to content

converts the radius-code-review prompt into a skill#11961

Merged
brooke-hamilton merged 1 commit into
radius-project:mainfrom
nellshamrell:code-review-skill
May 27, 2026
Merged

converts the radius-code-review prompt into a skill#11961
brooke-hamilton merged 1 commit into
radius-project:mainfrom
nellshamrell:code-review-skill

Conversation

@nellshamrell
Copy link
Copy Markdown
Contributor

@nellshamrell nellshamrell commented May 19, 2026

Description

Converts the existing radius.code-review.prompt.md Copilot prompt into a structured skill under .github/skills/radius-code-review/, and registers it in the Copilot skills index. The skill preserves the full PR-review workflow (per-file analysis, review markdown, GitHub API posting script) and adds:

  • Explicit head-commit-SHA resolution (instead of HEAD)
  • A Step 4 contributor-doc impact assessment chained to the contributing-docs-updater skill
  • A Quality Checklist
  • event: COMMENT as the default review event

A thin .github/prompts/radius.code-review.prompt.md shim is retained so existing VS Code Copilot Chat invocations continue to work — the shim delegates to the SKILL.md so there is no duplication.

Type of change

  • This pull request is a minor refactor, code cleanup, test improvement, or other maintenance task and doesn't change the functionality of Radius (issue link optional).

Contributor checklist

  • An overview of proposed schema changes is included in a linked GitHub issue.
    • Not applicable
  • A design document is added or updated under eng/design-notes/ in this repository, if new APIs are being introduced.
    • Not applicable
  • The design document has been reviewed and approved by Radius maintainers/approvers.
    • Not applicable
  • A PR for resource-types-contrib is created, if resource types or recipes are affected by the changes in this PR.
    • Not applicable
  • A PR for dashboard is created, if the Radius Dashboard is affected by the changes in this PR.
    • Not applicable
  • A PR for the documentation repository is created, if the changes in this PR affect the documentation or any user facing updates are made.
    • Not applicable

Copilot AI review requested due to automatic review settings May 19, 2026 23:41
@nellshamrell nellshamrell requested review from a team as code owners May 19, 2026 23:41
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Converts the existing radius.code-review.prompt.md prompt into a structured skill under .github/skills/radius-code-review/, registering it in the Copilot instructions index. The new skill preserves the workflow for producing PR analysis, review markdown, and a GitHub API posting script, while improving documentation structure and tightening script generation guidance (e.g., resolving head commit SHA instead of using HEAD).

Changes:

  • Add new skill radius-code-review with SKILL.md describing inputs, steps, outputs, and a reference posting script.
  • Remove the legacy radius.code-review.prompt.md prompt file.
  • Register the new skill in .github/copilot-instructions.md.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
.github/skills/radius-code-review/SKILL.md New skill describing the PR code-review workflow and posting script template.
.github/prompts/radius.code-review.prompt.md Removed; superseded by the new skill.
.github/copilot-instructions.md Adds the new skill to the skills index.

Copy link
Copy Markdown
Contributor Author

@nellshamrell nellshamrell left a comment

Choose a reason for hiding this comment

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

Clean format/packaging migration. The new skill preserves the prompt workflow and adds real improvements (commit-SHA resolution, Step 4 doc-impact assessment, Quality Checklist, default event: COMMENT). Frontmatter and structure match the existing contributing-docs-updater skill, and relative links resolve.

Non-blocking issues to address:

  1. PR description is unfilled — please pick a "Type of change" option (maintenance/refactor) and clean up the Fixes: line.
  2. Step 5 says "prefer jq" but the embedded reference script parses JSON with grep/sed and builds payloads via string interpolation. Either update the reference to use jq or relax the guidance.
  3. Confirm in the PR description that removing the .prompt.md entry point is intentional — VS Code Copilot Chat users invoking the old prompt by name will no longer find it.

Contributor doc impact: none. The change is scoped to .github/ Copilot tooling.

Comment thread .github/skills/radius-code-review/SKILL.md Outdated
Comment thread .github/skills/radius-code-review/SKILL.md Outdated
Comment thread .github/skills/radius-code-review/SKILL.md Outdated
Comment thread .github/skills/radius-code-review/SKILL.md Outdated
Comment thread .github/skills/radius-code-review/SKILL.md Outdated
Comment thread .github/copilot-instructions.md
@nellshamrell nellshamrell marked this pull request as draft May 19, 2026 23:51
Copy link
Copy Markdown
Contributor Author

@nellshamrell nellshamrell left a comment

Choose a reason for hiding this comment

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

This is a clean migration from a large prompt file to a reusable skill, and the prompt shim preserves the existing invocation path. The skill also addresses prior feedback around jq, head SHA resolution, and environment-driven script configuration.

I found one blocking issue in the reference review-posting script. The inline comment object uses line by itself, but GitHub review comments need a valid diff location form. The safest fix is to either use position as shown in the create-review API examples, or include the line-side fields expected by the API, such as line plus side: "RIGHT" for comments on added/current lines. Without that, generated scripts can fail with a 422 validation response when posting inline comments.

Contributor doc impact: no updates are needed under docs/contributing/ or docs/architecture/. The PR changes Copilot workflow customization only, and the contributor-facing .github/copilot-instructions.md skill registration is already included.

Comment thread .github/skills/radius-code-review/SKILL.md Outdated
@nellshamrell
Copy link
Copy Markdown
Contributor Author

This pull request converts the radius.code-review prompt into a skill that can be run from copilot cli. This provides a good initial review pass and can be run by both contributors and reviewers.

This is now available as a slash command in copilot cli.

image

I kept the prompt file - but added a pointer to the skill - so that people who are used to running the prompt from VSCode can continue to use their current workflow.

However, because there is both a prompt file and a skill file, we see two radius code review slash commands in VSCode chat.

image

I'm debating whether it makes sense to leave the prompt in there (especially for people who are used to running the prompt from the little "play" button that appears when you have the prompt file open in VSCode) or direct people to always invoke the skill with the slash command instead (and remove the prompt altogether). I welcome feedback on this!

@nellshamrell nellshamrell marked this pull request as ready for review May 20, 2026 17:09
nicolejms
nicolejms previously approved these changes May 22, 2026
Copy link
Copy Markdown
Contributor

@nicolejms nicolejms left a comment

Choose a reason for hiding this comment

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

Looks good. Thanks for doing this. I think keeping the prompt that references the skill is ok so the prompt will continue to work.

@nellshamrell nellshamrell force-pushed the code-review-skill branch 2 times, most recently from e98f2c1 to 9c966ee Compare May 26, 2026 19:44
@nellshamrell nellshamrell requested a review from a team as a code owner May 26, 2026 19:44
@radius-functional-tests
Copy link
Copy Markdown

radius-functional-tests Bot commented May 26, 2026

Radius functional test overview

🔍 Go to test action run

Click here to see the test run details
Name Value
Repository nellshamrell/radius
Commit ref 9c966ee
Unique ID func228f0dfdac
Image tag pr-func228f0dfdac
  • gotestsum 1.13.0
  • KinD: v0.29.0
  • Dapr: 1.14.4
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.3.0
  • Bicep recipe location ghcr.io/radius-project/dev/test/testrecipes/test-bicep-recipes/<name>:pr-func228f0dfdac
  • Terraform recipe location http://tf-module-server.radius-test-tf-module-server.svc.cluster.local/<name>.zip (in cluster)
  • applications-rp test image location: ghcr.io/radius-project/dev/applications-rp:pr-func228f0dfdac
  • dynamic-rp test image location: ghcr.io/radius-project/dev/dynamic-rp:pr-func228f0dfdac
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-func228f0dfdac
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-func228f0dfdac
  • deployment-engine test image location: ghcr.io/radius-project/deployment-engine:latest

Test Status

⌛ Building Radius and pushing container images for functional tests...
✅ Recipe publishing succeeded
✅ Container images build succeeded
⌛ Publishing Bicep Recipes for functional tests...
⌛ Starting ucp-cloud functional tests...
⌛ Starting corerp-cloud functional tests...
✅ Recipe publishing succeeded
⌛ Starting ucp-cloud functional tests...
⌛ Starting corerp-cloud functional tests...
✅ ucp-cloud functional tests succeeded
✅ ucp-cloud functional tests succeeded
✅ corerp-cloud functional tests succeeded
✅ corerp-cloud functional tests succeeded

Copy link
Copy Markdown
Member

@brooke-hamilton brooke-hamilton left a comment

Choose a reason for hiding this comment

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

🤖 - thank you for this!

@nellshamrell just one more thing - can you sign the commits? This is a recent security change that we implemented. Merging is blocked by the PR checks until that is done.

Signed-off-by: Nell Shamrell <nellshamrell@gmail.com>
@nellshamrell
Copy link
Copy Markdown
Contributor Author

@brooke-hamilton done!

@brooke-hamilton brooke-hamilton merged commit 7c8dc6d into radius-project:main May 27, 2026
43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants