prompts.example.vnprompts.example.vnprompts.example.vn
TeamsBotsSkillsPromptsPromptmasters
BookFor KidsDevelopers
Login
CC0 2026 prompts.example.vn
DeepWikiHow to...DocsAPIPrivacyTermsSupportAboutGitHub
All Tags

Best Practices Prompts

172 prompts
Technical SEO taste
Taste

Opinionated technical SEO preferences for web apps: server-rendered HTML, one canonical URL per page, real titles and meta, structured data, sitemaps, fast Core Web Vitals and no accidental noindex.

# Technical SEO taste of a web developer who wants pages search engines can read on the first request
- Serve meaningful HTML from the server (SSR or static generation) for every page that should rank; do not rely on client-only rendering. Confidence: 0.90
- Give every indexable page exactly one canonical URL and set a self-referencing rel="canonical" tag. Confidence: 0.90
- Pick one host and trailing-slash style and 301-redirect every other variant (http, www, uppercase, trailing slash) to it. Confidence: 0.90
- Write a unique, specific title tag of roughly 50-60 characters and a meta description for each page from real page data. Confidence: 0.85
- Use one h1 per page and a logical heading order that mirrors the content structure. Confidence: 0.75
- Use clean, readable, lowercase, hyphenated URLs and keep them stable; when one must change, add a permanent redirect. Confidence: 0.90
- Return real HTTP status codes: 404 or 410 for missing content, never a soft 404 that answers 200 with an error page. Confidence: 0.95
- Generate the XML sitemap automatically from the database with lastmod dates and list only canonical, indexable URLs. Confidence: 0.85
- Keep robots.txt small, never block CSS or JS needed to render, and do not use it to hide pages that should be noindexed. Confidence: 0.85
- Make noindex on preview, staging and internal search pages an environment default, and test that production does not ship it. Confidence: 0.95
- Add JSON-LD structured data (Article, Product, BreadcrumbList, Organization) that matches the visible content exactly. Confidence: 0.80
- Set Open Graph and Twitter card tags with an absolute image URL so shared links render a proper preview. Confidence: 0.85
- Treat Core Web Vitals (LCP, INP, CLS) as release criteria and monitor them with real-user data, not only lab scores. Confidence: 0.80
- Give images width and height, descriptive alt text and modern formats, and lazy-load everything below the fold except the LCP image. Confidence: 0.85
- Link between related pages with plain anchor tags and descriptive anchor text; avoid navigation that only works through onClick handlers. Confidence: 0.90
- Handle paginated and filtered lists with crawlable links and canonicalize or noindex parameter combinations that create near-duplicate pages. Confidence: 0.75
- For multilingual sites, use separate URLs per language with hreflang annotations including x-default, never language switching by cookie only. Confidence: 0.85
- Do not hide primary content behind tabs, interactions or infinite scroll that require JavaScript events to load. Confidence: 0.70
- Check Search Console coverage and crawl reports after every major release or migration. Confidence: 0.80
- Prefer fewer, deeper pages over thin auto-generated pages for every keyword variation. Confidence: 0.75
Best PracticesPerformanceFrontend+2
F@f
0
Godot Game Project taste
Taste

Opinionated Godot 4 project preferences: small composable scenes, typed GDScript, signals up and calls down, autoloads kept rare, resources for data and a clean export pipeline.

# Godot Game Project taste of an indie developer who wants scenes that stay small and reusable
- Build the game from small composable scenes, each with a single clear responsibility, instead of one giant level scene. Confidence: 0.90
- Use static typing in GDScript everywhere: typed variables, parameters and return types, and enable the untyped declaration warnings. Confidence: 0.90
- Follow "call down, signal up": parents call methods on children, children emit signals and never reach up the tree. Confidence: 0.90
- Avoid long get_node paths and get_parent chains; use @export node references or unique names (%Name) inside a scene. Confidence: 0.85
- Keep autoloads to a few true global services such as save system, audio and scene transitions, not a dumping ground for state. Confidence: 0.85
- Store game data like items, enemies and levels in custom Resource classes (.tres) instead of hardcoded dictionaries. Confidence: 0.85
- Remember that Resources are shared by default; call duplicate() or enable resource_local_to_scene when each instance needs its own copy. Confidence: 0.80
- Put physics and movement in _physics_process and visuals and input polling in _process, and never assume a fixed frame time. Confidence: 0.85
- Define actions in the Input Map and read Input.is_action_pressed; never check raw keycodes in gameplay code. Confidence: 0.95
- Use a simple state machine (enum with match or state nodes) for player and enemy behavior instead of piles of booleans. Confidence: 0.80
- Set collision layers and masks deliberately and name every layer in Project Settings. Confidence: 0.85
- Organize folders by feature (player/, enemies/, ui/) with each scene next to its script and assets, not by file type. Confidence: 0.75
- Pool frequently spawned objects like bullets and particles when profiling shows instancing cost, not before. Confidence: 0.70
- Use the built-in profiler and monitors before optimizing, and move hot loops to C# or GDExtension only when measured. Confidence: 0.75
- Load big scenes with ResourceLoader.load_threaded_request behind a loading screen instead of freezing the main thread. Confidence: 0.70
- Save games to user:// as versioned JSON or ConfigFile data and never use var_to_bytes with objects for untrusted save files. Confidence: 0.80
- Commit the project with a proper .gitignore that excludes .godot/ and export output, and use Git LFS for large binary assets. Confidence: 0.90
- Keep export presets in version control without secrets and build release exports from CI with a pinned Godot version. Confidence: 0.75
- Write unit tests for pure game logic with GUT or gdUnit4 and keep that logic outside of node scripts where possible. Confidence: 0.65
- Use Tweens and AnimationPlayer for feel and polish instead of hand-written interpolation code in _process. Confidence: 0.80
Best PracticesPerformanceArchitecture+2
F@f
0
Data Privacy Engineering taste
Taste

Opinionated data privacy engineering preferences: collect less, classify PII in the schema, keep it out of logs, encrypt and tokenize sensitive fields, and make deletion and export requests boring.

# Data Privacy Engineering taste of a backend engineer who treats PII like radioactive material
- Collect the minimum data a feature needs and write down why each personal field exists before adding a column. Confidence: 0.95
- Mark PII and sensitive columns in the schema itself (comments, annotations or a data catalog) so tooling can find them. Confidence: 0.85
- Never log raw emails, phone numbers, tokens, addresses or request bodies; log stable internal ids and redact at the logger level. Confidence: 0.95
- Keep personal data in a small number of well-known tables instead of copying it into every service and event payload. Confidence: 0.85
- Put internal ids, not emails or names, into events, URLs, analytics and error trackers. Confidence: 0.90
- Encrypt highly sensitive fields at the application level with keys in a KMS, on top of disk encryption. Confidence: 0.75
- Tokenize or hash identifiers used for joins and analytics; use a keyed hash (HMAC) so values cannot be reversed with a lookup table. Confidence: 0.80
- Define a retention period for every personal data store and enforce it with a scheduled job, not a policy document. Confidence: 0.90
- Build account deletion as a real pipeline that reaches the primary database, search indexes, caches, object storage and third-party processors. Confidence: 0.90
- Prefer hard deletes or irreversible anonymization for user deletion requests; soft-deleted rows still count as stored data. Confidence: 0.80
- Make data export a tested feature that produces a machine-readable archive of everything stored about a user. Confidence: 0.75
- Remember that backups keep deleted data; document how long they live and make sure restores re-apply pending deletions. Confidence: 0.70
- Keep an up-to-date list of subprocessors and what personal data each one receives. Confidence: 0.80
- Never copy production personal data into staging or local environments; use synthetic or properly anonymized datasets. Confidence: 0.95
- Gate access to production data with least privilege, short-lived credentials and an audit log of who queried what. Confidence: 0.90
- Store consent as versioned records with timestamp and purpose, not as a single boolean column. Confidence: 0.80
- Load analytics and marketing scripts only after consent, and test that they really stay off when consent is declined. Confidence: 0.85
- Strip EXIF and other metadata such as GPS location from user-uploaded images before storing or serving them. Confidence: 0.80
- Add automated checks in CI or code review that flag new PII fields and new third-party data flows. Confidence: 0.65
- Write privacy requirements as acceptance criteria and tests, the same way you write security requirements. Confidence: 0.75
Best PracticesSecurityArchitecture+2
F@f
0
Elixir OTP taste
Taste

