---
id: 8751
lang: en
title: "How to Use AI for Development: 6 Prompt Patterns"
published_at: "2026-05-02 18:32:19"
source_name: "Habr AI"
source_url: "https://habr.com/ru/companies/bothub/articles/1017096/?utm_campaign=1017096&utm_source=habrahabr&utm_medium=rss"
canonical_url: "https://news.hamidun.com/en/news/8751"
categories: ["creative"]
publisher: "AI News by Jemal Hamidun (news.hamidun.com)"
---

# How to Use AI for Development: 6 Prompt Patterns

> **Краткая суть (BLUF):** BotHub has published a practical guide to prompts for developers on Habr. The article collects six templates: deep Python refactoring, untangling legacy TypeScript, generating tests for React, migrating from PHP to Python, a security audit in Go, and PostgreSQL optimization with EXPLAIN ANALYZE.  The core idea is simple: a good prompt defines a role, constraints, and an output format.

BotHub has released a large practical piece on Habr about using AI for development through well-built prompts, rather than simply asking it to "fix the code."

### Which AI roles work for refactoring?
For Python, the "surgeon-architect" role fits: it splits a FastAPI router into layers. For TypeScript, the role is a "patient mentor." The point is to give the model a specific professional role instead of a generic request to "fix the code."

### Can ChatGPT be used to find errors in SQL?
Yes. One of the six patterns helps developers find bottlenecks in SQL queries using properly worded prompts.

### What roles can a neural network play during refactoring?
For Python code, the model takes the role of a "surgeon-architect" that splits a bloated FastAPI router into router, service, and repository layers. For TypeScript, it takes the role of a "patient mentor."

### What developer tasks do the prompt patterns solve?
The patterns help with untangling legacy code, refactoring services, writing tests, and finding bottlenecks in SQL.

### How do you use AI for development?
BotHub described six ready-made prompt patterns in which the model gets a specific professional role instead of a generic request. This helps with untangling legacy code, refactoring services, writing tests, and finding bottlenecks in SQL.

### What prompt should you write for code refactoring?
For Python code, the "surgeon-architect" pattern is used. It splits a bloated FastAPI router into router, service, and repository layers, helping the model understand the structure and produce a concrete result.

---
- **Первоисточник:** [Habr AI](https://habr.com/ru/companies/bothub/articles/1017096/?utm_campaign=1017096&utm_source=habrahabr&utm_medium=rss)
- **Каноническая ссылка:** https://news.hamidun.com/en/news/8751
- **Экосистема автора:** [Бесплатный интенсив по вайбкодингу — предзапись в Нике](https://t.me/vibecodeguidebot?start=agent_intensive_news_md) · [Nomad AI](https://nomadnet.ai) · [Telegram @jemal_hamidun](https://t.me/jemal_hamidun)
