Skip to content
UsecaseBoard
← All use cases
github_discussionsCoding

Use a comment to guide Copilot’s code suggestions

At a glance

A GitHub community guide demonstrates generating a function and test suggestions from comments. This workflow is listed under Coding.

Agents / tools
GitHub, Microsoft

SourceBuilding a tool for these workflows? See weekly rates.

What they did

1) Install the GitHub Copilot extension for an editor such as VS Code and sign in with a GitHub account that has Copilot access. Open a code file. 2) Write a specific comment describing the function, such as validating an email address and returning a boolean, and press Enter to prompt a suggestion. 3) Review the suggested code and press Tab to accept it if appropriate. Add a “Test cases:” comment to prompt test suggestions and inspect those as well.

Worth knowing

This is a community tutorial, not a documented production result. Suggestions require human review.

Save ideas in this browser. Upvotes count across the board.

Prompt excerpt

No prompt excerpt was provided by the source.

Sponsored

CodeBuddy

Tencent Cloud AI coding assistant for IDE and CLI.

Try CodeBuddy ↗
Explore all →