Skip to content

Improve api-proposal skill using skill-creator analysis#125494

Open
eiriktsarpalis wants to merge 1 commit intomainfrom
improve-api-proposal
Open

Improve api-proposal skill using skill-creator analysis#125494
eiriktsarpalis wants to merge 1 commit intomainfrom
improve-api-proposal

Conversation

@eiriktsarpalis
Copy link
Member

Apply skill-creator methodology to improve the api-proposal skill: optimize description triggers, remove generic warnings, add LLM anti-patterns section, and restructure proposal template to match real api-approved issue format.

Apply improvements to the api-proposal skill informed by the Anthropic
skill-creator skill's methodology for critiquing and optimizing skills.

Changes:
- Optimize description with trigger phrases (api-suggestion, api-needs-work)
  and a DO NOT USE FOR boundary to reduce false triggers against sibling skills
- Remove generic slop warning (gh pr review --approve) that was not specific
  to this skill's purpose; reframe prototype-first warning with reasoning
- Add Common Pitfalls section warning about LLM-specific failure modes:
  verbosity creep, invented scenarios, raw ref dumps, non-compilable examples
- Restructure proposal template from 10 sections to 5, matching the format
  used in real api-approved issues (Background, API Proposal, API Usage,
  Alternative Designs, Risks); fold related issues and scope into Background,
  design decisions and open questions into Alternative Designs, prototype link
  into API Proposal section

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 12, 2026 13:55
@github-actions github-actions bot added the area-skills Agent Skills label Mar 12, 2026
@eiriktsarpalis eiriktsarpalis marked this pull request as ready for review March 12, 2026 13:56
Copy link
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

This PR updates the .github/skills/api-proposal skill documentation to better match how api-suggestion/api-approved proposals are typically structured and reviewed in dotnet/runtime, emphasizing prototype-backed design and adding LLM-specific drafting guidance.

Changes:

  • Expands the skill trigger description and clarifies intended/non-intended use cases.
  • Adds a “Common Pitfalls” section focused on common LLM proposal failure modes.
  • Restructures the proposal template sections to align more closely with the current API issue template (Background, API Proposal, Usage, Alternative Designs, Risks) and adds guidance for linking related issues and prototypes.

You can also share your feedback on Copilot code review. Take the survey.

---
name: api-proposal
description: Create prototype backed API proposals for dotnet/runtime. Use when asked to draft an API proposal or to refine a vague API idea into a complete proposal.
description: Create prototype-backed API proposals for dotnet/runtime. Use when asked to draft an API proposal, write an api-suggestion issue, refine a vague API idea into a complete proposal, or improve a proposal marked api-needs-work. Covers the full pipeline from research through prototyping, ref source generation, and publishing. DO NOT USE FOR bug fixes, code review, performance benchmarking, or internal API changes that don't affect public surface area.
Copy link

Copilot AI Mar 12, 2026

Choose a reason for hiding this comment

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

The YAML front-matter description: is a single very long line, which is hard to read/review and tends to create noisy diffs on small edits. Consider switching to a folded block scalar (description: >) with wrapped lines (similar to other skills) so future edits remain maintainable.

Suggested change
description: Create prototype-backed API proposals for dotnet/runtime. Use when asked to draft an API proposal, write an api-suggestion issue, refine a vague API idea into a complete proposal, or improve a proposal marked api-needs-work. Covers the full pipeline from research through prototyping, ref source generation, and publishing. DO NOT USE FOR bug fixes, code review, performance benchmarking, or internal API changes that don't affect public surface area.
description: >
Create prototype-backed API proposals for dotnet/runtime. Use when asked to
draft an API proposal, write an api-suggestion issue, refine a vague API
idea into a complete proposal, or improve a proposal marked api-needs-work.
Covers the full pipeline from research through prototyping, ref source
generation, and publishing. DO NOT USE FOR bug fixes, code review,
performance benchmarking, or internal API changes that don't affect public
surface area.

Copilot uses AI. Check for mistakes.
- **No extensive XML docs.** Comments only as brief clarifications for the review board.
- Naming must follow the [Framework Design Guidelines](https://github.com/dotnet/runtime/blob/main/docs/coding-guidelines/framework-design-guidelines-digest.md).

Include the prototype link at the bottom of this section: "Prototype: `https://github.com/<owner>/<repo>/commit/<sha>`"
Copy link

Copilot AI Mar 12, 2026

Choose a reason for hiding this comment

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

The prototype URL is shown as inline code (backticks), which prevents GitHub from auto-linking it. Prefer a plain URL or a normal Markdown link so reviewers can click through easily.

Suggested change
Include the prototype link at the bottom of this section: "Prototype: `https://github.com/<owner>/<repo>/commit/<sha>`"
Include the prototype link at the bottom of this section: "Prototype: https://github.com/<owner>/<repo>/commit/<sha>"

Copilot uses AI. Check for mistakes.
**10. Prototype**

Link to the prototype commit (e.g., `https://github.com/<owner>/<repo>/commit/<sha>`).
Write "No response" if there are genuinely no risks, matching the convention used in real `api-approved` issues. Do not inflate this section for straightforward additions.
Copy link

Copilot AI Mar 12, 2026

Choose a reason for hiding this comment

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

This guidance conflicts with earlier instructions to "Skip inapplicable fields" and is also context-dependent: GitHub issue forms auto-fill optional fields with "No response", but gh issue create --body-file (used later in this doc) won’t. Suggest clarifying that authors should either omit the Risks section entirely in markdown proposals, or (when using the issue form) leave it empty and let GitHub generate "No response" automatically—rather than instructing to write it manually.

Suggested change
Write "No response" if there are genuinely no risks, matching the convention used in real `api-approved` issues. Do not inflate this section for straightforward additions.
If there are genuinely no risks: for markdown proposals (including those used with `gh issue create --body-file`), omit this section entirely; when using the GitHub issue form, leave the Risks field empty and let GitHub render "No response" automatically. Do not inflate this section for straightforward additions.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-skills Agent Skills

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants