Create a Python script that automatically types a specified text every 5 minutes. The timer is customizable, and the script functions without manual keyboard input, allowing text to be typed on any writable interface.
Act as a Python Automation Engineer. You are skilled in creating scripts that automate repetitive tasks. Your task is to develop a Python script that types a specified text automatically every 5 minutes on any writable interface. The timer should be customizable.
You will:
- Use the `pyautogui` library to simulate keyboard input
- Implement a customizable timer using the `time` library
- Ensure the script runs continuously and types the text on any writable interface
Example Script:
```python
import pyautogui
import time
def auto_typing(text, interval):
while True:
pyautogui.typewrite(text)
time.sleep(interval)
if __name__ == "__main__":
# Customize your text and interval here
text_to_type = "Your text here"
time_interval = 300 # every 5 minutes
auto_typing(text_to_type, time_interval)
```
To convert the Python script to an executable (.exe) file, follow these steps:
1. **Install PyInstaller**: Open your terminal or command prompt and run:
```
pip install pyinstaller
```
2. **Create Executable**: Navigate to the directory containing your Python script and execute:
```
pyinstaller --onefile your_script_name.py
```
3. **Find the .exe File**: After running PyInstaller, the executable will be located in the `dist` folder.
Rules:
- The script must run without manual keyboard interaction
- Ensure the interval and text are easy to update
- The script should be efficient and lightweightAct as Core Systems Architect. Upgrade FRACTALMESH/TITAN OMEGA to v10355.0. Expose raw JSON streams (system, telemetry, revenue, logs) via Termux Node.js single-process HTTP/SSE on port 7789 with watchdog. Stack: Stripe/AdMob (TFAT), Supabase Realtime, Neon DB, Obsidian sync (superlocalmemory.git), ngrok, OpenHands, Hermes, KAI9000. Front-end: dense neon-dark console showing raw data blocks & log window. Use box-counting fractal dimension routing optimization ($D=4.5-7.5$).
--- name: core-systems-architect-upgrading-the-titan-omega-edge-dashboard description: Act as Core Systems Architect. Upgrade FRACTALMESH/TITAN OMEGA to v10355.0. Expose raw JSON streams (system, telemetry, revenue, logs) via Termux Node.js single-process HTTP/SSE on port 7789 with watchdog. Stack: Stripe/AdMob (TFAT), Supabase Realtime, Neon DB, Obsidian sync (superlocalmemory.git), ngrok, OpenHands, Hermes, KAI9000. Front-end: dense neon-dark console showing raw data blocks & log window. Use box-counting fractal dimension routing optimization ($D=4.5-7.5$). --- # Core Systems Architect: Upgrading the TITAN OMEGA Edge Dashboard Describe what this skill does and how the agent should use it. ## Instructions - Step 1: ... - Step 2: ...
Generates structured, high-quality prompts tailored for LLM application development, scalable data engineering pipelines, and complex systems architecture.
Act as a Senior AI Prompt Engineer and domain expert. Create a professional, high-quality prompt for use with an AI assistant such as ChatGPT, Gemini, Claude, Copilot, or another large language model. Target application or platform: [ChatGPT/Gemini/Claude] Task: [task] The prompt must: 1. Assign the AI a relevant expert role. 2. Provide clear context and assumptions. 3. Define the objective and expected outcome. 4. Include step-by-step instructions where useful. 5. Specify formatting, tone, and quality requirements. 6. Ask the AI to verify accuracy, completeness, and usefulness before finalizing. Output only the final optimized prompt inside a markdown code block. Do not add explanations outside the code block.
12Gemini34Chat56Spark7beta8New chat9Search chats10Daily brief...+610 more lines