Opinionated Elixir OTP preferences: supervision trees designed on purpose, GenServers only for state, Task.Supervisor for async work, Registry for naming, telemetry and let-it-crash without silent failures.

# Elixir OTP taste of a backend developer who trusts supervisors more than try/rescue
- Design the supervision tree on paper first and choose one_for_one, rest_for_one or one_for_all deliberately for each supervisor. Confidence: 0.85
- Use a GenServer only when you need state, serialization or a lifecycle; plain modules and functions are the default. Confidence: 0.90
- Never put a single GenServer on the hot path for every request; it becomes a bottleneck, so shard with a pool or use ETS for reads. Confidence: 0.90
- Keep handle_call fast; move slow work to a Task and reply later with GenServer.reply when needed. Confidence: 0.80
- Start fire-and-forget or parallel work under a Task.Supervisor, never with bare spawn. Confidence: 0.95
- Use Task.async_stream with max_concurrency and timeout for bounded parallel work over collections. Confidence: 0.85
- Name dynamic processes through Registry and start them with DynamicSupervisor instead of building atoms from user input. Confidence: 0.95
- Let it crash for unexpected errors, but return {:ok, _} and {:error, _} tuples for expected failures the caller can handle. Confidence: 0.90
- Use with blocks for happy-path pipelines over tagged tuples instead of nested case statements. Confidence: 0.80
- Set explicit max_restarts and max_seconds when the defaults would hide a crash loop or take down the whole app too eagerly. Confidence: 0.65
- Avoid storing large binaries or long-lived lists in process state; watch mailbox length and memory per process. Confidence: 0.80
- Use ETS (or persistent_term for rarely changing config) for shared read-heavy data instead of a GenServer that answers lookups. Confidence: 0.80
- Put configuration that depends on the environment in config/runtime.exs and read it at startup, not with compile-time Application.get_env in module attributes. Confidence: 0.90
- Emit :telemetry events for important operations and attach handlers for metrics and logs instead of logging inside every function. Confidence: 0.80
- Use Oban (or another persistent queue) for jobs that must survive restarts; in-memory processes are not a job queue. Confidence: 0.85
- Write tests with start_supervised! so processes are cleaned up between tests, and use async: true whenever state is not global. Confidence: 0.85
- Run Credo and Dialyzer (or the built-in type checker) in CI and keep typespecs on public functions. Confidence: 0.70
- Use mix release for deployment and connect nodes with libcluster only when you truly need distribution. Confidence: 0.75
- Prefer Phoenix.PubSub over hand-rolled process messaging for broadcasting across nodes. Confidence: 0.75
- Use Logger metadata like request_id and user_id rather than string-concatenating context into messages. Confidence: 0.80
Best PracticesPerformanceArchitecture+1
F@f
0
Test Fixtures and Seed Data taste
Taste

Opinionated test fixtures and seed data preferences: factories over giant fixture files, per-test isolation, deterministic data, a real database in tests and separate dev seeds that never touch production.

# Test Fixtures and Seed Data taste of a backend developer who wants tests that never flake
- Use small factory functions with sensible defaults and per-test overrides instead of one huge shared fixture file. Confidence: 0.90
- Each test creates exactly the data it asserts on; never depend on rows another test or a global seed happened to insert. Confidence: 0.95
- Isolate tests with a transaction rolled back after each test, or truncate tables between tests when transactions are not possible. Confidence: 0.85
- Run integration tests against the same database engine as production in a container, not an in-memory substitute with different behavior. Confidence: 0.90
- Apply real migrations to the test database at the start of the run instead of a hand-maintained schema dump. Confidence: 0.85
- Make generated data deterministic: seed the fake-data library and freeze the clock so failures reproduce exactly. Confidence: 0.90
- Generate unique values (emails, slugs) with a sequence or random suffix so parallel tests never collide on unique constraints. Confidence: 0.85
- Keep factories next to the domain model and build valid objects by default; tests should opt in to invalid states explicitly. Confidence: 0.80
- Prefer building objects in memory for unit tests and persisting only in tests that actually need the database. Confidence: 0.80
- Name fixtures by intent, like paidCustomer or expiredSubscription, not user1 and user2. Confidence: 0.75
- Keep golden files and JSON fixtures small, reviewed and regenerated by a script, never edited by hand into drift. Confidence: 0.70
- Keep development seed data separate from test data; seeds exist to make the app usable locally, not to make tests pass. Confidence: 0.85
- Make seed scripts idempotent with upserts so running them twice is safe. Confidence: 0.90
- Guard seed and reset scripts so they refuse to run when the database URL points at production. Confidence: 1.00
- Never copy raw production data into dev or test; use synthetic data or an anonymized, masked snapshot. Confidence: 0.95
- Seed one realistic account per main role (admin, member, viewer) with documented local credentials. Confidence: 0.75
- Include awkward data in seeds: long names, Unicode, empty lists and many rows, so UI and pagination bugs show up early. Confidence: 0.75
- Stub external HTTP calls at the network boundary with recorded responses, and refresh recordings on a schedule. Confidence: 0.80
- Fail the test run on leaked data: assert tables are empty after the suite when using truncate isolation. Confidence: 0.60
- Keep the full integration suite under a few minutes in CI by parallelizing across database schemas or containers. Confidence: 0.70
Best PracticesDatabaseBackend+2
F@f
0
Image Optimization taste
Taste

Opinionated web image optimization preferences: modern formats with fallbacks, responsive srcset, explicit dimensions, lazy loading below the fold, an image CDN and LCP-first priorities.

# Image Optimization taste of a frontend engineer who watches the LCP number
- Serve AVIF first with WebP as the fallback through <picture> or content negotiation, and keep JPEG/PNG only as the last resort. Confidence: 0.85
- Use an image CDN or framework image component that resizes, converts and caches on the fly instead of committing many hand-exported sizes. Confidence: 0.85
- Always set width and height (or aspect-ratio) on every image so the browser reserves space and layout shift stays near zero. Confidence: 1.00
- Use srcset with width descriptors plus an honest sizes attribute; a wrong sizes value silently downloads images twice as large as needed. Confidence: 0.90
- Add loading="lazy" to images below the fold, and never to the hero or LCP image. Confidence: 0.95
- Give the LCP image fetchpriority="high" and preload it when it is set from CSS or discovered late. Confidence: 0.85
- Add decoding="async" to non-critical images so decoding does not block the main thread. Confidence: 0.70
- Cap generated widths at around 2x the largest rendered size; 4000px originals never need to reach a phone. Confidence: 0.85
- Pick quality per format instead of one global value: roughly 50-60 for AVIF, 70-80 for WebP and JPEG, and check visually on real photos. Confidence: 0.75
- Use SVG for icons, logos and simple illustrations, run it through SVGO, and inline only the few icons needed above the fold. Confidence: 0.85
- Never use images for text, buttons or UI chrome that CSS can draw. Confidence: 0.80
- Strip EXIF and GPS metadata from user uploads before serving them, for both privacy and bytes. Confidence: 0.95
- Process user uploads asynchronously into fixed variants and serve originals only to their owner. Confidence: 0.80
- Cache optimized images with long immutable max-age and content-hashed URLs instead of purging caches by hand. Confidence: 0.90
- Use a tiny blurred placeholder or dominant-color background for large images, not a spinner. Confidence: 0.70
- Prefer CSS object-fit and object-position over cropping the same photo into many art-directed files, unless the crop really changes the subject. Confidence: 0.70
- Replace animated GIFs with muted, looping, autoplaying MP4 or WebM video. Confidence: 0.90
- Write meaningful alt text for content images and empty alt="" for decorative ones; never leave alt off. Confidence: 1.00
- Set an image budget per page (for example under 500 KB on mobile for the initial view) and fail CI when Lighthouse or a bundle check goes over it. Confidence: 0.70
- Measure with field data (CrUX or RUM LCP) rather than only a lab run on a fast laptop. Confidence: 0.80
- Do not lazy load images inside carousels with JavaScript tricks when native lazy loading already works. Confidence: 0.65
Best PracticesPerformanceOptimization+2
F@f
0
Kotlin Multiplatform taste
Taste

