Skip to content

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

Open
nellshamrell wants to merge 8 commits into
radius-project:mainfrom
nellshamrell:code-review-skill
Open

converts the radius-code-review prompt into a skill#11961
nellshamrell wants to merge 8 commits 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

Signed-off-by: Nell Shamrell <nellshamrell@gmail.com>
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
nellshamrell and others added 2 commits May 19, 2026 23:54
… be invoked in the same way as when it used to be a prompt

Signed-off-by: Nell Shamrell <nellshamrell@gmail.com>
…NUMBER

- Rewrite Step 5 reference script to use jq for SHA extraction, payload
  construction, and review-id parsing (no more grep/sed parsing of API
  responses or string-interpolated JSON).
- Accept PR_NUMBER, REPO_OWNER, REPO_NAME from environment so the
  generated script can be re-run against a different PR without edits.
- Add explicit jq prerequisite and fail-fast checks for jq and PR_NUMBER.
- Tighten Quality Checklist to a concrete "passes shellcheck -x" item.

Signed-off-by: Nell Shamrell <nellshamrell@gmail.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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 and others added 4 commits May 20, 2026 16:49
Signed-off-by: Nell Shamrell <nellshamrell@gmail.com>
Adds a short subsection to the code-reviewing guide noting that the
radius-code-review Copilot skill is available as an optional aid, with
explicit reminders that the human reviewer still owns the review and
must verify any AI-generated feedback against the actual diff.

Signed-off-by: Nell Shamrell <nellshamrell@gmail.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Adds a short subsection to the pull-request contributing guide noting
that contributors can run the radius-code-review skill against their
own PR to generate an initial AI-assisted review before requesting
human review, with explicit caveats that the output is a draft and
that a human reviewer is still required for merge.

Signed-off-by: Nell Shamrell <nellshamrell@gmail.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…s-code-review

Both the reviewer and contributor guides now list prerequisites
(`gh`, `jq`, Copilot CLI or VS Code Copilot Chat with prompt files
enabled) and show the exact invocation for each path, instead of
referring obliquely to "the shim" or "the equivalent VS Code prompt".

Signed-off-by: Nell Shamrell <nellshamrell@gmail.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@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
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.

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.

3 participants