home/productivity/generate-function

Generate Function

GPTClaudeDeepSeek··232 copies·updated 2026-07-14
generate-function.prompt
# Prompt: Generate a Function from a Specification

> **Category:** generation
> **Difficulty:** basic
> **Works best with:** ask mode | agent mode
> **Frontier model recommended:** no
> **Verified:** 2026-04

---

## Purpose

Generate a well-structured, readable function from a plain-language description. Use when you know what a function should do but want Copilot to produce the implementation.

---

## When to Use

- You have a clear specification for a function (inputs, outputs, constraints)
- You want a first draft that you will review and refine
- You are writing boilerplate or standard utility logic

**Do not use when:** the function is part of a larger refactoring; use the refactoring prompts instead. Do not use when you need architecture guidance; use Plan mode.

---

## The Prompt

when to use it

Community prompt sourced from the open-source GitHub repo Clipperone/copilot-learning-labs (MIT). A "Generate Function" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.

tags

productivitycommunitydeveloper

source

Clipperone/copilot-learning-labs · MIT