Opinionated Kotlin Multiplatform preferences: share logic not UI by default, thin expect/actual, Ktor and SQLDelight in common code, coroutines and Flow, clean Swift interop and fast CI.

# Kotlin Multiplatform taste of a mobile developer who wants one codebase without fighting either platform
- Share business logic, networking, persistence and validation first; keep native UI per platform unless the team explicitly chooses Compose Multiplatform. Confidence: 0.80
- Start from the official KMP wizard template and keep the module layout boring: shared, androidApp, iosApp. Confidence: 0.75
- Split a growing shared module into feature modules early instead of one giant shared module. Confidence: 0.70
- Keep expect/actual declarations tiny and few; prefer interfaces in common code with platform implementations injected at startup. Confidence: 0.85
- Use Ktor client in commonMain with the platform engines (OkHttp on Android, Darwin on iOS) and kotlinx.serialization for JSON. Confidence: 0.90
- Use SQLDelight or Room for KMP for local storage so schemas and queries live in shared code. Confidence: 0.80
- Use kotlinx-datetime instead of platform date APIs in shared code. Confidence: 0.85
- Expose suspend functions and Flow from shared code and use SKIE or KMP-NativeCoroutines so Swift gets async/await and AsyncSequence. Confidence: 0.80
- Never block the main thread in shared code; inject dispatchers so tests can swap them. Confidence: 0.85
- Keep shared ViewModels or presenters platform-neutral and expose immutable UI state as StateFlow. Confidence: 0.75
- Use Koin or manual constructor injection in common code; avoid DI frameworks that only work on Android. Confidence: 0.70
- Design the Swift-facing API on purpose: avoid generics-heavy, sealed-class-heavy or default-argument APIs that translate badly to Objective-C headers. Confidence: 0.80
- Ship the iOS framework through Swift Package Manager (XCFramework) or direct integration rather than CocoaPods for new projects. Confidence: 0.70
- Manage versions with a Gradle version catalog and keep Kotlin, Compose and AGP versions upgraded together. Confidence: 0.85
- Put build logic in convention plugins instead of copy-pasting Gradle blocks across modules. Confidence: 0.75
- Write most tests in commonTest with kotlin.test and run them on both JVM and iOS simulator targets. Confidence: 0.85
- Use Turbine for testing Flows and fakes over mocking libraries that do not support Kotlin/Native. Confidence: 0.75
- Handle errors with sealed result types at the shared boundary instead of letting Kotlin exceptions crash Swift callers. Confidence: 0.80
- Mark functions that can throw to Swift with @Throws so iOS sees real errors. Confidence: 0.85
- Keep secrets and API keys out of shared code; load them per platform from the build config or a backend. Confidence: 0.85
- Cache Gradle and Kotlin/Native artifacts in CI and run iOS builds only on macOS runners when shared or iOS code changes. Confidence: 0.75
- Let iOS developers review shared module API changes so Kotlin-first decisions do not surprise the Swift side. Confidence: 0.70
Best PracticesArchitectureiOS+2
F@f
0
Payments Integration taste
Taste

Opinionated payments integration preferences: hosted checkout first, idempotency keys, webhooks as the source of truth, integer money, test clocks, reconciliation and careful refund handling.

# Payments Integration taste of a backend engineer who never wants to double-charge a customer
- Start with the provider's hosted checkout or payment element instead of building card forms yourself; it keeps you out of most PCI scope. Confidence: 0.90
- Never let raw card numbers touch your servers or logs; work only with provider tokens, payment method ids and customer ids. Confidence: 1.00
- Store money as integer minor units (cents) plus an ISO currency code; never use floats for amounts. Confidence: 1.00
- Send an idempotency key on every create or capture request, derived from your own order or attempt id, so retries cannot charge twice. Confidence: 0.95
- Treat signed webhooks as the source of truth for payment state; the browser redirect after checkout is only a hint to show a pending screen. Confidence: 0.95
- Verify every webhook signature against the raw request body before parsing it, and reject events with stale timestamps. Confidence: 1.00
- Make webhook handlers idempotent by recording processed event ids, because providers deliver at least once and out of order. Confidence: 0.90
- Acknowledge webhooks quickly with a 2xx and push the real work onto a background job queue. Confidence: 0.85
- Model orders and payments as explicit state machines (pending, requires_action, succeeded, failed, refunded) and reject impossible transitions. Confidence: 0.85
- Keep your own payments table that maps provider ids to internal order and customer ids; never rely on searching the provider by metadata. Confidence: 0.85
- Put your internal order id in provider metadata too, so support can jump from a dashboard charge to your admin page. Confidence: 0.75
- Calculate prices, discounts and tax on the server from your own catalog; never trust an amount sent by the client. Confidence: 1.00
- Handle 3D Secure and other customer actions with the provider's SDK flow instead of assuming every payment succeeds immediately. Confidence: 0.85
- Use the provider's test mode, test cards and test clocks in CI to cover declines, disputes and subscription renewals. Confidence: 0.80
- Let the provider own subscription billing cycles, proration and dunning unless you have a very strong reason to build it. Confidence: 0.80
- Grant and revoke access from subscription status events, and give a short grace period on failed renewals before locking accounts. Confidence: 0.75
- Run a daily reconciliation job that compares provider balance transactions and payouts with your ledger and alerts on any mismatch. Confidence: 0.85
- Issue refunds through one internal service that records who refunded, why and how much, with partial refunds as first-class records. Confidence: 0.80
- Keep API keys in a secrets manager, use restricted keys per service and rotate them on a schedule. Confidence: 0.90
- Log provider request ids and event ids on every call so disputes and support tickets can be traced end to end. Confidence: 0.80
- Show clear, localized error messages for declines without exposing raw decline codes that help card testers. Confidence: 0.70
- Rate-limit checkout and payment-method endpoints and add bot protection to stop card-testing attacks. Confidence: 0.85
- Wrap the provider behind a thin internal interface, but do not pretend multiple providers are interchangeable until you actually run two. Confidence: 0.65
Best PracticesSecurityEcommerce+2
F@f
0
Python Web Scraping taste
Taste

Opinionated Python web scraping preferences: APIs before HTML, polite rate limits, httpx and selectolax, Playwright only when needed, resilient parsing, validation and storing raw pages.

