360 Secure SkillHub
360 安全技能中心

Blog Posting Skill

核心功能:支持从主题生成带规范元数据的markdown草稿,或基于现有草稿,通过Nano Banana生成品牌封面图,转成干净HTML后连同图片提交至AgentTrust博客API,反馈提交结果。典型场景:需发布AgentTrust品牌博客的需求,无论仅提供主题/笔记还是已有markdown草稿。输入为主题、博客说明、笔记或markdown文件,输出含本地草稿、封面图及提交状态、post_id等反馈,默认提交至审核状态。

agenttrust
agenttrust
热度 31.57
最近更新 2026-05-03 02:31:52
分类:创作依赖:代码执行 / 读写文件 / 第三方 API / MCP 服务 / 内部调用大模型应用场景:博客写作 / 文案创作 / 图像生成 / 报告撰写 ...

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add blog-posting-skill
Metadata
name
blog-posting-skill
description
Draft, package, and submit AgentTrust blog posts from a topic or markdown draft. Use when an agent needs to turn blog instructions into a finished AgentTrust article, generate the branded header image through the Nano Banana Gemini skill, upload that image in the same blog API request, and report the final review status back to Gabriel.

AgentTrust Blog Posting Skill

Run the whole workflow inside this skill: topic → markdown draft → cover image → HTML payload → API submission.

Core rules

  • Always generate the cover image before submitting the post.
  • Always use the Nano Banana Gemini image generator through the sibling skill script.
  • Always attach the generated image in the same blog API request via image_base64 and image_filename.
  • Never silently downgrade to “text-only blog post” unless the user explicitly asks.

Acceptable starting points

A. Topic / instructions only

If the user gives only a topic, article brief, or raw notes:

  • draft the article first
  • save it under blog-drafts/YYYY-MM-DD-slug.md
  • include complete frontmatter
  • then run the publish helper script

B. Existing markdown draft

If the user already gives a markdown file, validate it and publish from that.

Expected frontmatter shape:

---
title: "Article Title"
description: "150-160 char SEO description"
date: "YYYY-MM-DD"
author: "Gabriel Guidarelli"
tags: ["ai-security", "agenttrust"]
status: "draft"
target_keyword: "primary keyword"
---

Use frontmatter as the source of truth for:

  • title
  • excerpt / meta_description
  • focus_keyword
  • tags
  • slug
  • author

Default workflow

1. Write the article if needed

When starting from a topic:

  • write the blog post in Gabriel’s voice
  • keep it clear, direct, and useful
  • save the markdown draft locally before submitting
  • make sure the frontmatter is complete before moving on

2. Generate the header image with Nano Banana

Use the bundled sibling script indirectly through:

python3 skills/blog-posting-skill/scripts/publish_agenttrust_blog.py <draft-path>

That helper script already calls:

skills/nano-banana-image-generator/scripts/generate_gemini_image.py

Do not invent another image workflow unless the Nano Banana path is broken.

The image prompt is locked to the AgentTrust trust-flow composition. Read references/cover-branding.md for the exact prompt and visual rules.

3. Convert markdown to clean HTML

The helper script converts the article body into simple clean HTML.

Supported structure:

  • paragraphs → <p>
  • ## → <h2>
  • ### → <h3>
  • bullet lists → <ul><li>
  • inline links → anchors
  • basic bold / italic / inline code

4. Submit the post and image together

Use the production API:

POST https://agenttrust.ai/api/submitBlogPost

Auth:

Authorization: Bearer $AGENTTRUST_API_KEY
Content-Type: application/json

Required payload core:

  • title
  • slug
  • content

Recommended payload fields used by this skill:

  • excerpt
  • tags
  • meta_title
  • meta_description
  • focus_keyword
  • image_alt
  • author_name
  • image_base64
  • image_filename

When image_base64 is present, AgentTrust uploads the image and sets the blog image fields automatically. Prefer this over trying to host og_image manually.

Use the helper script

Standard end-to-end publish

python3 skills/blog-posting-skill/scripts/publish_agenttrust_blog.py \
  blog-drafts/2026-04-14-my-post.md

Publish with explicit topic context for the image

python3 skills/blog-posting-skill/scripts/publish_agenttrust_blog.py \
  blog-drafts/2026-04-14-my-post.md \
  --topic "prompt injection protection for AI email"

Dry run

python3 skills/blog-posting-skill/scripts/publish_agenttrust_blog.py \
  blog-drafts/2026-04-14-my-post.md \
  --dry-run --json-out /tmp/blog-post-preview.json

What the helper script does

publish_agenttrust_blog.py:

  • parses frontmatter
  • validates required metadata
  • derives slug if missing
  • builds the Nano Banana prompt
  • generates the cover image
  • base64-encodes the generated image
  • converts markdown to HTML
  • submits the article and image together
  • returns the API response with paths and payload summary

Reporting rules

After completion, report:

  • article title
  • markdown draft path
  • generated image path
  • whether the post was actually submitted or only dry-run built
  • post_id
  • returned status, normally review
  • any failure reason if the image step or API step broke

Practical rules

  • Use the production endpoint unless the user explicitly asks for test.
  • Use Bearer auth, not x-api-key.
  • Posts submit in review state; do not claim they are live unless confirmed.
  • Keep drafting, image generation, and submission as one workflow when the user asks for end-to-end publishing.
  • If the Nano Banana image step fails, fix or retry that step before publishing.
  • Prefer the helper script over manual curl because it keeps the workflow deterministic.

Output checklist

Before finishing, verify:

  • draft exists locally
  • frontmatter is complete
  • cover image generated with Nano Banana
  • image saved locally
  • image attached through image_base64
  • HTML payload built cleanly
  • article submitted to API or explicitly dry-run only
  • post_id / status captured
  • Gabriel given the final paths and result