build_audit_report
Reports and briefs skill low risk
Part of the Google Ads Audit Agent and LinkedIn Ads Audit Agent.
What it does
The audit document spec (ADR-108). platform='gads' returns the ScalixAI Google Ads audit document, transcribed from the audit prompt: the title block ('[Client] | Google Ads Audit | Month-over-Month Spend Analysis'), Data and assumptions, the campaign name mapper, sections 0 to 9 (conversion actions, monthly overview, what counted, brand, non-brand, competitor, Display/Demand Gen/PMax, proposed structure, starting budgets, key learnings), each naming the gads_audit_data tables it is written from; the 12-part campaign template and its short version; the writing style (plain, no em dashes, no filler, precise numbers, (inferred) marked); the Word spec (US Letter portrait, Archivo everywhere, black text, minor headings #7A34D4, table headers #EBE4F5, the logo right in the header, the footer '[Client] Google Ads Audit · ScalixAI · Page N', columns sized so figures never wrap); and the QA checklist with a Python check to run on the Markdown. part returns one section, the campaign template, the Word spec, the QA, or 'logo' (the PNG, base64). prepared_by other than ScalixAI makes the document white-label. platform='lads' returns the findings-based report plan for lads_audit_account, exported with sheets_export_report, until LinkedIn's audit engine lands. The server renders nothing: Claude builds the .docx with its docx skill. Read-only. Output: {success, data:{task, platform, ...the spec}, warnings}.
When to use it
Use after gads_audit_account and its gads_audit_data calls, to write the Google Ads audit as the client-ready Word document: it returns the document's structure, the campaign template, the writing style, the Word spec, the QA checklist and the logo. For a LinkedIn audit it returns the report plan for lads_audit_account's findings.
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
platform | string | no | gads (default) or lads. |
part | string | no | One part of the gads spec: a section name or number (e.g. '1. Monthly overview', 'mapper'), 'campaign_template', 'docx', 'qa', or 'logo'. Omitted: the whole spec. |
client_name | string | no | The client's name, for the title, the footer and the filename. |
prepared_by | string | no | Who the document is prepared by: ScalixAI (default), or an agency's name for a white-label document (no ScalixAI logo or colors). |
Safeguards
Policy
Read/render only: makes NO account changes and invents NO numbers. Every figure in the document comes from gads_audit_data, copied exactly, reconciled to the platform UI within +/-1% or flagged in Data and assumptions. No tool names, query fields or ids in the document except the account ID in the subtitle; no em dashes; nothing invented (URLs, competitor features, numbers).
Reminder
Run the spec's QA check on the Markdown before the Word build, render the .docx to PDF and look at several pages, and hand over the .docx file itself.
Errors
| Error class | Means | What to do | Retry |
|---|---|---|---|
invalid_argument | platform is neither gads nor lads. | Pass platform='gads' or 'lads'. | no |
NO_FILE_CREATION | Claude cannot create files in this conversation (code execution is off). | Deliver the Markdown in the chat and say the Word file needs file creation turned on. | no |
RECONCILIATION_FAILED | A figure could not be reconciled to the platform UI within +/-1%. | Flag it in Data and assumptions with both figures; never adjust it. | no |
EXPORT_FAILED | LinkedIn: sheets_export_report failed on handoff. | Return the report inline, report the export error, and retry after backoff. | yes |
Edge cases
- part='logo' returns about 21K characters of base64: fetch it once, for the header.
- An unknown part returns the whole spec with a note.
- White-label: no ScalixAI logo, minor headings in dark grey, header rows in light grey.
- A campaign group with no campaigns is left out of the document, not shown empty.
- LinkedIn: the findings-based plan until its audit engine lands (ADR-108, phase 2).