generate-prompt

Generate reusable prompt templates with handlebars variables and YAML frontmatter.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and assets (resource) components.

What problem does it solve?

This Skill streamlines the creation of effective, reusable prompt templates for AI, ensuring consistency and saving time on repetitive AI interactions.

Core Features & Use Cases

  • Guided Prompt Creation: Walks you through analyzing tasks, identifying variables, and optimizing context.
  • Template Generation: Produces well-structured prompt files with YAML frontmatter and clear instructions.
  • Use Case: Need a quick prompt to "explain code" or "fix a bug"? This Skill helps you build a robust template for these tasks, complete with variables like {{selected_code}} and {{error_message}}, ready for Copilot.

Quick Start

Use the generate-prompt skill to create a new prompt template for explaining code snippets.

Frequently Asked Questions about generate-prompt

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

FAQPage Schema
How do I create reusable AI prompt templates for repetitive coding tasks?

You create reusable prompt templates by generating .github/prompts/*.prompt.md files equipped with handlebars variables like {{selected_code}} and YAML frontmatter, ensuring strict output constraints and optimized context for repetitive Copilot interactions.

What is the best way to structure an LLM prompt with variable substitution for Copilot?

The best way to structure an LLM prompt is using a template file with YAML frontmatter and handlebars variable substitution, which optimizes context and enforces strict output constraints for consistent Copilot AI interactions.

Can I use generated prompt templates for complex AI workflows and persistent agent roles?

No, generated prompt templates are designed exclusively for ad-hoc, high-frequency tasks rather than complex workflows or persistent roles, ensuring strict output constraints for simple repetitive AI interactions.

How do I add variables like error messages to an AI prompt template?

You add variables by inserting handlebars syntax such as {{error_message}} or {{selected_code}} into the prompt template, allowing dynamic context substitution during AI interactions.

Do I need any external dependencies to generate prompt template files?

No, you do not need any external dependencies to generate prompt template files; the Skill operates independently to produce .prompt.md files with handlebars variables and YAML frontmatter.