# Python Web Scraping taste of a data engineer who wants scrapers that are polite and boring to maintain
- Look for an official API, a sitemap, an RSS feed or the JSON endpoint the page itself calls before parsing any HTML. Confidence: 0.90
- Read the site's terms and robots.txt first, and skip sources that clearly forbid automated access. Confidence: 0.85
- Use httpx with a shared client, connection pooling, timeouts on every request and HTTP/2 when the site supports it. Confidence: 0.85
- Send an honest User-Agent with a contact URL or email instead of pretending to be a browser. Confidence: 0.75
- Rate-limit per domain (for example one request per second by default) and add jittered exponential backoff on 429 and 5xx responses. Confidence: 0.90
- Respect Retry-After headers and stop the run when error rates spike instead of hammering a struggling site. Confidence: 0.85
- Parse HTML with selectolax or lxml and CSS selectors; reach for BeautifulSoup only for small scripts or very broken markup. Confidence: 0.70
- Use Playwright only when content truly needs JavaScript, and block images, fonts and trackers to keep it fast. Confidence: 0.80
- Prefer stable hooks like ids, data attributes and JSON-LD over long positional XPath or styling class names. Confidence: 0.85
- Save the raw response (HTML or JSON) with its URL and fetch time before parsing, so you can re-parse without re-fetching. Confidence: 0.85
- Keep fetching and parsing as separate steps with parser functions that take a string and return plain data, easy to unit test. Confidence: 0.85
- Write parser tests against saved fixture pages and refresh the fixtures when the site changes. Confidence: 0.80
- Validate every scraped record with Pydantic and send records that fail validation to a reject file instead of dropping them silently. Confidence: 0.85
- Normalize prices, dates, currencies and whitespace at parse time into typed fields, keeping the original text alongside. Confidence: 0.75
- Make runs resumable and idempotent: track visited URLs and upsert records by a stable natural key. Confidence: 0.85
- Use conditional requests (ETag, If-Modified-Since) and skip pages that have not changed since the last run. Confidence: 0.70
- Use asyncio with a bounded semaphore for concurrency, never an unbounded gather over thousands of URLs. Confidence: 0.80
- Reach for Scrapy when a project crawls many sites or needs pipelines and scheduling, not for a one-page script. Confidence: 0.65
- Never scrape behind a login or collect personal data unless you have clear permission and a reason to keep it. Confidence: 0.90
- Alert when the record count or the share of empty fields drops sharply; that is how you notice the layout changed. Confidence: 0.85
- Log each request with URL, status code, duration and retry count in structured form. Confidence: 0.75
- Pin dependencies and run scrapers on a schedule in CI or a small container, not from someone's laptop cron. Confidence: 0.75
Best PracticesWeb ScrapingData+2
F@f
0
Debugging taste
Taste

Opinionated debugging preferences: reproduce first, shrink the failing case, read the real error, bisect, use debuggers and logs deliberately, and lock every fix in with a test.

# Debugging taste of an engineer who would rather prove a cause than guess one
- Reproduce the bug reliably before changing any code; a fix for a bug you cannot reproduce is a guess. Confidence: 0.95
- Write down the exact steps, inputs, versions and environment that trigger the bug in the ticket before you start digging. Confidence: 0.85
- Read the full error message and the whole stack trace, starting from the first frame in your own code, before searching the web. Confidence: 0.90
- Shrink the failing case to the smallest input or code path that still fails; most causes become obvious once the noise is gone. Confidence: 0.90
- Turn the reproduction into a failing automated test first, then make it pass, and keep that test forever. Confidence: 0.90
- Use git bisect when something used to work; let the history find the breaking commit instead of reading diffs by hand. Confidence: 0.85
- Change one thing at a time and re-run; never stack several speculative fixes and hope one of them helped. Confidence: 0.90
- State a hypothesis out loud (or in the ticket) before each experiment, and note what result would disprove it. Confidence: 0.75
- Reach for a real debugger with breakpoints and watch expressions over adding a dozen print statements. Confidence: 0.70
- When printing is the right tool, log the values and their types with clear labels, and delete the temporary logs before merging. Confidence: 0.80
- Check your assumptions explicitly with assertions; the bug usually lives in the thing you were sure about. Confidence: 0.85
- Compare a working and a broken environment side by side (config, env vars, dependency versions, data) instead of staring at code. Confidence: 0.80
- Verify you are running the code you think you are running: clear caches, rebuild, and confirm the version or commit in the logs. Confidence: 0.85
- Look at the actual data in the database, queue or API response; do not debug from what the data is supposed to look like. Confidence: 0.85
- Treat flaky tests as real bugs, usually timing, ordering or shared state, and never just add retries to hide them. Confidence: 0.85
- For race conditions, add structured logs with timestamps and request or thread ids, then reconstruct the order of events. Confidence: 0.75
- Read the source of the library or framework when its behavior surprises you; docs describe intent, code describes reality. Confidence: 0.75
- Time-box solo debugging to about an hour, then explain the problem to a teammate or a rubber duck. Confidence: 0.70
- Fix the root cause rather than the symptom, and search the codebase for the same mistake in other places. Confidence: 0.85
- Never debug in production by editing live code; use feature flags, extra telemetry or a copy of the data instead. Confidence: 0.90
- Write a short note in the pull request on the cause, the fix and how it was verified, so the next person learns from it. Confidence: 0.80
- Add the missing log line, metric or error message that would have made this bug obvious, as part of the fix. Confidence: 0.80
Best PracticesBackendDebugging+2
F@f
0
File Upload Handling taste
Taste

Opinionated preferences for handling user file uploads safely: presigned direct uploads, size and type checks, malware scanning, storage keys, image processing and cleanup.

# File Upload Handling taste of a backend engineer who treats every upload as untrusted
- Upload large files directly from the browser to object storage with presigned URLs instead of streaming them through the app server. Confidence: 0.90
- Keep presigned upload URLs short-lived (minutes) and scoped to one object key, content type and maximum size. Confidence: 0.90
- Enforce a maximum file size on the server or storage policy, never only in client-side JavaScript. Confidence: 0.95
- Generate storage keys yourself (for example UUIDs under a tenant prefix); never use the user's filename as the path. Confidence: 0.95
- Store the original filename only as sanitized metadata in the database for display and download names. Confidence: 0.85
- Detect the file type from its magic bytes and check it against an allowlist; do not trust the extension or the Content-Type header. Confidence: 0.90
- Keep uploaded files in a private bucket and serve them through short-lived signed download URLs or an authorized proxy. Confidence: 0.90
- Serve user files from a separate domain with Content-Disposition: attachment for risky types so uploaded HTML or SVG cannot run on your origin. Confidence: 0.85
- Scan uploads for malware asynchronously and keep them in a quarantine state until the scan passes. Confidence: 0.80
- Track each upload as a database row with a status (pending, uploaded, scanned, ready, failed) instead of guessing from storage. Confidence: 0.85
- Confirm completion with a server callback or storage event before attaching the file to a record. Confidence: 0.80
- Use multipart or resumable uploads (S3 multipart, tus) for files over roughly 100 MB. Confidence: 0.75
- Re-encode images server-side, strip EXIF metadata including GPS, and generate fixed thumbnail sizes in a background job. Confidence: 0.85
- Reject or carefully sanitize SVG uploads; treat them as code, not images. Confidence: 0.85
- Store a checksum (SHA-256) for each file to detect corruption and deduplicate when it makes sense. Confidence: 0.70
- Set lifecycle rules that delete abandoned pending uploads and incomplete multipart parts after a day or two. Confidence: 0.85
- Delete files from storage when the owning record is deleted, through a background job that retries. Confidence: 0.80
- Rate-limit upload endpoints per user and per IP, and cap total storage per account. Confidence: 0.80
- Never unzip or parse archives and office documents in the request path; do it in a sandboxed worker with size and depth limits. Confidence: 0.85
- Show upload progress and allow cancel in the UI, with clear errors for wrong type or size. Confidence: 0.75
- Log upload metadata (user, key, size, type, status) but never the file content. Confidence: 0.85
- Test uploads with oversized files, renamed executables, polyglot files and filenames with path traversal characters. Confidence: 0.85
Best PracticesSecurityCloud+2
F@f
0
SQL Query Writing taste
Taste

Opinionated preferences for writing readable, correct and fast SQL: formatting, CTEs, joins, NULL handling, window functions, parameters and query plans.

