Production engineering practices

From makifbaysal/tasktrooper · View interactive version

Production engineering practices is an AI agent skill from the GitHub repository makifbaysal/tasktrooper. Error-handling, security, logging and performance bar for production code. Use when writing or changing production code, before the run ends.

How to use this skill

Skill file

Production Engineering Practices

Overview

Acceptance criteria describe the happy path. Production is the unhappy paths: bad input, failed dependencies, concurrent access, hostile users. This skill is the non-negotiable bar every change clears in addition to its AC — the things a reviewer at code_review will bounce you for even when the feature "works."

Core principle: Code isn't done when it works; it's done when it fails safely, leaves a trace, and can't be abused.

The bar

Error handling

Logging & observability

Security

Performance

Per stack

| Stack | Adds |

|-------|------|

| Backend | Parameterized queries only — no string-concatenated SQL, ever. |

| Web | No dangerouslySetInnerHTML / innerHTML with unsanitised data. Nothing secret in VITE_* / NEXT_PUBLIC_* — those ship to the browser. Every fetch has error and timeout/abort handling, and every route has an error boundary. No token in localStorage unless the repository already does it that way. |

| Mobile | Tokens in Keychain/Keystore (flutter_secure_storage), never in plain prefs. Explicit offline and timeout paths — a request with no network is a state, not a crash. No PII in logs. Permissions requested at the point of use, not on launch. |

Quick self-review before code_review

| Check | Pass condition |

|-------|----------------|

| Errors | None swallowed; all wrapped with context |

| Input | Every external field validated and bounded |

| Secrets | None in code, logs, or commits |

| Auth | New endpoints/routes guarded like neighbors |

| Queries/requests | No N+1; result sets bounded |

| Tests | Behavior change ships with a test in this task |

Worked Example

Adding GET /projects/:id/tasks. The AC just says "return the project's tasks." The production bar adds:

The feature "worked" after the first bullet; it was done after all five.

Handoff

See your prompt's closing step for how to end the run — this skill only sets the bar the diff clears before you get there.

Red Flags

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.