AGENT_SKILL_SPEC
Friday 自动化工作流与 Skill 规范
本文档用于记录和规范 AI Agent(Friday)如何作为记录员,协助站长将日常折腾、排错与随想转化为站内文章。
01. 触发方式
对话触发
“记到网络鲁滨逊”、“同步到荒岛”、“写篇技术手记”等口语化触发词。
02. 安全红线
自动清洗脱敏
本地正则先杀 Token、API Key、内网私有 IP,拒绝任何公网裸奔。
03. 审核兜底
候船区 + 延迟
低风险绿标进入 24 小时候船区,随时撤回;高风险红标强制入私有库。
1. Gemini & DeepSeek Function Calling Payload
两端保持完全统一的 Tool 签名格式,任何大模型 Harness 均可即插即用:
{
"name": "friday_capture",
"description": "把当前对话、技术文档、排错手记或随想同步到网络鲁滨逊收件箱。默认生成草稿,不直接公开。",
"parameters": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["note", "doc", "idea", "log"],
"description": "内容类型:随笔(note)、技术手册(doc)、灵感(idea)、实验日志(log)"
},
"title": {
"type": "string",
"description": "文章标题,中文,简明有力(30字以内)"
},
"content_md": {
"type": "string",
"description": "经整理后的结构化 Markdown 正文"
},
"category": {
"type": "string",
"enum": ["AI", "IT技术", "Agent实践", "日常生活"],
"description": "归属的核心专栏分类"
},
"tags": {
"type": "array",
"items": { "type": "string" },
"description": "标签数组"
},
"visibility": {
"type": "string",
"enum": ["draft", "private"],
"description": "初始可见性。必须为 draft 或 private,严禁直接 public"
}
},
"required": ["type", "title", "content_md", "category"]
}
} 2. Ingest API 端点设计
轻量接收 API(可由 Cloudflare Worker 或自托管服务承载):
POST https://inbox.netcrusoe.cn/api/ingest
Authorization: Bearer <FRIDAY_TOKEN>
Content-Type: application/json
{
"type": "doc",
"title": "Caddy 自动 HTTPS 部署实践",
"category": "IT技术",
"tags": ["自托管", "Caddy", "网络"],
"content_md": "## 背景\n...\n## 配置清单\n...",
"visibility": "draft",
"source": "gemini-harness"
}
// Response
{
"code": 0,
"msg": "ok",
"data": {
"id": "2026-10-19-caddy-https",
"preview_url": "https://inbox.netcrusoe.cn/preview/xxx",
"risk_level": "green",
"auto_publish_at": "2026-10-20T10:00:00Z"
}
} 3. 三色初审与延迟发布状态机
🟢
低风险(纯技术笔记、日常随笔、无外链):
进入“候船区”,静置 24 小时。若站长未点击撤回,系统自动合入发布分支。
🟡
中风险(有个人主观锐评、涉及他人、含外链):
给站长推送提醒(微信/飞书/Telegram),等待人工点一下“确认发布”。
🔴
高风险(含敏感正则、公司涉密、大段摘录):
自动转存至私有知识库,直接禁用公开端点,必须人工脱敏后重新评估。