Skip to content

Add generate-copilot-instructions skill#1104

Open
charlie-cao wants to merge 1 commit intogithub:stagedfrom
charlie-cao:add-generate-copilot-instructions-skill
Open

Add generate-copilot-instructions skill#1104
charlie-cao wants to merge 1 commit intogithub:stagedfrom
charlie-cao:add-generate-copilot-instructions-skill

Conversation

@charlie-cao
Copy link

Summary

Adds a new generate-copilot-instructions skill that creates a tailored .github/copilot-instructions.md for any project.

What the skill does

  • Auto-detect mode: When the user attaches #codebase or files, it scans package.json, pyproject.toml, go.mod, linter configs, and test frameworks to build a picture of the stack automatically.
  • Guided mode: If no codebase is attached, walks the user through 8 questions covering language, framework, code style, architecture, testing, and forbidden patterns.
  • Structured output: Produces a ready-to-paste copilot-instructions.md covering the five proven high-signal sections — Tech Stack, Code Style, Architecture Rules, Testing Conventions, and Forbidden Patterns.
  • Iterative refinement: After the first draft, it offers targeted suggestions for commonly-missed additions specific to the detected stack.

Why upload this skill

copilot-instructions.md is one of the highest-leverage files in any AI-assisted codebase, but most developers don't know where to start or what to include. This skill removes that friction and produces instructions that are concrete, stack-specific, and immediately actionable — unlike generic prompts that repeat broad guidance the model already knows.

Checklist

  • Skill folder name matches name frontmatter (generate-copilot-instructions)
  • description is clear, non-empty, and non-generic
  • Skill follows the template structure (Role, Objectives, Workflow, Output Format, Examples)
  • No bundled binary assets
  • npm run skill:validate and npm run build — CI will run these automatically on the PR

Copilot AI review requested due to automatic review settings March 20, 2026 16:44
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

Adds a new Agent Skill, generate-copilot-instructions, intended to help users generate a tailored .github/copilot-instructions.md either by scanning an attached codebase or by running a guided questionnaire.

Changes:

  • Introduces a new skill definition at skills/generate-copilot-instructions/SKILL.md.
  • Documents an auto-detect workflow (stack/linter/tests/architecture detection) and a guided workflow (8-question intake).
  • Defines an output structure and examples for producing a ready-to-paste .github/copilot-instructions.md.

## Objectives

1. Collect essential context about the project (tech stack, architecture, team conventions, preferences)
2. Generate a structured `copilot-instructions.md` aligned with the project's actual needs
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

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

The skill alternates between referring to the output file as copilot-instructions.md and .github/copilot-instructions.md. For clarity (and to avoid generating the file in the wrong location), it should consistently reference the full intended path everywhere (Objectives, examples, and prompts).

Suggested change
2. Generate a structured `copilot-instructions.md` aligned with the project's actual needs
2. Generate a structured `.github/copilot-instructions.md` aligned with the project's actual needs

Copilot uses AI. Check for mistakes.
Comment on lines +89 to +96
## Configuration

| Parameter | Values | Default |
|-----------|--------|---------|
| **Codebase** | `#codebase`, `#file`, or folder | Optional — triggers auto-detection |
| **Verbosity** | `concise` (bullets only) or `detailed` (with explanations) | `concise` |
| **Tone** | `strict` (rules only) or `flexible` (preferred patterns with context) | `flexible` |

Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

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

The “Configuration” section introduces parameters (Verbosity/Tone), but the skill never defines how the user supplies them (e.g., prompt syntax, slash-command args, or explicit Q&A). Consider adding a brief rule like “If the user specifies ‘verbosity: detailed’ …” and/or include an example invocation showing these options so the configuration is actionable.

Copilot uses AI. Check for mistakes.
Comment on lines +1 to +4
---
name: generate-copilot-instructions
description: 'Generate a well-structured .github/copilot-instructions.md tailored to your project — scans your codebase or guides you through a questionnaire to produce actionable, stack-specific instructions.'
---
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

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

Adding a new skill also requires regenerating the generated docs table in docs/README.skills.md (it’s produced by the repo’s README generation script). Please run the repo build/README update step and commit the resulting README.skills.md change so the new skill appears in the skills index and CI doesn’t fail on stale generated docs.

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants