generate-repo-instructions

Generate a global .github/copilot-instructions.md file from deep repository analysis.

29|22|Updated Nov 25, 2025
One-click install
npx skills add https://github.com/canonical/copilot-collections --skill generate-repo-instructions
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: generate-repo-instructions
Source: https://github.com/canonical/copilot-collections/tree/main/.github/skills/generate-repo-instructions
Command: npx skills add https://github.com/canonical/copilot-collections --skill generate-repo-instructions

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill automates the creation of a comprehensive .github/copilot-instructions.md file, ensuring your AI assistant has a clear, up-to-date understanding of your project's context, rules, and structure.

Core Features & Use Cases

  • Deep Repository Analysis: Analyzes code, documentation, build systems, and project structure to gather essential information.
  • Automated Instruction Generation: Populates a standardized template with discovered project details, coding conventions, and build commands.
  • Context Economics Adherence: Ensures generated instructions are concise and focused, staying under 1000 lines.
  • Use Case: When starting a new project or onboarding a new team member, run this Skill to instantly generate a foundational AI instruction file that guides Copilot on project specifics, saving hours of manual documentation.

Quick Start

Use the generate-repo-instructions skill to create the global .github/copilot-instructions.md file for this repository.

Frequently Asked Questions about generate-repo-instructions

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automatically generate a copilot-instructions.md file for my repository?

To generate a copilot-instructions.md file, you can use an automated skill to perform deep repository analysis. It synthesizes your documentation, tech stack, build systems, and code patterns to create concise instructions under 1000 lines.

What is an AI constitution for a codebase and why do I need it?

An AI constitution is a global repository instruction file that provides your AI assistant with clear context, rules, and project structure. You need it to ensure AI-generated code aligns with your specific coding conventions and security constraints.

Does automated repository analysis work for existing projects with established tech stacks?

Yes, automated repository analysis works for existing projects by examining your current codebase, documentation, and build systems. It extracts your established tech stack and code patterns to populate a standardized instruction template.

How are coding conventions and project structure extracted for AI instructions?

Coding conventions and project structure are extracted through LLM-driven deep repository analysis. The system analyzes your code patterns, build commands, and documentation to synthesize essential project details into positive-constrained instructions.

What is the maximum line limit for generated repository instructions?

The maximum line limit for generated repository instructions is 1000 lines. This context economics adherence ensures the generated AI constitution remains concise and focused to optimize assistant performance without overwhelming context windows.

Can I use generated copilot instructions for onboarding new team members?

Yes, you can use generated copilot instructions for onboarding new team members. The instruction file provides a foundational guide on project specifics, saving hours of manual documentation by detailing build commands and project structure.