agentleFS
Martin-HausleitnerMartin-Hausleitner/martins-awesome-skills/skills/productivity/ai-research-output-publisher/SKILL.md

ai-research-output-publisher

Skill3 starsChanged 6 months agoMITView on GitHub

Use when turning finished AI research results into clear chat messages, copy-ready summaries, duration metrics, PSPin/deep-research links, and optional Notion pages without exposing private data.

  • Reads credentials

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill after a Deep Research, Agent, or long AI workflow has finished and you need a polished result message plus optional Notion …

    line 15
  2. Distinctive:

    Run the deterministic local E2E test:

    line 126

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

AI Research Output Publisher

Use this skill after a Deep Research, Agent, or long AI workflow has finished and you need a polished result message plus optional Notion sync.

It does not run the browser workflow itself. It consumes a result JSON file from ai-research-browser, Oracle harvest output, or another orchestrator and produces:

  • a clear chat message with icon, readable links, and copy-ready summary text;
  • support for multiple research results in one notification;
  • average research duration and total duration metrics;
  • a Notion page payload where the summary appears above the full text;
  • optional live Notion page creation only when explicitly allowed.
  • optional live chat/webhook delivery only when explicitly allowed.

Safe Default

Render a message and Notion payload without external writes:

python3 skills/productivity/ai-research-output-publisher/scripts/ai_research_output_publisher.py render \
  --input /tmp/research-results.json \
  --message-output /tmp/research-message.md \
  --payload-output /tmp/research-notion-payload.json

The chat message includes summary text by default. Add --chat-summary off when only links and metrics should be shown. Secret-like values are redacted by default (--privacy redacted), including emails, obvious API tokens, bearer headers, proxy credentials, and URL query strings. Use --privacy full only for private/local artifacts that must preserve exact text.

Try the bundled public-safe example:

python3 skills/productivity/ai-research-output-publisher/scripts/ai_research_output_publisher.py render \
  --input skills/productivity/ai-research-output-publisher/examples/research-results.example.json

Expected message shape: examples/research-message.example.md.

Input Shape

{
  "job_id": "research-batch-001",
  "title": "Weekly AI research",
  "results": [
    {
      "title": "Obsidian AI plugins",
      "provider": "gemini",
      "mode": "deep-research",
      "status": "completed",
      "deep_research_url": "https://example.com/research",
      "pspin_url": "https://example.com/pin",
      "summary": "Short summary shown in chat and at the top of Notion.",
      "text": "Full research report.",
      "research_duration_seconds": 720,
      "total_duration_seconds": 900
    }
  ]
}

The script accepts research_url, deep_research_url, chat_url, or source_url for the main research link.

Publish To Notion

Live Notion writes require explicit opt-in:

NOTION_API_KEY="secret-token" \
python3 skills/productivity/ai-research-output-publisher/scripts/ai_research_output_publisher.py publish-notion \
  --input /tmp/research-results.json \
  --parent-page-id "<notion-parent-page-id>" \
  --allow-external-write

Without --allow-external-write, the command writes only the planned Notion payload. Live writes still use redacted mode by default; pass --privacy full only when the destination workspace is allowed to receive the exact captured text.

Send Chat Notification

Prepare a chat/webhook notification without sending:

python3 skills/productivity/ai-research-output-publisher/scripts/ai_research_output_publisher.py send-chat \
  --input /tmp/research-results.json \
  --channel webhook \
  --webhook-url "https://example.invalid/research-webhook"

Live delivery requires explicit opt-in:

python3 skills/productivity/ai-research-output-publisher/scripts/ai_research_output_publisher.py send-chat \
  --input /tmp/research-results.json \
  --channel discord \
  --webhook-url "<discord-webhook-url>" \
  --allow-external-write

Supported channels are webhook, discord, and telegram. Tokens and destinations must come from local environment variables or CLI arguments and must never be committed.

Output Contract

Each notification includes:

  • an icon-based headline;
  • one row per completed result;
  • readable Markdown links for Deep Research and PSPin;
  • average research duration and average total duration;
  • copy-ready summary text;
  • button metadata for copy, Deep Research, PSPin, and Notion page actions.
  • optional chat_delivery status when sent through the gated send-chat command.

Verification

Run the deterministic local E2E test:

python3 -m unittest discover -s skills/productivity/ai-research-output-publisher/tests -p 'test_*.py'

The tests use fake input and a local fake Notion endpoint. They do not write to a real workspace.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.