Overview
MakeContents is a locally running RSS news aggregation and content creation application. This skill enables the Agent to autonomously complete the following tasks:
- Fetch news — Retrieve the latest content from configured RSS/RSSHub sources
- Filter and push — Select valuable news based on learned patterns, directly generate push content, and distribute it to WeChat and Feishu knowledge bases
- Content creation — Generate Xiaohongshu-style image and text content for selected news, automatically rendering cover and detail images
- Content archiving — Save the creation results to the Feishu multi-dimensional table and notify humans for review
Configuration
Before starting, confirm the following configurations (via the application system configuration page or .env settings):
- MakeContents service address: default
http://localhost:3710 - The API Keys required for each feature (Feishu, WeChat) have been filled in on the application configuration page
- The Feishu multi-dimensional table URL has been configured (used for content archiving, optional)
- The Feishu bot Webhook has been configured (used for completion notifications)
- Xiaohongshu Cookie has been configured + the publishing switch has been enabled (used for publishing notes,disabled by default, and must be proactively enabled by a human)
Important notes
- You must use
exec+curlto call the API, do not useweb_fetch(the latter is used to fetch external web pages and cannot access local services) - All API requests must include the Header:
Content-Type: application/jsonandAccept: application/json - Before execution, it is recommended to check service health first:
curl -s http://localhost:3710/api/healthshould return{"status":"ok"}
API reference
For the complete API documentation, see references/api.md, which includes the request/response formats for all endpoints.
Selection pattern memory
The Agent's learned patterns are stored under the skill file path references/agent-rules.md, and this file is updated after each learning session.
Execution flow
Flow 1: Learn selection patterns (optional)
First read the filereferences/agent-rules.mddocument. If it contains content filtering patterns, use these patterns as the selection criteria for subsequent tasks and skip this step; when there is no reference pattern content, execute in order:
- Call
GET /api/news/agent-summaryto get learning data - Analyze the data:
saved_news: news items pushed by the user (including push_type)all_news_in_period: all news items in the corresponding time period- Compare the two lists and extract the common characteristics of the selected news items
- Append the analyzed patterns to
references/agent-rules.md:
Analysis perspectives:
- Source distribution of selected news items (which sources are preferred)
- Topic characteristics of selected news items (keywords, topic types)
- Distribution of push types (which type of push users tend to prefer)
- Topic selection characteristics for content creation (which types of topics are created)
Flow 2: News push
To execute the news push workflow:
- Call
POST /api/news/fetchto fetch the latest news - Call
GET /api/news/grouped?agent=1Get the news list (already-pushed items are automatically excluded, no manual deduplication needed) - Use
references/agent-rules.mdfiltering rules in - Filter 0-5 valuable news items from the list according to the rules (if there is no valuable news, you can end this process directly)
- For each news item:
- Determine the push type (ainews / aitopics / aitools)
- Generate
news_title(≤30 characters, concise and powerful) andnews_summary(100-200 characters, matching the corresponding style) - Call the corresponding push API (note: the API paths are
/api/news/{id}/ainewsetc.,not/{id}/ainews/):POST /api/news/{id}/ainews POST /api/news/{id}/aitopics POST /api/news/{id}/aitools - Request body example:
{"news_title":"标题","news_summary":"摘要内容"}
- After completion, call
POST /api/content/notify-botto notify the human
Push type determination principles:
ainews: objective factual news, quick-report styleaitopics: controversial or thought-provoking topics, add a guiding question at the endaitools: new tool/product releases, highlight features and use cases
Process 3: Content creation
To execute the content creation workflow:
- Select 0-3 news items from the news list that are suitable for content creation (usually in-depth or interesting topics; if there is no valuable news, you can end this process directly)
- For each news item, construct the following parameters and call
POST /api/content/agent-render:news_id: news IDsource_url: original link (the link in description, not the news link; fill in if available, the service will automatically take a screenshot)cover_word: 1-2 English words summarizing the core themecover_title: ≤15 characters, impactful Chinese titlecover_description: ≤20 characters, supplementary explanationcover_emoji: 1 related Emojicontent_type:news/tools/topics/default(determines the color scheme)title: ≤20 characters, Xiaohongshu-style titlecontent: body text, 500-800 characters, Xiaohongshu style, with opinions and emotionstags: 3-5 tags, comma-separated
- Get the rendered result's
saved_content_id、cover_url、detail_urls - (optional, skip if not specified) call
POST /api/content/save-to-bitableand save to Feishu Bitable (passsaved_content_id) - Call
POST /api/content/publish-xhsto publish the note content to Xiaohongshu:{ "title": "{title(≤20字)}", "desc": "{content}", "cover_url": "{cover_url}", "detail_urls": ["{detail_urls[0]}", "..."], "is_private": true }- Agent must pass
"is_private": true, the note will be published as "visible only to myself", and the human will manually set it to public after review in the Xiaohongshu App - After success, get from the response
note_url - If the API returns the error "Xiaohongshu publishing feature is not enabled",do not retry, do not report an error, just skip this step
- Agent must pass
- Call
POST /api/content/notify-botto send a notification, message format:✅ 内容创作完成 标题:{title} 类型:{content_type} 标签:{tags} 已存入飞书多维表,请审核。 {如已发布到小红书:🔗 小红书笔记(仅自己可见,请在 App 审核后设为公开):{note_url}}
Notes
- Screenshot detail images may fail due to anti-scraping on the target website. If it fails, skip silently and only generate the cover
- The push API will automatically mark the news as saved, no need to manually call the save API
- When the Agent generates content,
news_titleandnews_summaryare directly used as push content, quality must be ensured - After each complete process execution, it is recommended to run the learning process once to update the rule memory
- Xiaohongshu publishing: The publishing switch is off by default, and the human decides whether to authorize. The Agent should respect this switch, silently skip when receiving a "not enabled" error, and must not repeatedly retry or prompt the human to enable it
- Service unavailable: Before calling the API, it is recommended to first GET
/api/health. If the request returns a 5xx error, it may be a temporary service failure; wait a few seconds and retry once; if it still fails, terminate the process and notify a human.