ai-system-prompts / github-copilot
Copilot instructions0 starsChanged 5 months agoMITView on GitHub
Araç: GitHub Copilot Kullanım: .github/copilot-instructions.md dosyası olarak repository root'una koy Test Edildi: Evet Repository genelinde geçerli Copilot talimatları şablonu. Kod stili, test gereksinimleri, naming convention, commit formatı ve güvenlik kurallarını tanımlar. Proje başlarken bu şablonu doldurup .github/copilot-instructions.md olarak kaydet.
The file
Files
GitHub Copilot Instructions — Universal Template
Araç: GitHub Copilot
Kullanım: .github/copilot-instructions.md dosyası olarak repository root'una koy
Test Edildi: Evet
Ne İşe Yarar
Repository genelinde geçerli Copilot talimatları şablonu. Kod stili, test gereksinimleri, naming convention, commit formatı ve güvenlik kurallarını tanımlar. Proje başlarken bu şablonu doldurup .github/copilot-instructions.md olarak kaydet.
Şablon — Doğrudan .github/copilot-instructions.md Olarak Kullan
# Copilot Instructions for [Project Name]
## Project Overview
[Project Name] is a [brief description: what it does, who uses it, core value].
Tech stack: [e.g., Python 3.12 / FastAPI / PostgreSQL / Redis / deployed on AWS ECS]
## Code Style
- Follow [PEP 8 / Airbnb JS Style Guide / Google Style Guide — pick one] strictly
- Line length: [88 / 100 / 120] characters max
- Use [tabs / 2-space / 4-space] indentation
- Strings: prefer [single quotes / double quotes / f-strings for interpolation]
- Trailing commas: [required in multi-line structures / optional]
- File encoding: UTF-8 always
## Naming Conventions
- Variables and functions: `snake_case` (Python) / `camelCase` (JS/TS)
- Classes: `PascalCase`
- Constants: `SCREAMING_SNAKE_CASE`
- Private methods/attributes: prefix with `_`
- Boolean variables: prefix with `is_`, `has_`, `should_`, `can_`
- Test files: `test_<module_name>.py` / `<module_name>.test.ts`
## Architecture Constraints
- This project uses [MVC / Clean Architecture / Layered / Hexagonal] — respect layer boundaries
- Business logic lives in [services / use cases / domain layer] — never in controllers or models directly
- Database access only through [repository pattern / ORM models / query functions in `db/` module]
- External API calls only through [service classes in `services/` / adapter layer]
- Configuration only from environment variables — never hardcode secrets, URLs, or magic numbers
## Dependencies
Approved libraries (do not suggest alternatives without discussion):
- HTTP client: [requests / httpx / axios / fetch]
- Testing: [pytest / jest / vitest]
- Linting: [ruff / eslint]
- Type checking: [mypy / TypeScript strict mode]
Do NOT suggest adding new dependencies without noting it explicitly. If a task can be done with stdlib/built-ins, prefer that.
## Testing Requirements
- Every new function or class must have a corresponding test
- Test location: `tests/` (mirrors `src/` structure)
- Test naming: `test_<function_name>_<scenario>` e.g., `test_create_user_with_duplicate_email`
- Test structure: Arrange → Act → Assert (with blank lines between sections)
- Use fixtures for test data; do not hardcode test data in test functions
- Mocks: mock at the boundary (external services, DB), not internal functions
- Minimum coverage target: [80% / 90%] — do not write tests just to hit the number
## Error Handling
- Never swallow exceptions silently (`except: pass` is forbidden)
- Always log errors with context (which function, which input caused it)
- Use custom exception classes for domain errors (define in `exceptions.py` / `errors.ts`)
- HTTP API errors: use standard HTTP status codes; return JSON error bodies with `error` and `message` fields
- Database errors: wrap in service layer, expose domain-friendly messages to the API layer
## Documentation
- All public functions, classes, and modules must have docstrings/JSDoc
- Docstring format: [Google style / NumPy style / JSDoc]
- Inline comments: only explain *why*, never *what*
- API endpoints: include example request and response in docstring
## Security Rules
- Never log passwords, tokens, or PII
- Validate all user input before use; treat all external data as untrusted
- Use parameterized queries — never string-interpolate SQL
- Secrets must come from environment variables or a secrets manager
- When generating file paths from user input, sanitize against path traversal
- Dependencies: do not add packages with known CVEs
## Commit Messages
Format: `<type>(<scope>): <short summary in imperative mood>`
Types: `feat`, `fix`, `refactor`, `test`, `docs`, `chore`, `perf`, `security`
Examples:
- `feat(auth): add OAuth2 login with Google`
- `fix(api): return 404 instead of 500 for missing user`
- `test(orders): add integration test for checkout flow`
- `docs(readme): update local setup instructions`
Keep the subject under 72 characters. Add a body if the change needs context.
## Pull Requests
- PRs should be small and focused (one feature or fix per PR)
- Every PR needs: description of what changed and why, test evidence, and any migration steps
- Do not merge if CI is red or if there are unresolved review comments
## What Copilot Should NOT Do
- Do not generate `TODO` comments as a substitute for implementation
- Do not suggest `print()` / `console.log()` for debugging in production code — use the logger
- Do not import from test modules in production code
- Do not generate code that reads environment variables without a fallback or validation
- Do not generate SQL with string interpolationKullanım Notları
[köşeli parantez]içindeki her şeyi kendi projena göre doldur- Gerekmeyen bölümleri sil — kısa ve odaklı talimatlar daha etkili
- Talimatları değiştirdiğinde takıma bildir
- 6 ayda bir gözden geçir ve güncelliğini kontrol et
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

