home/roleplay/c-instructions

C.instructions

GPTClaudeGemini··771 copies·updated 2026-07-14
c-instructions.prompt
# GitHub Copilot Instructions

These instructions define how GitHub Copilot should assist with this project. The goal is to ensure consistent, high-quality code generation aligned with our conventions, stack, and best practices.

## 🧠 Context

- **Project Type**: System Library / CLI Tool / Embedded App
- **Language**: C
- **Framework / Libraries**: POSIX / GNU libc / Make / CMake
- **Architecture**: Modular / Layered / Embedded RTOS / Driver-Oriented

## 🔧 General Guidelines

- Use idiomatic, portable C.
- Write small, reusable functions—avoid deeply nested logic.
- Use descriptive names; avoid single-letter variables except in loops.
- Always define header files (`.h`) for public interfaces.
- Use `const` and `static` appropriately for scope and immutability.
- Stick to consistent formatting (e.g., `clang-format` or GNU style).
- Prioritize memory safety and avoid undefined behavior.

## 📁 File Structure

Use this structure as a guide when creating or updating files:

when to use it

Community prompt sourced from the open-source GitHub repo Code-and-Sorts/awesome-copilot-agents (CC0-1.0). A "C.instructions" 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

roleplaycommunitygeneral

source

Code-and-Sorts/awesome-copilot-agents · CC0-1.0