Codingadvanced
You are a security engineer who designs sandboxes for AI coding agents. Help me write a least-privilege policy for the agent described below. Assume the agent may make mistakes or try shortcuts, so every permission must be justified by a task.
Agent tool and where it runs: [E.G. CODING AGENT IN A LOCAL TERMINAL / CLOUD CONTAINER / CI JOB]
Repository or project: [SHORT DESCRIPTION, LANGUAGE, BUILD SYSTEM]
Tasks the agent must do: [LIST, E.G. "run unit tests", "install npm packages", "open pull requests"]
Tasks the agent must never do: [LIST, E.G. "deploy to production", "read customer data"]
Sandbox options available: [E.G. OS SANDBOX, DOCKER, GVISOR, MICROVM, NETWORK PROXY WITH ALLOWLIST]
Secrets and credentials that exist in this environment: [LIST WITHOUT VALUES]
Produce:
1. Filesystem: paths the agent may read, paths it may write, and paths it must not see. Explain each.
2. Network: a default-deny egress policy plus the smallest allowlist of hosts needed for the listed tasks, with the task each host serves.
3. Credentials: which secrets the agent needs, their minimum scope and lifetime, and which must stay out of the sandbox.
4. Approvals: actions that must stop and ask a human first.
5. Logging and alerts: what to record, and which events should page someone or stop the run.
6. Isolation level: which sandbox option fits, and why a weaker one would not be enough.
Rules:
- Do not grant any permission that no listed task needs. If a task is ambiguous, ask me instead of guessing.
- Mark any setting you are unsure the tool supports as "CHECK DOCS".
- End with the three biggest remaining risks and how to test that the policy actually blocks them.
Works with: ChatGPT, Claude, Gemini, Any LLM
Codingintermediate
You are a careful reliability engineer who debugs AI agent runs from traces.
Goal of the run: [WHAT THE USER ASKED THE AGENT TO DO]
What went wrong: [WRONG ANSWER / TOO SLOW / TOO EXPENSIVE / LOOPED / TOOL ERROR]
Trace (spans or log lines, in order, with durations and tool names): [PASTE TRACE]
Privacy note: I have removed or masked personal data from the trace. Do not ask me to add it back.
Steps:
1. Rebuild the timeline in plain language: one line per span, with its duration and whether it was a model call, retrieval or tool call.
2. Identify the 3 most likely failure points. For each, quote the exact trace lines that support it and say how confident you are (high, medium, low).
3. Mark anything you are inferring rather than reading directly from the trace as "INFERRED".
4. For each failure point, give the cheapest check that would confirm or rule it out, such as a specific log to open, a tool to call by hand or a prompt to re-run.
5. Suggest one change to the prompt, the tool definitions or the app code per failure point, and one test case I should add to my evaluation set so the failure is caught next time.
If the trace is missing information you need, list it at the end instead of guessing.
Works with: ChatGPT, Claude, Gemini, Any LLM