create full project html css as well as this image 100%
Performs a rigorous code quality and technical debt audit across a codebase to safely identify dead code, duplicate logic, and refactoring opportunities.
I want you to act as a Senior Software Engineer performing a rigorous code quality, maintainability, and technical debt audit on a codebase. Your objective is to aggressively yet safely simplify the codebase, improve maintainability, and highlight anything that provides zero value to the application. Analyze the provided codebase, directory tree, or code snippets and systematically evaluate: 1. Dead Code: Unused functions, files, components, routes, APIs, variables, imports, and dependencies. 2. Duplicate Logic: Redundant blocks or patterns that should be consolidated into reusable utilities or abstraction layers. 3. Unused UI Components: Orphaned views, unused design components, or obsolete style files. 4. Overly Complex Implementations: Code that can be simplified or refactored without altering expected behavior. 5. Legacy & Deprecated Code: Outdated patterns or unneeded legacy fallback logic. 6. Redundant Queries & API Calls: Unnecessary database operations, duplicate fetch requests, or N+1 query risks. 7. Abandoned Files: Disconnected, unreachable, or unreferenced files in the repository. 8. Technical Debt: Code smells, poor abstractions, or high-risk areas lacking maintainability. For every issue identified, structure your analysis with: - Issue & Location: File path and code block. - Reason for Action: Why this code is unnecessary, redundant, or overly complex. - Impact Estimation: High/Medium/Low impact on performance, bundle size, or developer velocity. - Risk Assessment: Potential regression risks, hidden side effects, or runtime dependencies to verify before deletion. - Recommended Refactor: Specific code/step-by-step guidance for safe removal or consolidation. Conclude with a prioritized, phased Cleanup Plan divided into: - Phase 1: High-Confidence / Safe Deletions (Zero-risk removals) - Phase 2: Logic Consolidation & Simplification (Moderate risk) - Phase 3: Architectural Technical Debt Reduction (Requires testing/migration) My first request is: "Please analyze the following codebase details and perform the code quality review: [Insert repository link, codebase structure, or code snippets here]"
Opinionated preferences for building and publishing modern TypeScript libraries.
# TypeScript library taste - Use pnpm as the package manager. Confidence: 0.95 - Enable strict mode and noUncheckedIndexedAccess in tsconfig. Confidence: 0.95 - Build with tsup and emit both ESM and CJS with .d.ts files. Confidence: 0.90 - Declare the exports map in package.json instead of relying on main. Confidence: 0.90 - Test with vitest and keep tests next to source as *.test.ts. Confidence: 0.90 - Use Changesets for versioning and changelogs. Confidence: 0.85 - Lint and format with Biome instead of ESLint plus Prettier. Confidence: 0.70 - Keep runtime dependencies at zero where practical. Confidence: 0.85 - Mark the package with "sideEffects": false to enable tree shaking. Confidence: 0.85 - Prefer named exports over default exports. Confidence: 0.90 - Validate untrusted input with zod and infer types from the schemas. Confidence: 0.80 - Run publint and arethetypeswrong in CI before every release. Confidence: 0.80 - Use type-only imports (import type) for types. Confidence: 0.85 - Publish with npm provenance enabled from GitHub Actions. Confidence: 0.75 - Write a short README with an install line, a minimal example and an API table. Confidence: 0.90 - Start versions at 0.1.0 and follow semver strictly once stable. Confidence: 0.70
Full pack with template, example and FAQ: https://agentpromptsatoz.com/packs/code-reviewer/
You are a meticulous senior software engineer doing code review. Goals, in priority order: 1. Correctness bugs (logic errors, off-by-one, null/undefined, race conditions, wrong error handling). 2. Security (injection, secrets in code, unsafe deserialization, missing auth checks, SSRF, XSS). 3. Data loss or performance traps (N+1 queries, unbounded loops, memory leaks). 4. Readability and maintainability. 5. Style nits (only if nothing more important exists). Rules: - Only comment on code you were given. If context is missing, say what you would need instead of guessing. - Quote the exact line(s) for every finding. - For every finding give: severity (BLOCKER / HIGH / MEDIUM / NIT), why it matters in one sentence, and a concrete fix (code if short). - Do not invent issues to seem thorough. If the code is fine, say "No blocking issues found" and list at most 3 optional improvements. - End with a one-line verdict: APPROVE, APPROVE WITH NITS, or REQUEST CHANGES. Output format: ## Verdict ## Findings (ordered by severity) ## Questions for the author
Opinionated conventions for building production Next.js apps with the App Router.
# Next.js App Router taste - Default to Server Components and add "use client" only at leaf components that need interactivity. Confidence: 0.95 - Fetch data in Server Components directly instead of using API routes for internal reads. Confidence: 0.90 - Use Server Actions for mutations and validate input with zod. Confidence: 0.85 - Colocate components, loaders and tests by feature instead of by file type. Confidence: 0.80 - Use Tailwind CSS with a small set of design tokens in CSS variables. Confidence: 0.85 - Use next/image and next/font for all images and fonts. Confidence: 0.90 - Add loading.tsx and error.tsx to every route segment that fetches data. Confidence: 0.85 - Use Prisma or Drizzle with typed queries and keep the client in a single lib/db.ts. Confidence: 0.80 - Cache with fetch tags and revalidateTag instead of manual in-memory caches. Confidence: 0.75 - Keep environment variables validated at startup with a typed env module. Confidence: 0.85 - Generate metadata with generateMetadata and always set Open Graph images. Confidence: 0.85 - Avoid barrel files in large apps because they hurt build times. Confidence: 0.70 - Use middleware only for auth redirects and locale routing, never heavy logic. Confidence: 0.80 - Test critical flows with Playwright and components with vitest. Confidence: 0.80 - Deploy on Vercel with preview deployments for every pull request. Confidence: 0.75
Opinionated preferences for container builds and CI pipelines.
# Dockerfile and CI taste - Use multi-stage builds and ship only the runtime artifacts in the final stage. Confidence: 0.95 - Pin base images to a specific version tag, and to a digest for production. Confidence: 0.90 - Prefer slim or distroless final images over full OS images. Confidence: 0.85 - Run the container as a non-root user. Confidence: 0.95 - Order layers so dependency manifests are copied and installed before source code. Confidence: 0.95 - Always keep a .dockerignore that excludes node_modules, .git and local env files. Confidence: 0.95 - Add a HEALTHCHECK or an equivalent readiness probe. Confidence: 0.80 - Use BuildKit cache mounts for package manager caches. Confidence: 0.80 - Never bake secrets into images; pass them at runtime or use build secrets. Confidence: 0.95 - Use exec-form CMD so the process receives signals correctly. Confidence: 0.90 - Scan images with Trivy in CI and fail on critical vulnerabilities. Confidence: 0.80 - Cache dependencies in GitHub Actions keyed on the lockfile hash. Confidence: 0.85 - Run lint, type check and tests as separate parallel CI jobs. Confidence: 0.80 - Tag images with the git SHA and never rely on the latest tag for deploys. Confidence: 0.90 - Keep workflows short and move repeated steps into reusable workflows. Confidence: 0.70
Build a YAML release checklist for an open-source project: SemVer bump, Keep-a-Changelog draft, quality gates, publishable artifacts, annotated tags and GitHub Release steps, announce blurbs per channel, post-release tasks, and a rollback plan, with ship_ready blocked when CI is red.
1role: Open Source Release Checklist Builder2goal: >3 Turn an upcoming open-source release into a concrete YAML checklist covering4 version bump, changelog, artifacts, tests, security notes, and announce5 channels, so maintainers ship without forgetting a step.67ask_first:8 - project: "Repo name, primary language, and package registry (npm, PyPI, crates.io, Maven, Go module, or none)"9 - current_version: "SemVer currently on main/default branch"10 - target_version: "Proposed SemVer and bump type (patch | minor | major | pre-release)"...+55 more lines
Opinionated preferences for designing clear, stable HTTP APIs.
# API Design taste - Prefer resource-oriented URLs with nouns and HTTP verbs for actions, not RPC-style verbs in the path. Confidence: 0.95 - Version APIs in the URL path (`/v1/...`) and keep breaking changes out of an existing major version. Confidence: 0.90 - Use plural collection names (`/users`, `/orders`) and nest only one level deep when the child has no meaning alone. Confidence: 0.85 - Return JSON with consistent camelCase field names and never mix snake_case in the same API. Confidence: 0.85 - Use standard HTTP status codes: 201 for creates, 204 for empty deletes, 404 for missing resources, 409 for conflicts. Confidence: 0.90 - Put pagination, sorting and filtering in query params; return pagination metadata in a stable envelope (`data`, `nextCursor`). Confidence: 0.85 - Prefer cursor-based pagination over offset for any list that can grow large. Confidence: 0.90 - Validate every request body with a schema (zod, OpenAPI, JSON Schema) and reject unknown fields. Confidence: 0.90 - Shape error responses the same way everywhere: `code`, `message`, and optional `details`. Confidence: 0.90 - Prefer idempotency keys on POST endpoints that create money, orders or side effects. Confidence: 0.85 - Use ETags or `If-Match` for concurrent updates on contested resources. Confidence: 0.75 - Document the API with OpenAPI 3 and generate clients from that contract, not hand-written SDKs. Confidence: 0.85 - Never put secrets or PII in URLs or query strings; use headers or the body. Confidence: 0.95 - Prefer explicit expansion (`?include=`) over always embedding related entities. Confidence: 0.80 - Keep write endpoints small: one clear mutation per route rather than kitchen-sink update bags. Confidence: 0.80 - Rate-limit by API key or user and return `Retry-After` when limited. Confidence: 0.85 - Prefer ISO-8601 timestamps in UTC and never invent custom date string formats. Confidence: 0.95
Opinionated preferences for modern Python package layout, tooling and publishing.
# Python Packaging taste - Use `pyproject.toml` as the single source of truth and drop `setup.py` for new packages. Confidence: 0.95 - Prefer the `src/` layout so tests never accidentally import an unpackaged tree. Confidence: 0.90 - Use uv for installs, lockfiles and virtualenvs instead of pip plus venv by hand. Confidence: 0.85 - Build with hatchling (or another PEP 517 backend) and never commit built wheels to git. Confidence: 0.90 - Pin the minimum Python version explicitly and test the oldest supported version in CI. Confidence: 0.90 - Declare dependencies with lower bounds you actually need; avoid open-ended upper pins unless forced. Confidence: 0.80 - Keep optional extras (`[dev]`, `[docs]`) for tooling that end users should not install. Confidence: 0.85 - Format with Ruff format and lint with Ruff; drop Black plus flake8 for new projects. Confidence: 0.85 - Type-check with pyright or basedpyright in strict mode on the public API. Confidence: 0.80 - Test with pytest and keep tests outside `src/` under `tests/`. Confidence: 0.90 - Use trusted publishing from GitHub Actions to PyPI instead of long-lived API tokens. Confidence: 0.90 - Version with dynamic versioning from git tags (hatch-vcs or setuptools-scm). Confidence: 0.75 - Ship a short README with install, a minimal example and a link to docs; keep the long story in docs/. Confidence: 0.90 - Include `py.typed` when you publish typed packages so consumers get inline types. Confidence: 0.85 - Run `twine check` (or the uv equivalent) on built artifacts before every release. Confidence: 0.80 - Prefer `python -m package` entry points over fragile console-script wrappers when debugging. Confidence: 0.70 - Keep `__all__` and public modules intentional; mark internals with a leading underscore. Confidence: 0.80
Opinionated preferences for logs, metrics, traces and production debugging.
# Observability taste - Instrument with OpenTelemetry first and treat vendor SDKs as exporters, not the API you call. Confidence: 0.90 - Emit structured JSON logs with a stable schema (`level`, `msg`, `service`, `trace_id`) instead of free-form strings. Confidence: 0.95 - Propagate `trace_id` and `span_id` into every log line so logs and traces join automatically. Confidence: 0.95 - Prefer RED metrics for services (rate, errors, duration) and USE metrics for resources (utilization, saturation, errors). Confidence: 0.85 - Keep cardinality under control: never put user IDs or raw URLs into metric labels. Confidence: 0.95 - Sample traces head-based in production and always keep errors and slow requests. Confidence: 0.85 - Name spans after the work unit (`http.server`, `db.query`, `queue.publish`), not after internal function names. Confidence: 0.80 - Log at info for successful business events, warn for recoverable problems, error only when a human should look. Confidence: 0.85 - Never log secrets, tokens, passwords or full request bodies with PII. Confidence: 0.95 - Define SLOs with error budgets and alert on burn rate, not on every raw CPU spike. Confidence: 0.85 - Prefer exemplars that link a metric spike to an example trace over guessing from dashboards alone. Confidence: 0.80 - Ship a bare-minimum dashboard per service: traffic, latency p95/p99, error rate, saturation. Confidence: 0.85 - Include `deployment.environment` and service version as resource attributes on every signal. Confidence: 0.90 - Use baggage sparingly; put stable identity in resource attributes, not in every span attribute. Confidence: 0.75 - Test instrumentation in CI with a smoke request that asserts a span and a log line exist. Confidence: 0.70 - Keep runbooks next to alerts so on-call knows the first three checks to run. Confidence: 0.85 - Prefer histogram buckets tuned to your SLO latency target over default buckets. Confidence: 0.80
Opinionated preferences for writing safe, zero-downtime database schema migrations.
# Database Migrations taste - Keep every schema change in a versioned migration file committed next to the code that needs it. Confidence: 0.95 - Write migrations in plain SQL rather than ORM-generated diffs you have not read. Confidence: 0.80 - Never edit a migration that has already run in a shared environment; add a new one instead. Confidence: 0.95 - Use the expand and contract pattern: add the new column, backfill, switch reads, then drop the old column in a later release. Confidence: 0.90 - Make every migration safe to run while the previous app version is still serving traffic. Confidence: 0.90 - Add new columns as nullable or with a constant default to avoid long table rewrites. Confidence: 0.85 - Create indexes on large Postgres tables with CREATE INDEX CONCURRENTLY outside a transaction. Confidence: 0.90 - Set a short lock_timeout and statement_timeout at the top of each migration. Confidence: 0.85 - Run large backfills as batched background jobs, not inside the migration itself. Confidence: 0.90 - Keep one logical change per migration so failures are easy to read and retry. Confidence: 0.80 - Name migration files with a UTC timestamp prefix and a short verb phrase like 20261017_add_orders_status. Confidence: 0.75 - Prefer forward-only migrations and fix mistakes with a new migration instead of relying on down scripts. Confidence: 0.70 - Run migrations as a separate deploy step before the new application code starts. Confidence: 0.85 - Test every migration in CI against a fresh database and against a copy of production-sized data. Confidence: 0.80 - Add foreign keys and check constraints as NOT VALID first, then validate them in a separate step. Confidence: 0.80 - Rename columns and tables only through a view or dual-write period, never in a single step. Confidence: 0.75 - Store the applied migration history in the database and fail the deploy if it has drifted. Confidence: 0.85 - Review migrations as carefully as application code, with the generated SQL visible in the pull request. Confidence: 0.90 - Keep seed and fixture data out of schema migrations. Confidence: 0.80
Opinionated preferences for managing client and server state in React apps.
# React State Management taste - Start with local useState and lift state only when two siblings truly need it. Confidence: 0.95 - Treat server data as a cache and manage it with TanStack Query instead of a global store. Confidence: 0.90 - Keep URL-worthy state such as filters, tabs and pagination in search params. Confidence: 0.90 - Reach for Zustand when shared client state outgrows a single component tree. Confidence: 0.80 - Avoid Redux for new projects unless the team already depends on its devtools and middleware. Confidence: 0.70 - Use React Context for rarely changing values like theme, locale and the current user, not for fast-changing data. Confidence: 0.90 - Derive values during render instead of syncing them into extra state with useEffect. Confidence: 0.95 - Model complex local state with useReducer and a discriminated union of actions. Confidence: 0.80 - Represent async status as one union like idle, loading, success and error rather than several booleans. Confidence: 0.85 - Keep form state in React Hook Form with a zod schema instead of hand-rolled useState per field. Confidence: 0.80 - Select the smallest slice of a store in each component to avoid needless re-renders. Confidence: 0.85 - Store ids in state and look up the full objects, instead of duplicating nested data. Confidence: 0.80 - Use optimistic updates for quick user actions and roll back on error. Confidence: 0.75 - Never mutate state objects in place; return new objects or use Immer for deep updates. Confidence: 0.90 - Keep persisted state small and versioned when saving it to localStorage. Confidence: 0.75 - Reset component state by changing its key instead of writing reset effects. Confidence: 0.80 - Colocate stores with the feature that owns them rather than in one global store folder. Confidence: 0.75 - Type every store and context value explicitly and avoid any in state shapes. Confidence: 0.90
Opinionated preferences for building fast, friendly command-line tools in Rust.
# Rust CLI taste - Parse arguments with clap using the derive API and doc comments as help text. Confidence: 0.95 - Return anyhow::Result from main and add context to every fallible step with .context(). Confidence: 0.90 - Define library error types with thiserror and keep anyhow in the binary only. Confidence: 0.85 - Split the crate into a thin main.rs and a lib.rs that holds the real logic for testing. Confidence: 0.85 - Write normal output to stdout and logs, progress and errors to stderr. Confidence: 0.95 - Offer a --json flag for machine-readable output and serialize it with serde. Confidence: 0.85 - Use tracing with an env filter controlled by -v flags and a RUST_LOG override. Confidence: 0.80 - Respect NO_COLOR and disable colors automatically when stdout is not a terminal. Confidence: 0.90 - Show progress bars with indicatif only for operations longer than about a second. Confidence: 0.75 - Exit with distinct, documented exit codes instead of always returning 1. Confidence: 0.80 - Read configuration in the order flags, then environment variables, then a TOML config file. Confidence: 0.80 - Find config and cache paths with the directories crate rather than hardcoding home paths. Confidence: 0.80 - Test the binary end to end with assert_cmd and snapshot output with insta. Confidence: 0.85 - Avoid async and tokio unless the tool really does concurrent network work. Confidence: 0.75 - Generate shell completions and a man page with clap_complete and clap_mangen at build time. Confidence: 0.75 - Ship prebuilt binaries for Linux, macOS and Windows with cargo-dist from GitHub Actions. Confidence: 0.80 - Run cargo clippy with warnings denied and cargo fmt --check in CI. Confidence: 0.90 - Set opt-level, lto and strip in the release profile to keep binaries small. Confidence: 0.70 - Handle Ctrl+C cleanly with the ctrlc crate and leave no half-written files behind. Confidence: 0.80
Opinionated preferences for writing fast, reliable automated tests in TypeScript and JavaScript projects.
# Testing taste of a pragmatic TypeScript team - Use vitest as the default test runner for unit and integration tests. Confidence: 0.90 - Keep test files next to the code they cover as *.test.ts. Confidence: 0.85 - Name tests as plain sentences that describe behavior, not method names. Confidence: 0.90 - Follow arrange, act, assert with a blank line between each phase. Confidence: 0.75 - Test public behavior through the module API instead of private functions. Confidence: 0.90 - Prefer real collaborators and in-memory fakes over mocks. Confidence: 0.85 - Mock only at process boundaries such as the network, the clock and randomness. Confidence: 0.90 - Intercept HTTP with msw instead of stubbing fetch by hand. Confidence: 0.80 - Run database tests against a real Postgres in Testcontainers, not SQLite. Confidence: 0.80 - Freeze time with fake timers and pass seeds to anything random. Confidence: 0.90 - Build test data with small factory functions that accept overrides. Confidence: 0.85 - Keep snapshot tests rare and small, and review every snapshot diff. Confidence: 0.75 - Use Playwright for a thin layer of end-to-end tests on critical user flows only. Confidence: 0.85 - Select elements by role and accessible name in UI tests, never by CSS class. Confidence: 0.90 - Treat a flaky test as a bug: quarantine it the same day and fix or delete it within a week. Confidence: 0.85 - Never use sleep in tests; wait for an explicit condition instead. Confidence: 0.95 - Keep the full unit suite under one minute on a laptop. Confidence: 0.75 - Track coverage as a trend in CI but do not gate merges on a fixed percentage. Confidence: 0.70 - Add property-based tests with fast-check for parsers and pure logic. Confidence: 0.65 - Write a failing regression test before fixing every reported bug. Confidence: 0.90 - Run tests in random order to catch hidden shared state. Confidence: 0.70
Opinionated preferences for building and operating small, maintainable Go backend services.
# Go service taste of a backend engineer - Use the standard library net/http router from Go 1.22 before reaching for a framework. Confidence: 0.85 - Lay the project out as cmd/<service>/main.go plus internal/ packages, and skip pkg/. Confidence: 0.80 - Keep main.go thin: read config, wire dependencies and start the server. Confidence: 0.90 - Pass context.Context as the first argument to every function that does I/O. Confidence: 0.95 - Wrap errors with fmt.Errorf and %w, and check them with errors.Is and errors.As. Confidence: 0.95 - Log with log/slog in JSON format and include a request ID on every line. Confidence: 0.90 - Read configuration from environment variables into one typed struct at startup. Confidence: 0.85 - Fail fast at startup when required configuration is missing. Confidence: 0.90 - Write SQL by hand and generate typed code with sqlc instead of using an ORM. Confidence: 0.80 - Use pgx as the Postgres driver with a connection pool. Confidence: 0.85 - Define small interfaces in the package that consumes them, not the one that implements them. Confidence: 0.85 - Use table-driven tests with t.Run subtests. Confidence: 0.90 - Run go test with -race in CI on every pull request. Confidence: 0.90 - Lint with golangci-lint using a short, curated list of linters. Confidence: 0.80 - Shut down gracefully on SIGTERM with signal.NotifyContext and server.Shutdown. Confidence: 0.90 - Set explicit read, write and idle timeouts on every http.Server and http.Client. Confidence: 0.90 - Expose /healthz for liveness and /readyz for readiness. Confidence: 0.85 - Avoid global state and package-level init functions with side effects. Confidence: 0.85 - Start goroutines only with a clear owner and stop condition, using errgroup for groups. Confidence: 0.85 - Build a static binary into a distroless image with a multi-stage Dockerfile. Confidence: 0.80 - Add generics only when they remove real duplication. Confidence: 0.70
Opinionated conventions for structuring and running a JavaScript and TypeScript monorepo.
# Monorepo taste of a platform engineer - Use pnpm workspaces with a single lockfile at the repository root. Confidence: 0.95 - Put deployable apps in apps/ and shared libraries in packages/. Confidence: 0.90 - Orchestrate tasks with Turborepo and enable remote caching in CI. Confidence: 0.85 - Reference internal packages with the workspace:* protocol. Confidence: 0.90 - Scope every internal package name under one npm scope such as @acme/. Confidence: 0.85 - Share a base tsconfig from a packages/tsconfig package and extend it everywhere. Confidence: 0.85 - Use TypeScript project references so the editor and tsc build incrementally. Confidence: 0.70 - Keep one version of each external dependency across the repo, enforced with syncpack. Confidence: 0.80 - Ship internal packages as TypeScript source and let apps compile them, unless they are published. Confidence: 0.75 - Version and publish public packages with Changesets. Confidence: 0.85 - Run CI only for packages affected by the change, using turbo --filter with a git range. Confidence: 0.85 - Forbid deep imports between packages and allow only the declared exports map. Confidence: 0.85 - Enforce dependency boundaries with a lint rule so apps never import other apps. Confidence: 0.90 - Keep the root package.json free of runtime dependencies. Confidence: 0.80 - Assign owners per directory with a CODEOWNERS file. Confidence: 0.80 - Pin the Node.js and pnpm versions with .nvmrc and the packageManager field. Confidence: 0.90 - Prefer one root lint and format config over a copy in every package. Confidence: 0.80 - Give every package the same script names: build, dev, lint, test and typecheck. Confidence: 0.90 - Avoid circular dependencies between packages and check for them in CI. Confidence: 0.85 - Split a package out only when a second consumer actually needs it. Confidence: 0.75
Turn any messy bug report, ticket, or log paste into a strict JSON triage card: clear title, environment, numbered repro steps, expected vs actual, redacted evidence, severity and priority with reasons, impact, labeled cause guess, questions for the reporter, and a regression test idea.
1{2 "role": "Senior QA engineer who turns messy bug reports into clear, reproducible triage cards",3 "task": "Take any raw bug report (a chat message, support ticket, screenshot description, customer email, or log excerpt) and normalize it into one strict JSON triage card that a developer can act on without asking follow-up questions.",4 "instructions": [5 "Read the raw report and any pasted logs, stack traces, or environment details. Separate facts the reporter stated from your own inferences.",6 "Never invent steps, versions, error messages, or log lines. If something is unknown, set it to null and add a question to missing_information.",7 "Rewrite reproduction steps as short numbered actions a stranger could follow, starting from a clean state.",8 "Estimate severity from user impact and priority from impact plus reach and urgency, and explain both in one sentence each.",9 "Redact secrets and personal data (tokens, passwords, emails, phone numbers, addresses) with [REDACTED] in every field.",10 "If the report describes several unrelated problems, output one card for the main problem and list the others in related_issues_to_split.",...+70 more lines
Opinionated preferences for branching, commits, pull requests and releases in a trunk-based Git workflow.
# Git workflow taste of a trunk-based team - Work trunk-based: short-lived branches off main, merged within two days. Confidence: 0.90 - Name branches as <type>/<short-topic>, for example fix/login-redirect. Confidence: 0.75 - Write commit subjects in the imperative mood and keep them under 72 characters. Confidence: 0.90 - Use Conventional Commits prefixes (feat, fix, chore, docs, refactor) so changelogs can be generated. Confidence: 0.80 - Explain why a change was made in the commit body, not what the diff already shows. Confidence: 0.85 - Keep each commit buildable and focused on one logical change. Confidence: 0.85 - Rebase your branch onto main instead of merging main into it. Confidence: 0.80 - Squash-merge pull requests so main has one commit per change. Confidence: 0.75 - Keep pull requests under about 400 changed lines; split larger work into stacked PRs. Confidence: 0.85 - Put a short what, why and how-to-test section in every pull request description. Confidence: 0.85 - Require one approving review and green CI before merging to main. Confidence: 0.90 - Protect main: no direct pushes and no force pushes. Confidence: 0.95 - Only force push your own branch, and always with --force-with-lease. Confidence: 0.90 - Hide unfinished features behind flags instead of keeping long-lived feature branches. Confidence: 0.85 - Tag releases with semantic version tags such as v1.4.2 on main. Confidence: 0.85 - Never commit secrets; run a secret scanner in a pre-commit hook and in CI. Confidence: 0.95 - Keep pre-commit hooks fast (under five seconds) and leave slow checks to CI. Confidence: 0.80 - Use a .gitattributes file to normalize line endings and mark generated files. Confidence: 0.70 - Store large binaries in Git LFS or object storage, never directly in the repo. Confidence: 0.85 - Use git bisect with a scripted test to hunt down regressions. Confidence: 0.70 - Revert a bad commit on main first and investigate afterwards. Confidence: 0.85 - Add a CODEOWNERS file so the right reviewers are requested automatically. Confidence: 0.75 - Delete branches automatically after they are merged. Confidence: 0.90
Opinionated conventions for writing, reviewing and applying Terraform infrastructure as code safely.
# Terraform taste of a cloud platform engineer - Pin the Terraform version and every provider version, and commit .terraform.lock.hcl. Confidence: 0.95 - Store state remotely with locking enabled, for example S3 with DynamoDB or Terraform Cloud. Confidence: 0.95 - Split state per environment and per system so one apply never touches everything. Confidence: 0.90 - Use separate directories per environment instead of Terraform workspaces for prod and staging. Confidence: 0.75 - Keep modules small and focused on one concern, such as a network or a database. Confidence: 0.85 - Pin module sources to a tag or version, never to a moving branch. Confidence: 0.90 - Give every variable a type and a description, and add validation blocks for risky inputs. Confidence: 0.85 - Expose only the outputs that other stacks actually consume. Confidence: 0.70 - Name resources in snake_case and avoid repeating the resource type in the name. Confidence: 0.75 - Apply a shared tag set (owner, environment, cost center) through provider default_tags. Confidence: 0.85 - Prefer for_each over count so adding or removing an item does not reshuffle addresses. Confidence: 0.90 - Use moved blocks for refactors instead of manual terraform state mv. Confidence: 0.85 - Bring existing resources in with import blocks that are reviewed in a pull request. Confidence: 0.80 - Run terraform fmt, validate and tflint in CI on every pull request. Confidence: 0.90 - Post the terraform plan output as a pull request comment for review. Confidence: 0.85 - Apply only from CI using the reviewed plan file, never from a laptop. Confidence: 0.85 - Authenticate CI to the cloud with OIDC instead of long-lived access keys. Confidence: 0.90 - Never put secrets in tfvars; read them from a secrets manager at apply time. Confidence: 0.90 - Use prevent_destroy on stateful resources like databases and buckets. Confidence: 0.80 - Scan configurations with a policy tool such as checkov or tfsec before merging. Confidence: 0.75 - Avoid provisioners and local-exec; hand configuration off to images or config tools. Confidence: 0.80 - Run a scheduled plan to detect drift and alert when it is not empty. Confidence: 0.75 - Keep data sources for lookups and avoid hardcoding IDs or ARNs. Confidence: 0.80
Opinionated preferences for writing maintainable, accessible and responsive CSS in modern web apps.
# CSS taste of a design-minded frontend developer - Use Tailwind CSS utility classes for component styling in application code. Confidence: 0.80 - Define colors, spacing, radii and fonts as design tokens in CSS custom properties. Confidence: 0.90 - Never hardcode hex colors inside components; always reference a token. Confidence: 0.85 - Build layouts with flexbox and grid, with gap for spacing instead of margins between siblings. Confidence: 0.90 - Design mobile first and add min-width breakpoints for larger screens. Confidence: 0.85 - Use container queries for components that live in containers of different widths. Confidence: 0.75 - Use rem for font sizes and spacing, and px only for hairline borders. Confidence: 0.80 - Use clamp() for fluid typography instead of many breakpoint overrides. Confidence: 0.75 - Keep specificity flat: single class selectors, no IDs, and no !important outside utilities. Confidence: 0.90 - Use cascade layers to order reset, base, components and utilities. Confidence: 0.70 - Support dark mode with prefers-color-scheme plus tokens, not duplicated component styles. Confidence: 0.85 - Respect prefers-reduced-motion and disable non-essential animation when it is set. Confidence: 0.90 - Never remove focus outlines; style them with :focus-visible instead. Confidence: 0.95 - Meet WCAG AA contrast for all text and interactive elements. Confidence: 0.90 - Animate only transform and opacity for smooth, cheap transitions. Confidence: 0.85 - Use logical properties such as margin-inline so layouts work in right-to-left languages. Confidence: 0.75 - Use the system font stack or self-hosted variable fonts with font-display: swap. Confidence: 0.80 - Set aspect-ratio and width and height on media to prevent layout shift. Confidence: 0.85 - Use native CSS nesting sparingly and never more than two levels deep. Confidence: 0.70 - Sort Tailwind classes automatically with the Prettier plugin. Confidence: 0.80 - Extract a component when the same long class list repeats, not an @apply class. Confidence: 0.75 - Make sure nothing scrolls horizontally at a 320px viewport width. Confidence: 0.85
Opinionated conventions for deploying, securing and operating workloads on Kubernetes clusters.
# Kubernetes taste of a platform team - Deploy everything through GitOps (Argo CD or Flux); nobody runs kubectl apply against production by hand. Confidence: 0.90 - Package shared services with Helm or Kustomize, but keep per-environment overlays small and readable. Confidence: 0.80 - Set CPU and memory requests on every container, and set a memory limit equal to the request. Confidence: 0.90 - Avoid CPU limits on latency-sensitive services; rely on requests and node sizing to prevent throttling. Confidence: 0.70 - Give every Deployment a readiness probe; add a liveness probe only when the app can truly deadlock. Confidence: 0.85 - Use a startup probe for slow-booting apps instead of a long initialDelaySeconds on liveness. Confidence: 0.80 - Run at least two replicas behind a PodDisruptionBudget for anything users depend on. Confidence: 0.90 - Spread replicas across zones with topologySpreadConstraints. Confidence: 0.80 - Pin images by digest or an immutable version tag, never latest. Confidence: 0.95 - Run containers as non-root with a read-only root filesystem and all capabilities dropped. Confidence: 0.90 - Enforce the restricted Pod Security Standard on application namespaces. Confidence: 0.80 - Start every namespace with a default-deny NetworkPolicy and open only the flows you need. Confidence: 0.80 - Give each workload its own ServiceAccount and disable token automount when it never calls the API server. Confidence: 0.85 - Keep secrets out of Git; sync them from a secret manager with External Secrets or use Sealed Secrets. Confidence: 0.90 - Use one namespace per team or per app, with a ResourceQuota and a LimitRange. Confidence: 0.80 - Apply the standard app.kubernetes.io labels to every resource. Confidence: 0.75 - Handle SIGTERM and add a short preStop sleep so in-flight requests drain before shutdown. Confidence: 0.85 - Scale stateless services with the HorizontalPodAutoscaler on CPU or a real request-rate metric. Confidence: 0.75 - Run databases on a managed cloud service rather than StatefulSets unless there is a strong reason. Confidence: 0.80 - Validate manifests in CI with kubeconform and a policy engine such as Kyverno or OPA Gatekeeper. Confidence: 0.80 - Keep clusters within two minor versions of the latest Kubernetes release and upgrade on a schedule. Confidence: 0.75 - Expose HTTP services through one shared ingress or Gateway API controller, not a LoadBalancer per service. Confidence: 0.75
Opinionated preferences for handling, logging and reporting errors in TypeScript backend services.
# Error handling taste of a TypeScript backend engineer - Fail fast at the edges: validate every external input with a schema library such as Zod before it reaches business logic. Confidence: 0.90 - Separate expected domain errors (not found, conflict, validation) from unexpected bugs, and handle them differently. Confidence: 0.90 - Model expected failures as return values or a Result type; reserve throw for truly exceptional cases. Confidence: 0.70 - Define a small set of typed error classes with a stable machine-readable code field. Confidence: 0.85 - Never swallow an error silently; an empty catch block needs a comment explaining why. Confidence: 0.95 - When rethrowing, wrap the original with the cause option so the stack chain survives. Confidence: 0.85 - Only catch an error where you can add context, recover, or translate it; let everything else bubble up. Confidence: 0.85 - Map errors to HTTP responses in one central error handler, not inside each route. Confidence: 0.90 - Return RFC 9457 problem+json bodies with a code, a human message, and a request id. Confidence: 0.75 - Never leak stack traces, SQL, or internal hostnames to API clients. Confidence: 0.95 - Log each error once, at the boundary that handles it, not at every layer it passes through. Confidence: 0.85 - Include structured context in error logs (request id, user id, operation), never secrets or tokens. Confidence: 0.90 - Retry only idempotent operations, with exponential backoff, jitter, and a hard attempt limit. Confidence: 0.90 - Put a timeout on every network call; a missing timeout is a bug. Confidence: 0.95 - Use AbortController to cancel downstream work when the caller goes away. Confidence: 0.75 - Wrap flaky dependencies in a circuit breaker so one slow service cannot take the whole app down. Confidence: 0.70 - Treat unhandled promise rejections as fatal: log them and let the process restart. Confidence: 0.85 - Let a supervisor restart a crashed process instead of trying to keep a corrupted one alive. Confidence: 0.80 - Report unexpected errors to an error tracker with release and environment tags. Confidence: 0.85 - Write tests for failure paths, not only the happy path. Confidence: 0.85 - Write error messages that say what failed, with which input, and what the caller can do next. Confidence: 0.85 - Use the never type in exhaustive switch statements so new error codes break the build until handled. Confidence: 0.75
Opinionated security defaults for authentication, input handling and HTTP hardening in web apps.
# Web security taste of a full-stack developer - Use the framework's auth or a vetted library; never hand-roll password storage or session handling. Confidence: 0.95 - Hash passwords with Argon2id or bcrypt and a sensible work factor. Confidence: 0.95 - Store sessions in HttpOnly, Secure, SameSite=Lax cookies rather than localStorage. Confidence: 0.90 - Rotate the session id on login and on privilege change. Confidence: 0.85 - Offer passkeys or TOTP as a second factor, and require it for admin accounts. Confidence: 0.85 - Check authorization on the server for every request, including on object ids, to stop IDOR bugs. Confidence: 0.95 - Deny by default: new routes are private until someone explicitly makes them public. Confidence: 0.85 - Use parameterized queries or an ORM everywhere; never build SQL with string concatenation. Confidence: 0.95 - Rely on the template engine's automatic escaping and treat every raw HTML escape hatch as a review flag. Confidence: 0.90 - Ship a strict Content Security Policy with nonces, starting in report-only mode. Confidence: 0.80 - Send HSTS, X-Content-Type-Options: nosniff, and frame-ancestors on every response. Confidence: 0.85 - Protect state-changing requests with SameSite cookies plus CSRF tokens or an origin check. Confidence: 0.85 - Rate-limit login, signup, password reset, and other expensive endpoints. Confidence: 0.90 - Return the same message for an unknown email and a wrong password to avoid account enumeration. Confidence: 0.80 - Validate uploads by content type and size, store them outside the web root, and serve them from a separate domain. Confidence: 0.80 - Block server-side requests to internal and metadata IP ranges to prevent SSRF. Confidence: 0.80 - Keep secrets in a secret manager or environment, never in the repo or the client bundle. Confidence: 0.95 - Run dependency audits and automated update PRs (Dependabot or Renovate) on every repository. Confidence: 0.85 - Log security events such as logins, failed logins, and permission changes, without logging credentials. Confidence: 0.85 - Configure CORS with an explicit origin allowlist; never reflect the request origin with credentials. Confidence: 0.90 - Use short-lived, narrowly scoped API tokens and make them revocable. Confidence: 0.85 - Run a quick OWASP Top 10 check in review for every feature that touches auth, input, or files. Confidence: 0.75
Opinionated conventions for schema design, indexing, queries and operations in PostgreSQL.
# PostgreSQL taste of a backend engineer - Use bigint identity columns (GENERATED ALWAYS AS IDENTITY) for primary keys; reach for UUIDv7 only when ids must be generated outside the database. Confidence: 0.80 - Store timestamps as timestamptz in UTC, never timestamp without time zone. Confidence: 0.95 - Use text with a CHECK constraint instead of varchar(n) for length limits. Confidence: 0.80 - Store money as numeric or as integer minor units, never as float. Confidence: 0.95 - Name tables in plural snake_case and foreign keys as <singular>_id. Confidence: 0.70 - Declare NOT NULL by default and allow NULL only when "unknown" is a real state. Confidence: 0.85 - Enforce invariants in the database with foreign keys, UNIQUE, and CHECK constraints, not only in application code. Confidence: 0.90 - Index every foreign key column that is used in joins or cascading deletes. Confidence: 0.85 - Read EXPLAIN (ANALYZE, BUFFERS) before adding an index, and again after to prove it helped. Confidence: 0.90 - Prefer partial and expression indexes over wide composite indexes for skewed filters. Confidence: 0.70 - Create indexes on large tables with CREATE INDEX CONCURRENTLY. Confidence: 0.90 - Use jsonb for genuinely schemaless attributes, but promote fields you filter on into real columns. Confidence: 0.80 - Paginate with keyset (WHERE id > $last ORDER BY id LIMIT n) instead of large OFFSET values. Confidence: 0.85 - Keep transactions short and never hold one open across a network call. Confidence: 0.90 - Set statement_timeout and idle_in_transaction_session_timeout per application role. Confidence: 0.85 - Put a connection pooler such as PgBouncer in transaction mode in front of the database. Confidence: 0.80 - Use SELECT ... FOR UPDATE SKIP LOCKED for simple job queues before adding a separate broker. Confidence: 0.70 - Use INSERT ... ON CONFLICT for idempotent upserts. Confidence: 0.85 - Give each service its own role with least privilege; the application never connects as a superuser. Confidence: 0.90 - Turn on pg_stat_statements and review the slowest queries every week. Confidence: 0.85 - Write CTEs for readability, knowing Postgres 12+ inlines them unless you add MATERIALIZED. Confidence: 0.65 - Test point-in-time recovery from backups regularly; an untested backup does not count. Confidence: 0.95
Opinionated preferences for making web pages load fast and stay responsive for real users.
# Web performance taste of a frontend engineer - Measure Core Web Vitals (LCP, INP, CLS) from real users, not only from lab Lighthouse runs. Confidence: 0.90 - Set a performance budget for JavaScript size and LCP, and fail CI when a change breaks it. Confidence: 0.80 - Render the first view on the server or statically; do not ship a blank page that waits for JavaScript. Confidence: 0.90 - Ship less JavaScript before optimizing the JavaScript you ship. Confidence: 0.90 - Split code by route and lazy-load heavy widgets such as editors, charts, and maps. Confidence: 0.85 - Check the bundle analyzer before adding a dependency, and prefer small, tree-shakable libraries. Confidence: 0.80 - Serve images in AVIF or WebP with responsive srcset and explicit width and height. Confidence: 0.90 - Mark the LCP image with fetchpriority="high" and never lazy-load it. Confidence: 0.85 - Lazy-load below-the-fold images and iframes with loading="lazy". Confidence: 0.85 - Self-host fonts, subset them, preload the main one, and use font-display: swap. Confidence: 0.80 - Reserve space for ads, embeds, and late content so the layout does not shift. Confidence: 0.85 - Break up long tasks over 50 ms and yield to the main thread to keep INP low. Confidence: 0.80 - Load third-party scripts with defer or after interaction, and audit each one for real value. Confidence: 0.85 - Cache hashed static assets with Cache-Control: immutable for a year. Confidence: 0.90 - Serve everything over HTTP/2 or HTTP/3 from a CDN with Brotli compression. Confidence: 0.85 - Preconnect only to the one or two origins needed for the first render. Confidence: 0.70 - Inline critical CSS for the first view and load the rest without blocking render. Confidence: 0.65 - Virtualize long lists instead of rendering thousands of DOM nodes. Confidence: 0.80 - Animate only transform and opacity, and respect prefers-reduced-motion. Confidence: 0.85 - Avoid layout thrashing: batch DOM reads before DOM writes. Confidence: 0.75 - Test on a mid-range Android phone with a throttled network, not only on a developer laptop. Confidence: 0.90 - Treat a performance regression like a bug, with an owner and a fix date. Confidence: 0.80
Opinionated conventions for writing safe, readable and maintainable Bash scripts.
# Shell scripting taste of a DevOps engineer
- Start every script with #!/usr/bin/env bash and set -euo pipefail. Confidence: 0.90
- Switch to Python or Go once a script passes about 100 lines or needs real data structures. Confidence: 0.85
- Run ShellCheck in CI and fix warnings instead of silencing them. Confidence: 0.95
- Format scripts with shfmt so diffs stay small. Confidence: 0.75
- Quote every variable expansion ("$var") unless word splitting is intended and commented. Confidence: 0.95
- Use [[ ]] for tests and $(...) for command substitution, never backticks. Confidence: 0.90
- Declare variables inside functions with local. Confidence: 0.85
- Put the logic in functions and call a main "$@" at the bottom of the file. Confidence: 0.80
- Clean up temporary files with mktemp and trap '...' EXIT. Confidence: 0.90
- Write errors and logs to stderr and keep stdout for data other tools can pipe. Confidence: 0.85
- Exit with a non-zero status and a clear message when something fails. Confidence: 0.90
- Provide a usage function and handle -h and --help. Confidence: 0.80
- Parse options with getopts or a simple case loop, not ad hoc positional checks. Confidence: 0.75
- Check required commands up front with command -v and fail early when one is missing. Confidence: 0.85
- Read configuration from environment variables with defaults, such as -8080. Confidence: 0.80
- Never parse ls output; use globs or find -print0 with xargs -0. Confidence: 0.90
- Read files line by line with while IFS= read -r line. Confidence: 0.85
- Use arrays for argument lists instead of building command strings. Confidence: 0.85
- Avoid eval, and never pass untrusted input to it. Confidence: 0.95
- Make scripts idempotent so running them twice is safe. Confidence: 0.85
- Add a --dry-run flag to anything that deletes or changes remote state. Confidence: 0.80
- Stick to POSIX sh only when the script must run in minimal containers; otherwise target bash 4+. Confidence: 0.70