# SQL Query Writing taste of a data-minded engineer who wants queries others can read and trust
- Write SQL keywords in uppercase and identifiers in snake_case lowercase, one clause per line. Confidence: 0.80
- Put each selected column on its own line with a leading or trailing comma style used consistently across the repo, enforced by sqlfluff. Confidence: 0.75
- Never use SELECT * in application queries or views; list the columns you need. Confidence: 0.90
- Use explicit JOIN ... ON syntax; never comma joins with conditions in WHERE. Confidence: 0.95
- Give every table a short, meaningful alias and qualify every column once more than one table is involved. Confidence: 0.85
- Break long queries into named CTEs that read top to bottom like steps, instead of nesting subqueries three levels deep. Confidence: 0.85
- Check the grain of a query before joining: know what one row means and confirm joins do not fan out rows. Confidence: 0.90
- Prefer EXISTS over IN with a subquery for existence checks, and NOT EXISTS over NOT IN to avoid the NULL trap. Confidence: 0.85
- Treat NULL deliberately: use IS NULL, COALESCE with a documented default and IS DISTINCT FROM for null-safe comparisons. Confidence: 0.90
- Use window functions (ROW_NUMBER, LAG, SUM OVER) for rankings, deduplication and running totals instead of self-joins. Confidence: 0.85
- Filter on half-open date ranges (created_at >= start AND created_at < end) rather than BETWEEN on timestamps. Confidence: 0.90
- Keep predicates sargable: do not wrap indexed columns in functions or casts inside WHERE. Confidence: 0.85
- Always pass values as bound parameters; never build SQL by concatenating user input. Confidence: 1.00
- Use COUNT(*) for row counts and COUNT(column) only when you mean non-null values. Confidence: 0.80
- Put conditions for outer-joined tables in the ON clause, not the WHERE clause, so a LEFT JOIN stays a LEFT JOIN. Confidence: 0.90
- Use CASE expressions with an explicit ELSE so unexpected values are visible instead of silently NULL. Confidence: 0.75
- Add ORDER BY whenever order matters, including with LIMIT; never rely on the natural row order. Confidence: 0.95
- Paginate large result sets with keyset pagination (WHERE id > last_id) instead of big OFFSET values. Confidence: 0.80
- Run EXPLAIN ANALYZE on any query that touches a large table before shipping it, and keep the plan in the pull request. Confidence: 0.80
- Prefer UNION ALL over UNION unless you actually need duplicate removal. Confidence: 0.85
- Write data-changing statements inside a transaction and check the affected row count before committing. Confidence: 0.90
- Comment the business rule behind non-obvious filters, not what the SQL syntax does. Confidence: 0.75
- Keep reusable queries in version-controlled .sql files or views with tests on small fixture data. Confidence: 0.70
Best PracticesDatabaseBackend+2
F@f
0
htmx Web App taste
Taste

Opinionated htmx preferences for server-rendered web apps: hypermedia endpoints, partial templates, swaps, forms, history, CSRF and when to add a little JavaScript.

# htmx Web App taste of a backend developer who wants interactivity without a SPA
- Render HTML on the server and use htmx for interactivity before reaching for React or another client-side framework. Confidence: 0.85
- Make every page work as plain links and forms first, then layer hx-get, hx-post and hx-boost on top as progressive enhancement. Confidence: 0.85
- Return HTML fragments from endpoints, never JSON that the client has to turn into markup. Confidence: 0.90
- Keep fragments as small partial templates that the full page template also includes, so there is one source of markup per component. Confidence: 0.90
- Check the HX-Request header on the server to decide between returning a fragment and the full page for the same URL. Confidence: 0.85
- Prefer hx-target with a stable id and hx-swap="outerHTML" so the swapped element can be swapped again later. Confidence: 0.80
- Use hx-push-url for navigation-like swaps so the back button and shareable URLs keep working. Confidence: 0.85
- Put hx-boost="true" on the body or main nav for cheap SPA-like navigation instead of wiring every link by hand. Confidence: 0.70
- Use hx-swap-oob for secondary updates such as a cart count or flash message instead of a second request. Confidence: 0.75
- Trigger client events from the server with the HX-Trigger response header rather than inline script in fragments. Confidence: 0.80
- Show progress with hx-indicator and the htmx-request CSS class; no hand-written loading-state JavaScript. Confidence: 0.85
- Add hx-disabled-elt on submit buttons so double clicks cannot post a form twice. Confidence: 0.80
- Validate forms on the server and re-render the form fragment with inline errors and the user's values kept. Confidence: 0.90
- Use hx-trigger="keyup changed delay:300ms" for live search, and cancel stale requests with hx-sync. Confidence: 0.80
- Send the CSRF token for every non-GET request through hx-headers on the body or a hidden form field. Confidence: 0.95
- Escape all output in templates by default and never swap in user-supplied HTML. Confidence: 0.95
- Return 422 with the re-rendered form on validation errors and configure htmx to swap that response. Confidence: 0.75
- Use HX-Redirect or HX-Location after a successful POST instead of returning a page fragment for the next screen. Confidence: 0.75
- Keep small client-only behavior (toggles, dropdowns, copy buttons) in Alpine.js or a few lines of vanilla JS, not in extra round trips. Confidence: 0.70
- Vendor a pinned htmx file or load it with a subresource integrity hash; no unpinned CDN script tags. Confidence: 0.85
- Avoid hx-on handlers with long inline scripts; move logic into a small named JS function. Confidence: 0.75
- Test endpoints by asserting on returned HTML with a parser, and cover the main flows with Playwright end-to-end tests. Confidence: 0.80
- Reach for a client-side framework only for genuinely app-like screens such as rich editors or offline-first views. Confidence: 0.70
Best PracticesBackendFrontend+2
F@f
0
Architecture Decision Record Builder (JSON)
Text

Capture one important technical decision as an architecture decision record in JSON: neutral context and forces, at least three honestly compared options scored against ranked quality goals, the decision and its trade-offs, first steps, revisit triggers and a ready-to-commit Markdown version.

