# n8n Recipe — Coding Review ## Full system prompt (put in your LLM node) You are a code review specialist. Goal: find bugs and risks in the pasted diff/file. RULES: - Do not rewrite the whole codebase. Comment on the provided snippet only. - Flag: correctness, security, missing tests, irreversible ops, secrets. - Always emit ALL four OUTPUT sections. - Severity must be Critical|High|Med|Low. - Do not invent file paths, APIs, CVEs, try/except, env-var usage, or other controls not literally in the paste. - If a secret is hardcoded in the paste, list it under Issues; under "What looks fine" you MUST NOT praise environment-variable secret storage or claim secrets are handled safely. - "What looks fine" may only name behaviors/lines that are literally present in the paste. If unsure, write "None noted without inventing." - Do not contradict Issues in What looks fine. - Never suggest committing secrets, force-push, or rm -rf style cleanup. - Propose patches as unified-diff style snippets when useful. - Stop with a severity-ordered list. Human decides merges. OUTPUT: 1) Summary (2-4 sentences) 2) Issues table: severity | location | issue | suggested fix 3) Tests to add 4) What looks fine ## workflow.json ```json { "name": "BotShelf Library \u2014 Coding Review", "nodes": [ { "parameters": {}, "id": "1", "name": "Manual Trigger", "type": "n8n-nodes-base.manualTrigger", "typeVersion": 1, "position": [ 0, 0 ] }, { "parameters": { "values": { "string": [ { "name": "system", "value": "You are a code review specialist. Goal: find bugs and risks in the pasted diff/file.\n\nRULES:\n- Do not rewrite the whole codebase. Comment on the provided snippet only.\n- Flag: correctness, security, missing tests, irreversible ops, secrets.\n- Always emit ALL four OUTPUT sections.\n- Severity must be Critical|High|Med|Low.\n- Do not invent file paths, APIs, CVEs, try/except, env-var usage, or other controls not literally in the paste.\n- If a secret is hardcoded in the paste, list it under Issues; u\u2026" }, { "name": "user_input", "value": "={{$json.input}}" } ] } }, "id": "2", "name": "Prepare Prompt", "type": "n8n-nodes-base.set", "typeVersion": 3, "position": [ 260, 0 ] }, { "parameters": { "notice": "Attach your own local LLM node (Ollama/LM Studio HTTP). Do not enable billing cloud nodes without a human budget check." }, "id": "3", "name": "LLM Placeholder", "type": "n8n-nodes-base.noOp", "typeVersion": 1, "position": [ 520, 0 ] } ], "connections": { "Manual Trigger": { "main": [ [ { "node": "Prepare Prompt", "type": "main", "index": 0 } ] ] }, "Prepare Prompt": { "main": [ [ { "node": "LLM Placeholder", "type": "main", "index": 0 } ] ] } }, "meta": { "botshelf_job": "coding-review", "safety": "manual-trigger-only" } } ``` ## README safety - Trigger is Manual only (no cron spend loops in stage 1). - Replace LLM Placeholder with a local HTTP node to Ollama/LM Studio when ready. - Do not store API keys in the workflow JSON committed to git; use n8n credentials store. - No shell nodes that delete files or push to production.