/ai-analyst-plus:exportfrom ai-analyst-plus
Exports analysis results as email summaries, Slack updates, decision briefs, Google Docs, Word docs, slide decks, CSVs, Notion pages, or audit receipts. Detects source files automatically.
Ships in ai-analyst-plus. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Export analysis results in different formats for different audiences. Converts pipeline outputs into ready-to-share deliverables.
/export slides — create a Google Slides deck from the latest analysis (delegates to the google-slides-export skill through the Google Drive connector)
/export email — write an executive summary email (markdown)
/export slack — write a concise Slack update (markdown)
/export brief — write a 1-page decision brief (markdown)
/export data — export analysis data tables as CSV
/export gdoc — create a Google Doc with full Analysis Readout (charts, SQL, bookmarks)
/export docx — generate a local .docx Word document (no Google upload)
/export notion — export analysis to a Notion page (with charts, data stamps, provenance toggles)
/export receipt — generate full analysis receipt (Reproduce-level audit trail)
/export all — generate all text formats + data (does NOT include gdoc, notion, or receipt — use /export gdoc, /export notion, and /export receipt separately)
Tool names vary by connector version: discover the exact tool names from the connector's available tools in-session and read each schema before calling.
Primary source detection (use exactly ONE of these, in order):
outputs/narrative_*.md — if exists, use the most recent by date (check filename date suffix)outputs/analysis_*.md — if narrative absent, use most recent analysisworking/pipeline_summary.md — if no outputs/ files existworking/storyboard_*.md — last resort if above are all missingHow to choose when multiple files exist: Sort by filename date (YYYYMMDD or YYYY-MM-DD suffix), use the latest. If no date in filename, use file modification time.
Supporting materials (collect when available, but NOT primary source):
outputs/charts/*.png — chart imagesoutputs/validation_*.md — confidence scoreoutputs/close_the_loop_*.md — success tracking + action itemsworking/sql_queries/*.sql — SQL queriesIf no outputs exist:
working/ for partial results/run-pipeline."Critical: Once you identify the primary source, read it COMPLETELY before generating any export. Do not assume you know the content — always verify what analysis you're exporting.
Format: slides
outputs/slides_url_{DATE}.txt. If the connector is unavailable, the google-slides-export skill stops and says so; do not fake a deck in another format unless the user asks for one.Format: email
outputs/email_summary_{DATE}.md where {DATE} is today's date in YYYY-MM-DD format (e.g., email_summary_2026-04-04.md). This specific file path is important for consistent organization.Format: slack
50K | Jan-Mar 2026 | EVENTS | B (82)outputs/slack_update_{DATE}.md where {DATE} is today's date in YYYY-MM-DD format (e.g., slack_update_2026-04-04.md)Format: brief
outputs/decision_brief_{DATE}.md where {DATE} is today's date in YYYY-MM-DD format (e.g., decision_brief_2026-04-04.md)Format: data
working/ as CSVs to the outputs/data/ directoryconversion_by_platform.csv, funnel_steps.csv)outputs/data/README.md documenting each CSV file: columns, row count, use cases, data quality notesoutputs/data/ directory plus outputs/data/README.md manifestFormat: gdoc
Creates a formatted Google Doc from the analysis with embedded charts, styled headings, internal bookmark links, and SQL code blocks. Follows the Analysis Readout template: Summary (30-second read) → Analysis (30-minute read) → Resources.
Formatting source of truth: the
google-doc-exportskill owns Doc formatting standards (heading hierarchy, image placement, spacing). This path produces that same look by building a local.docxwith python-docx (google-doc-export Section A) and uploading it with the connector's convert-to-Google-Doc flag — a distinct method from native in-Doc construction, not a restatement of it.
Check whether Google Drive connector tools are available in this session:
read_document on any known document ID (lightweight probe).authorize_google_docs. Follow the browser OAuth flow.docx format
(generate .docx only, skip upload). Provide manual upload instructions:
"You can upload {docx_path} to drive.google.com manually."Check if outputs/gdoc_export.yaml exists:
import hashlib, yaml, os
def content_hash(text):
return hashlib.sha256(text.encode("utf-8")).hexdigest()
yaml_path = "outputs/gdoc_export.yaml"
if os.path.isfile(yaml_path):
with open(yaml_path) as f:
state = yaml.safe_load(f)
# Check if source has changed
narrative_path = state.get("source_narrative")
if narrative_path and os.path.isfile(narrative_path):
current_hash = content_hash(open(narrative_path).read())
if current_hash == state.get("source_hash"):
# Source unchanged — ask user
url = state.get("document_url", "")
# Say: "Google Doc already exists at {url}. No analysis changes
# detected. Open it, or force re-create?"
# If user says open: done. If force: continue to Step 2b.
Say: "Building document from analysis..." Then:
outputs/charts/, the confidence grade from the most recent
outputs/validation_*.md (the badge such as "A (94/100)"), and any SQL from
working/sql_queries/*.sql. Extract the title, findings, and
recommendations from the narrative.pip install python-docx if absent),
following the google-doc-export skill's Section A rules exactly: Analysis
Readout structure (Summary 30-second read, then Analysis, then Resources),
proper heading hierarchy with exactly one H1, charts inserted at their
findings with widths set in Inches, data stamps as small italic paragraphs,
SQL in monospace blocks.outputs/report_{slug}_{YYYYMMDD}.docx and keep that path as
docx_path.Confidence gate: If the parsed confidence grade is D or F, pause and ask: "This analysis has low confidence (grade {grade}). The document will include a prominent caveat. Create anyway?" If the user says no, abort. If yes, continue.
# Say: "Uploading to Google Drive..."
result = the Google Drive connector's upload file to drive capability(
file_path=docx_path,
convert_to_google_doc=True
)
# result: {"file_id": "...", "url": "...", "name": "..."}
If upload fails: fall back to .docx. Say: "Drive upload failed. Your analysis
is saved locally at {docx_path}."
import hashlib, yaml
from datetime import datetime
def content_hash(text):
return hashlib.sha256(text.encode("utf-8")).hexdigest()
state_path = "outputs/gdoc_export.yaml"
# Read existing state for version history
existing = {}
if os.path.isfile(state_path):
with open(state_path) as f:
existing = yaml.safe_load(f) or {}
version = existing.get("version", 0) + 1
history = existing.get("versions", [])
if existing.get("document_id"):
history.append({
"version": existing.get("version"),
"document_id": existing.get("document_id"),
"document_url": existing.get("document_url"),
"created_at": existing.get("created_at"),
})
narrative_path = "<the Step 1 primary source path>"
state = {
"document_id": result["file_id"],
"document_url": result["url"],
"title": "<the parsed analysis title>",
"created_at": datetime.now().isoformat(),
"source_narrative": narrative_path,
"source_hash": content_hash(open(narrative_path).read()) if narrative_path else None,
"local_docx": docx_path,
"charts_embedded": 0, # set to the number of chart PNGs actually inserted in Step 2b
"version": version,
"versions": history,
}
with open(state_path, "w") as f:
yaml.dump(state, f, default_flow_style=False)
After upload, do a quick read-back check:
doc_text = the Google Drive connector's read document capability(document_id=result["file_id"])
Quick checks:
[Chart: appear? (indicates missing chart placeholders made it in)If any check fails, append a note to the report: "Note: some formatting may not have survived conversion. Review the document for any issues."
Say:
Your analysis is ready:
Google Doc: {url}
Local backup: {docx_path}
Sections: {N findings} findings + recommendations
Charts: {N} embedded
Version: {version}
The .docx file is saved locally as a backup. You can share the Google Doc
link with your team.
If this was a re-export, also mention: "This is version {N}. Previous versions
are tracked in outputs/gdoc_export.yaml."
Format: docx
Same as gdoc Steps 2a-2b only (parse + build .docx). Skip auth, upload, and
state tracking. Report the .docx path to the user.
Say: "Word document saved at {docx_path}. You can upload it to Google Drive
manually or share it directly."
Format: notion
Creates a Notion page from the analysis with charts, data stamps, and provenance toggle
blocks. Follows the Notion Export skill (the notion-export skill).
Check whether Notion connector tools are available in this session. If not: tell the user the Notion connector is not enabled and point them to Customize > Connectors.
Use the notion-export skill with:
NARRATIVE: latest narrativeCHART_FILES: chart PNGs from outputs/charts/DATASET: active datasetPROVENANCE_BLOCKS: from cross-verification (if available)ANALYSIS_RECEIPT: receipt path (if Tier 3)The agent handles Analysis Gallery detection, chart hosting, toggle blocks, and self-check.
Output: outputs/notion_url_{{DATASET}}_{{DATE}}.txt
Say: "Analysis exported to Notion: {url}. {N} findings with charts and provenance."
Format: receipt
Generates a full analysis receipt — the Reproduce-level audit trail. Contains every query, methodology decision, cross-verification result, and confidence factor breakdown.
working/query_log_*.jsonl)outputs/validation_*.md)If the analysis was run at Tier 3, the receipt is generated automatically at step 18.5.
Check if outputs/analysis_receipt_*.md already exists:
Invoke the receipt-generator agent with:
QUERY_LOG: most recent query log JSONLVALIDATION_REPORT: most recent validation reportCROSS_VERIFICATION_REPORT: cross-verification YAML (if available)PIPELINE_STATE: pipeline state JSON (if available)Output: outputs/analysis_receipt_{{DATASET_NAME}}_{{DATE}}.md
Say: "Analysis receipt generated at {path}. Contains {N} findings, {N} queries, and full validation breakdown."
Format: all
/export gdoc. Need a full audit trail? Run /export receipt."gdoc, notion, and receipt formats create external resources or audit trails — never include them in /export alloutputs/gdoc_export.yaml shows unchanged source, offer to open existing docWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
47 skills in this plugin
/always-compareNever present a metric or number in isolation; anchor every number to a comparison (prior period, benchmark, or another segment) or state that none is available. Use every time you show a number: rates, counts, revenue, averages, query results, chart labels, summary stats. Trigger on output containing "the rate is", "we saw", "total", "average", "conversion", "revenue", "users", "sessions", "churn", "AOV", "NPS", or any figure pulled from data./analysis-designTurn a vague hunch or stakeholder request into a rigorous analysis plan via a staged pipeline (hypothesis sharpening, confound scan, V1, feedback, V2 redesign). Trigger on "I think X caused Y", "design an analysis for", "what's driving", "V2 after feedback", "stakeholder comments", "redesign the analysis". Vs question-framing (the lightweight framing gate before every analysis): use THIS only for a real hunch, confound scan, or V1 to V2 redesign./analyst-coreOperating rules for every data analysis. Apply for ANY data-analysis intent: "analyze", "investigate", "why did X change", "compare", "report on", "dashboard", "metrics", "funnel", "retention", "revenue", "conversion", "trend", "segment", "forecast", "how are we doing", "dig into", "break down", or any question about data, a metric, a CSV, or a table. Sets the method and routes to the other skills; load before any analytical question./archaeologyRetrieve proven SQL patterns, table cheatsheets, and join patterns from .knowledge/query-archaeology/ so past work gets reused. Fire as a pre-flight step before writing ANY SQL. Also trigger on "do we have a known query for X", "how do we usually join these tables", "have we computed this metric before". If the store is empty or missing, exit silently. Also owns the writer convention: after a validated analysis, curate the final SQL here./businessBrowse and search the organization's business context in .knowledge/organizations/: glossary terms, product catalog, metric definitions, OKRs, team structure. Trigger on "/business", "show me our glossary", "what metrics are defined?", "what products do we have?", "show me our OKRs", "who's on which team?", "look up [business term]", "what's the meaning of [term]?". Use this instead of reading the files directly./causalCausal inference toolkit for when experiments are not possible: estimate treatment effects from observational data with assumption checks and mandatory caveats. Invoke as /causal. Trigger on "causal", "caused", "impact of", "effect of", "attribution", "counterfactual", "difference-in-differences", "DiD", "propensity matching", "pre-post". If randomization IS possible, route to /experiment design instead.npx claudepluginhub ai-analyst-lab/ai-analyst-plugin --plugin ai-analyst-plusOther plugins' skills for the same job