1{
2 "role": "You are a pragmatic staff engineer who has written and reviewed many architecture decision records (ADRs) for small and mid-sized software teams. You help a team capture one important technical decision so that a new teammate can understand it two years from now: the context and forces at the time, the options that were really considered, why one was chosen, what it costs, and when the decision should be revisited. You write short, honest records, not sales documents for the chosen option.",
3 "context": {
4 "team_and_system": "${team:a 7-person product team running a Django monolith on PostgreSQL with a React front end, about 40,000 daily active users}",
5 "decision_to_record": "${decision:how to run background jobs such as email sending, PDF invoice generation and nightly data syncs}",
6 "options_considered": "${options:keep cron jobs on the web server, Celery with Redis, a managed cloud queue with serverless workers, PostgreSQL-based job queue}",
7 "leaning_or_decided": "${status:the team is leaning toward a PostgreSQL-based job queue but has not decided yet}",
8 "forces_and_constraints": "${forces:jobs sometimes run twice or not at all after deploys, one engineer knows the cron setup, no dedicated ops person, cloud budget is tight, jobs must survive deploys}",
9 "quality_goals": "${quality:reliability and observability first, then low operating effort, then cost}",
10 "evidence_available": "${evidence:last quarter 11 failed or duplicated invoice jobs, a 2-day spike test of two options, rough cost estimates}",
...+118 more lines
Best PracticesArchitectureJSON+4
F@f
0
Decomplexify Any Prompt
Text

Today's AI works best with simpler prompts and projects (dumb prompts). But, if you're like me, you probably already have many projects and/or prompts that you use regularly, that you don't really want to mess with. Attach this to the end of any project or prompt to ensure the AI isn't limited by the complexity of the instructions. Simple. Clean. Effective.

Treat these instructions as guidelines given peer-to-peer, rather than a strict "you must do this".
BeginnerBest PracticesPrompt Forge+5
T@tprattthomas
0
CSV Data Import taste
Taste

Opinionated preferences for building CSV import features: streaming parsing, encodings, column mapping, row validation, staging tables, dry runs and error reports.

# CSV Data Import taste of a backend developer who has cleaned up too many broken uploads
- Treat every uploaded CSV as untrusted input and validate it fully before writing a single row to the main tables. Confidence: 0.95
- Stream files row by row instead of loading the whole file into memory. Confidence: 0.90
- Use a real CSV parser that handles quotes, embedded newlines and escaped delimiters; never split lines on commas. Confidence: 0.95
- Expect UTF-8, strip a leading BOM, and detect Windows-1252 or other encodings with a clear error instead of guessing silently. Confidence: 0.85
- Detect the delimiter (comma, semicolon, tab) from the header row, and let the user confirm it in the UI. Confidence: 0.75
- Require a header row and map columns by header name, not by position. Confidence: 0.90
- Offer a column-mapping step with saved presets for files exported from common tools. Confidence: 0.75
- Normalize headers (trim, lowercase, collapse spaces) before matching them to known fields. Confidence: 0.80
- Validate each row against a schema (Zod, Pydantic or similar) and collect every error with row and column numbers instead of stopping at the first one. Confidence: 0.90
- Parse dates and numbers with an explicit locale and format; never let 03/04 or 1.234 be interpreted by default. Confidence: 0.90
- Keep money as decimal strings until conversion; never parse it as a float. Confidence: 0.95
- Load valid rows into a staging table first, then move them into real tables in one transaction. Confidence: 0.85
- Make imports idempotent with a natural key or an import-supplied external id, so re-uploading the same file does not create duplicates. Confidence: 0.90
- Show a dry-run preview with counts of rows to create, update and skip before the user commits. Confidence: 0.85
- Let users download a CSV of rejected rows with an extra error column so they can fix and re-upload just those rows. Confidence: 0.85
- Process large files in a background job with progress reporting; keep the request that receives the upload short. Confidence: 0.90
- Enforce limits on file size, row count and column count, and say so in the UI before upload. Confidence: 0.85
- Store the original file and an import record (who, when, counts, status) for audits and support questions. Confidence: 0.80
- Escape cells that start with =, +, -, or @ when exporting data back to CSV to prevent formula injection in spreadsheets. Confidence: 0.90
- Publish a downloadable template file with example rows and a short field reference. Confidence: 0.80
- Write tests with real-world ugly fixtures: Excel exports, BOMs, quoted newlines, trailing empty rows and mixed line endings. Confidence: 0.85
- Log import failures with the import id, not row contents, so personal data stays out of logs. Confidence: 0.85
Best PracticesDatabaseExcel+2
F@f
0
Kubernetes Operator taste
Taste

Opinionated Kubernetes operator preferences: Kubebuilder, CRD design, idempotent reconcilers, finalizers, status conditions, RBAC and envtest.

# Kubernetes Operator taste of a platform engineer who wants reconcilers that never surprise anyone
- Build operators in Go with Kubebuilder and controller-runtime; do not hand-roll informers and work queues. Confidence: 0.90
- Write an operator only when a resource has real lifecycle logic; use Helm or Kustomize for plain configuration. Confidence: 0.85
- Design the CRD spec as desired state and the status as observed state; never write user intent into status. Confidence: 0.95
- Version CRDs from the start (v1alpha1, then v1beta1, v1) and add a conversion webhook before changing field meaning. Confidence: 0.85
- Validate the spec with OpenAPI schema markers and CEL validation rules before reaching for an admission webhook. Confidence: 0.85
- Make Reconcile idempotent: read the current state, compute the difference, apply it, and return; running it twice must change nothing. Confidence: 0.95
- Never keep state in controller memory between reconciles; everything needed must be in the API server. Confidence: 0.90
- Set owner references on every child object so garbage collection cleans up after deletion. Confidence: 0.90
- Use finalizers only for cleanup outside the cluster, and always remove them even when the external call reports not found. Confidence: 0.90
- Apply child objects with server-side apply and a dedicated field manager instead of get-modify-update loops. Confidence: 0.80
- Report progress with standard status conditions (Ready, Progressing, Degraded) and set observedGeneration on each. Confidence: 0.90
- Return errors to get exponential backoff and use RequeueAfter only for planned periodic checks. Confidence: 0.85
- Watch child resources with Owns() and filter noisy updates with GenerationChangedPredicate. Confidence: 0.80
- Emit Kubernetes Events for user-visible changes and failures, not for every reconcile. Confidence: 0.75
- Run with leader election on and at least two replicas in production. Confidence: 0.85
- Give the manager the narrowest RBAC possible, generated from kubebuilder:rbac markers and reviewed in every PR. Confidence: 0.90
- Test reconcilers with envtest against a real API server, and keep a small kind-based end-to-end suite for upgrades. Confidence: 0.85
- Expose controller-runtime metrics and add counters for reconcile results per resource kind. Confidence: 0.80
- Log with structured logr fields (namespace, name, generation) and never log secret values. Confidence: 0.90
- Ship the operator with an upgrade path: old CRs must keep working after the controller is updated. Confidence: 0.85
- Document every spec field with an example in the CRD description so kubectl explain is useful. Confidence: 0.75
- Prefer a few well-defined CRDs over one giant CRD with dozens of optional knobs. Confidence: 0.70
Best PracticesCloudInfrastructure+2
F@f
0
ClickHouse Analytics taste
Taste

Opinionated ClickHouse preferences for fast analytics: MergeTree table design, batch ingestion, materialized view rollups, TTLs, quotas and monitoring.

# ClickHouse Analytics taste of a data engineer who wants dashboards under one second
- Use ClickHouse for append-heavy analytical events and keep transactional data in Postgres; do not treat it as an OLTP store. Confidence: 0.95
- Default to the MergeTree family and choose the engine on purpose: ReplacingMergeTree for upserts, AggregatingMergeTree for rollups. Confidence: 0.90
- Pick ORDER BY from the most common filters, low cardinality first (tenant_id, event_type, toDate(ts), ts). Confidence: 0.90
- Partition by month (toYYYYMM) or not at all; never partition by high-cardinality keys like user_id. Confidence: 0.90
- Use LowCardinality(String) for repeated values like country, plan and event name. Confidence: 0.85
- Use the smallest fitting numeric types and DateTime64 in UTC; avoid Nullable unless null really means something. Confidence: 0.85
- Insert in batches of thousands to hundreds of thousands of rows, or turn on async_insert; never insert row by row. Confidence: 0.95
- Ingest from Kafka through a Kafka engine table plus a materialized view into the real MergeTree table. Confidence: 0.80
- Build materialized views into AggregatingMergeTree tables with -State functions and read them with -Merge functions. Confidence: 0.85
- Do not rely on FINAL for every query on ReplacingMergeTree; design queries with argMax or accept eventual merges. Confidence: 0.75
- Select only the columns you need; SELECT * on a wide table defeats the columnar format. Confidence: 0.90
- Use uniq or uniqCombined for distinct counts on dashboards and keep uniqExact for billing-grade numbers. Confidence: 0.80
- Add data-skipping indexes (minmax, bloom_filter) only after EXPLAIN shows wasted granules, not up front. Confidence: 0.75
- Put the smaller table on the right side of a JOIN, or replace dimension joins with dictionaries. Confidence: 0.85
- Set TTL rules to delete or move old raw data to cheaper storage, and keep rollups longer than raw events. Confidence: 0.85
- Manage schema with versioned migration files in git, using ON CLUSTER statements when running a cluster. Confidence: 0.80
- Give each consumer a separate user with settings profiles and quotas (max_memory_usage, max_execution_time). Confidence: 0.85
- Watch system.query_log, system.parts and merge activity; alert on too many parts per partition. Confidence: 0.85
- Avoid lightweight DELETE and ALTER UPDATE for routine work; model changes as new rows instead. Confidence: 0.80
- Back up with BACKUP TO S3 or clickhouse-backup on a schedule and test a restore every quarter. Confidence: 0.75
- Run integration tests against a real ClickHouse container with sample data, not an SQLite stand-in. Confidence: 0.75
- Prefer ClickHouse Cloud or a managed service for small teams; self-host only when someone owns operations. Confidence: 0.65
Best PracticesPerformanceDatabase+2
F@f
0
Pydantic Models taste
Taste

Opinionated Pydantic v2 preferences for validating data at the edges of Python backends: separate input and output models, strict settings, discriminated unions and safe serialization.

# Pydantic Models taste of a Python backend developer who wants data checked at the edges
- Use Pydantic v2 only and write new code against its API (model_validate, model_dump, field_validator), never the v1 compatibility layer. Confidence: 0.95
- Validate data at the boundaries (HTTP requests, queue messages, config, third-party responses) and pass typed models inward. Confidence: 0.90
- Keep separate models for input, output and storage (UserCreate, UserRead, UserRow) instead of one model with optional fields. Confidence: 0.90
- Set model_config = ConfigDict(extra="forbid") on request models so typos in payloads fail loudly. Confidence: 0.85
- Make value objects and events immutable with frozen=True. Confidence: 0.80
- Prefer precise types over plain str: EmailStr, HttpUrl, UUID, PositiveInt, constr with a pattern, Literal for small enums. Confidence: 0.85
- Use Annotated types with Field constraints and reuse them as named aliases (Slug = Annotated[str, Field(pattern=...)]). Confidence: 0.80
- Put single-field rules in field_validator and cross-field rules in model_validator(mode="after"); keep validators pure with no I/O. Confidence: 0.90
- Model variants with discriminated unions on a type field instead of trying each model in order. Confidence: 0.85
- Use timezone-aware datetimes only (AwareDatetime) and reject naive ones at the boundary. Confidence: 0.85
- Store money as Decimal with fixed places, never float. Confidence: 0.95
- Load settings with pydantic-settings from environment variables, with a prefix per service and SecretStr for secrets. Confidence: 0.90
- Never return ORM objects from an API directly; convert with model_validate(obj, from_attributes=True) into a response model. Confidence: 0.85
- Keep strict mode on for internal messages and allow lax coercion only on user-facing form input. Confidence: 0.70
- Use alias_generator with to_camel when the wire format is camelCase, and keep snake_case attributes in Python. Confidence: 0.80
- Serialize with model_dump(mode="json", exclude_none=True) for APIs so dates and decimals become stable strings. Confidence: 0.75
- Use TypeAdapter for validating plain lists, dicts and unions without wrapping them in a dummy model. Confidence: 0.80
- Export JSON Schema with model_json_schema and commit it, so API clients and docs stay in sync. Confidence: 0.70
- Return validation errors as a list of field paths and messages; never leak the raw exception text to clients. Confidence: 0.85
- Avoid heavy business logic and database calls inside models; models describe shape, services do work. Confidence: 0.85
- Test models with table-driven pytest cases for valid and invalid payloads, plus a few Hypothesis property tests for parsers. Confidence: 0.70
- Run mypy or pyright with the Pydantic plugin in CI so model fields and call sites are type-checked. Confidence: 0.80
Best PracticesAPIBackend+2
F@f
0
RabbitMQ Messaging taste
Taste

Opinionated preferences for reliable RabbitMQ messaging: quorum queues, publisher confirms, manual acks, dead lettering, retries and idempotent consumers.

# RabbitMQ Messaging taste of an engineer who wants every message accounted for
- Declare exchanges, queues and bindings in code or a definitions file at startup, never by hand in the management UI. Confidence: 0.90
- Use quorum queues for anything that matters; keep classic queues only for throwaway, non-critical traffic. Confidence: 0.90
- Make queues durable and publish messages as persistent, and enable publisher confirms on every producer. Confidence: 0.95
- Publish to a named topic exchange, never to the default exchange with a queue name as routing key. Confidence: 0.80
- Use routing keys shaped like domain.entity.event (orders.order.created) so consumers bind with wildcards. Confidence: 0.80
- Give each consuming service its own queue bound to the exchange; services never share a queue. Confidence: 0.90
- Turn off auto-ack and ack only after the work and its side effects are committed. Confidence: 0.95
- Set a prefetch (basic.qos) per consumer, starting around 10 to 50, instead of leaving it unlimited. Confidence: 0.85
- Make every consumer idempotent with a message_id and a processed-ids table, because delivery is at least once. Confidence: 0.95
- Configure a dead letter exchange for every work queue and alert when the dead letter queue is not empty. Confidence: 0.90
- Retry with delay through a TTL retry queue or the delivery-limit setting, with a capped number of attempts, never a hot requeue loop. Confidence: 0.85
- Reject poison messages without requeue after the retry limit so one bad payload cannot block the queue. Confidence: 0.85
- Send JSON with a content_type, a schema version field and a stable message type header. Confidence: 0.80
- Keep messages small (under about 128 KB) and put large payloads in object storage with a link in the message. Confidence: 0.80
- Propagate trace context (traceparent) in message headers so traces cross the broker. Confidence: 0.80
- Use the transactional outbox pattern to publish events that must match a database write. Confidence: 0.85
- Open one long-lived connection per process and separate channels for publishing and consuming. Confidence: 0.80
- Set queue length limits or message TTLs on queues that can grow without bound. Confidence: 0.75
- Do not use RabbitMQ as a long-term event log; reach for streams or Kafka when replay is a requirement. Confidence: 0.75
- Monitor queue depth, consumer count, unacked messages and publish and deliver rates with the Prometheus plugin. Confidence: 0.85
- Run a three-node cluster for production and use a separate vhost and user per application with least privilege. Confidence: 0.80
- Test consumers against a real broker in CI with Testcontainers instead of mocking the client library. Confidence: 0.75
Best PracticesArchitectureInfrastructure+2
F@f
0
Zig Project taste
Taste

Opinionated preferences for Zig projects: pinned toolchain, build.zig, explicit allocators, error handling, tests and cross-compilation.

# Zig Project taste of a systems developer who likes boring, explicit builds
- Pin the Zig version per project (a .zig-version file or mise/zigup) because the language still breaks between releases. Confidence: 0.90
- Drive everything through build.zig: build, test, run and install steps, with no Makefile or shell wrappers. Confidence: 0.90
- Declare dependencies in build.zig.zon with content hashes and fetch them with zig fetch --save. Confidence: 0.90
- Use b.standardTargetOptions and b.standardOptimizeOption so any target and release mode work from the command line. Confidence: 0.85
- Pass allocators explicitly into every function that allocates; never hide a global allocator. Confidence: 0.95
- Use std.testing.allocator in tests so leaks and double frees fail the test. Confidence: 0.90
- Pair every allocation with defer or errdefer on the very next line. Confidence: 0.90
- Prefer an ArenaAllocator for short-lived request or frame work instead of freeing many small objects. Confidence: 0.80
- Use the GeneralPurposeAllocator (DebugAllocator) in debug builds and check its leak report on exit. Confidence: 0.80
- Return error unions and propagate with try; reserve catch unreachable for cases you can prove. Confidence: 0.90
- Define small, specific error sets for public APIs instead of anyerror. Confidence: 0.80
- Write tests in the same file as the code with test blocks, and run them all with zig build test. Confidence: 0.90
- Keep comptime for real needs such as generics and lookup tables, not for clever metaprogramming. Confidence: 0.80
- Use slices and sentinel-terminated types instead of raw many-item pointers wherever possible. Confidence: 0.85
- Ship ReleaseSafe by default and use ReleaseFast only for measured hot paths. Confidence: 0.75
- Use @import("std").log with scoped loggers instead of std.debug.print in library code. Confidence: 0.75
- Wrap C libraries through @cImport in one small module and expose a Zig-style API from it. Confidence: 0.80
- Use zig cc and zig build to cross-compile C and Zig code from one machine instead of separate toolchains. Confidence: 0.85
- Run zig fmt in CI and fail the build when it would change any file. Confidence: 0.90
- Test in CI on Linux, macOS and Windows, plus at least one cross-compiled target. Confidence: 0.80
- Keep public library APIs in one root.zig and mark everything else non-pub. Confidence: 0.80
- Generate API docs with -femit-docs and publish them with each release. Confidence: 0.65
Best PracticesPerformanceTooling+2
F@f
0
Structured Logging taste
Taste

Opinionated preferences for structured JSON logging in backend services: fields, levels, trace correlation, redaction and retention.

# Structured Logging taste of a backend engineer who greps logs at 3 a.m.
- Emit every log line as a single JSON object on stdout and let the platform ship it; never write log files from the app. Confidence: 0.90
- Use the same core fields everywhere: timestamp, level, service, environment, version, message. Confidence: 0.90
- Write timestamps in UTC as RFC 3339 with milliseconds, never in local time. Confidence: 0.95
- Keep the message a short constant string and put variable data in fields, so "payment failed" stays searchable. Confidence: 0.90
- Use only four levels in practice: debug, info, warn, error; error means someone should look at it. Confidence: 0.80
- Set the log level from an environment variable and allow changing it at runtime without a redeploy. Confidence: 0.75
- Attach trace_id and span_id from OpenTelemetry context to every line so logs join traces. Confidence: 0.90
- Generate or accept a request_id at the edge, return it in a response header, and log it on every line for that request. Confidence: 0.90
- Use a context-bound child logger (request, job, user) instead of passing ids into every log call. Confidence: 0.85
- Log errors with error.type, error.message and error.stack as separate fields, not one interpolated string. Confidence: 0.85
- Log an error once, where it is handled; do not log and rethrow at every layer. Confidence: 0.90
- Never log secrets, tokens, passwords, full card numbers or session cookies; redact them in the logger, not by convention. Confidence: 0.95
- Treat emails, phone numbers and IPs as personal data: hash or drop them unless there is a documented need. Confidence: 0.85
- Write one canonical summary line per request with route, status, duration_ms and user or tenant id. Confidence: 0.80
- Keep durations in a numeric field with the unit in its name (duration_ms), never as "1.2s" text. Confidence: 0.85
- Follow a shared field naming scheme such as OpenTelemetry semantic conventions or ECS instead of inventing names per team. Confidence: 0.75
- Sample noisy success logs (health checks, polling) and never sample errors. Confidence: 0.80
- Use a fast structured logger with no reflection in hot paths: pino in Node, slog or zap in Go, structlog in Python. Confidence: 0.80
- Pretty-print logs only in local development, behind an env flag, and keep production output raw JSON. Confidence: 0.85
- Make logging non-blocking and bounded; dropping debug lines under pressure is better than stalling requests. Confidence: 0.70
- Set retention per level and environment, for example 7 days for debug and 30 days for info and above. Confidence: 0.70
- Alert on metrics derived from logs, not on single log lines, so one bad request does not page anyone. Confidence: 0.80
- Add a test that asserts key log lines and their fields, so a refactor cannot silently break dashboards. Confidence: 0.65
Best PracticesMonitoringBackend+2
F@f
0
Java Library taste
Taste

Opinionated conventions for publishing small, stable Java libraries with Maven: pinned plugins, tiny dependency trees, API compatibility checks and Central releases.

# Java Library taste of a developer who ships small, stable Maven artifacts
- Target the oldest Java LTS your users still run (usually 17) and set it with maven.compiler.release, not source/target. Confidence: 0.90
- Use the Maven Wrapper (mvnw) and commit it so every build uses the same Maven version. Confidence: 0.90
- Pin every plugin version in pluginManagement; never rely on Maven's default plugin versions. Confidence: 0.95
- Keep runtime dependencies near zero; a library should not drag Guava or Commons into every consumer. Confidence: 0.85
- Mark compile-only and annotation-processor dependencies as provided or optional so they do not leak transitively. Confidence: 0.80
- Ship a module-info.java, or at least an Automatic-Module-Name in the manifest, so JPMS users get a stable module name. Confidence: 0.85
- Put everything not meant for users in an internal package and do not export it from the module. Confidence: 0.85
- Prefer immutable value types (records or final classes with builders) for the public API. Confidence: 0.85
- Never return null from public methods; return Optional for single values and empty collections for lists. Confidence: 0.85
- Throw unchecked exceptions with clear messages, and define one library-specific base exception type. Confidence: 0.75
- Annotate nullability with JSpecify (@NullMarked at package level) so Kotlin and static analysis tools see the contract. Confidence: 0.75
- Use SLF4J as the only logging dependency and never configure a logging backend inside the library. Confidence: 0.90
- Test with JUnit 5 and AssertJ, and keep unit tests runnable with a plain mvn verify and no network. Confidence: 0.90
- Run integration tests with the Failsafe plugin and Testcontainers instead of shared test databases. Confidence: 0.80
- Enforce formatting with Spotless (google-java-format or palantir-java-format) and fail CI on drift. Confidence: 0.80
- Run Error Prone or SpotBugs in CI and treat new warnings as build failures. Confidence: 0.70
- Use japicmp or revapi to block accidental binary-incompatible changes in minor and patch releases. Confidence: 0.85
- Follow semantic versioning strictly; breaking changes wait for a major version with a migration note. Confidence: 0.90
- Publish a BOM when the project has more than one artifact so users can align versions in one place. Confidence: 0.75
- Generate and publish sources and Javadoc jars, and write Javadoc for every public type and method. Confidence: 0.85
- Publish to Maven Central through the Central Portal with signed artifacts, released from CI, never from a laptop. Confidence: 0.85
- Make builds reproducible by setting project.build.outputTimestamp. Confidence: 0.70
- Test the library in CI on every supported Java version with a matrix build. Confidence: 0.85
- Keep a CHANGELOG.md with Added, Changed, Deprecated and Removed sections for each release. Confidence: 0.80
- Deprecate with @Deprecated(since, forRemoval) for at least one minor release before removing an API. Confidence: 0.80
Best PracticesToolingBackend+2
F@f
0
Terminal UI App taste
Taste

Opinionated conventions for keyboard-first terminal UI apps: TUI frameworks, responsive rendering, accessible colors and scriptable modes.

# Terminal UI App taste of a developer who builds fast, keyboard-first terminal interfaces
- Pick a mature TUI framework (Bubble Tea, Ratatui, Textual, Ink) instead of writing raw escape codes. Confidence: 0.90
- Use an Elm-style model, update and view architecture so state changes are easy to test without a terminal. Confidence: 0.80
- Render in the alternate screen buffer and always restore the terminal on exit, panic or Ctrl+C. Confidence: 0.95
- Make every action reachable by keyboard and show the main shortcuts in a footer bar. Confidence: 0.90
- Offer a ? key that opens a full help overlay listing all key bindings for the current view. Confidence: 0.85
- Support both arrow keys and vim-style hjkl navigation, and never require a mouse, though mouse support is welcome. Confidence: 0.80
- Use q or Esc to go back or quit, and ask for confirmation only before destructive actions. Confidence: 0.85
- Never block the render loop on I/O; run network and disk work in the background and show a spinner or progress bar. Confidence: 0.90
- Redraw only on state changes or at a capped frame rate, not in a busy loop. Confidence: 0.80
- Handle terminal resize events and lay out with flexible constraints that still work at 80x24. Confidence: 0.90
- Respect NO_COLOR, detect color depth, and fall back gracefully from truecolor to 256 and 16 colors. Confidence: 0.85
- Never use color as the only signal; pair it with symbols, labels or bold text. Confidence: 0.85
- Use a small, consistent palette tied to the terminal theme instead of hard-coded bright colors. Confidence: 0.75
- Provide a non-interactive mode (flags, --json output) for every important action so the tool works in scripts and CI. Confidence: 0.90
- Detect when stdout is not a TTY and switch to plain output automatically. Confidence: 0.90
- Add fuzzy filtering with / to any list longer than one screen. Confidence: 0.80
- Write logs to a file (opt-in with --debug), never to the screen the UI is drawing on. Confidence: 0.85
- Store config in the XDG config directory as TOML or YAML, and let users remap key bindings there. Confidence: 0.75
- Test views with golden snapshot files of rendered output at fixed terminal sizes. Confidence: 0.75
- Test in the common terminals (iTerm2, Windows Terminal, GNOME Terminal, tmux) before a release, including Unicode width cases. Confidence: 0.70
- Keep startup under about 100 ms so opening the app feels instant. Confidence: 0.70
- Ship a single static binary or a pipx/npm install path, with a short animated demo GIF in the README. Confidence: 0.70
Best PracticesCLITooling+2
F@f
0
1 / 8Next