← 返回 Skills 市场
ai agent
作者
Phan Văn Năng
· GitHub ↗
· v1.0.0
· MIT-0
229
总下载
0
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install ai-agent
功能描述
Automate Facebook Page posting and token management using Graph API with retry-safe, rate-limit-aware workflows for text and image content.
使用说明 (SKILL.md)
Facebook Graph API Skill (Advanced)
Purpose
Production-oriented guide for building Facebook Graph API workflows for Pages: publishing posts (text + image), managing tokens, and operating Page content safely using direct HTTPS calls.
Best fit
- Page posting automation with images (DALL-E generated or external URL)
- Token management (short-lived → long-lived → page token)
- Retry-safe, rate-limit-aware production pipelines
Not a fit
- Personal profile posting (not supported by Graph API for third-party apps)
- Ads / Marketing API workflows
- Browser-based OAuth flows
Quick orientation
agents/fb_token_helper.py ← Get & exchange tokens (run this first!)
agents/fb_publisher_agent.py ← Post text / images to Page
config.py ← All env vars
test_fb_connection.py ← Verify token is working
Token Flow
Short-lived User Token (1-2h)
↓ GET /oauth/access_token?grant_type=fb_exchange_token
Long-lived User Token (60 days)
↓ GET /me/accounts
Page Access Token (never expires*)
*Until user changes password or revokes app.
Required Environment Variables
FB_APP_ID=... # From Meta for Developers
FB_APP_SECRET=... # App secret
FB_PAGE_ID=... # Target Fanpage ID
FB_PAGE_ACCESS_TOKEN=... # From fb_token_helper.py
Key API Endpoints
Post text
POST /v21.0/{page_id}/feed
message=...
access_token={page_token}
Upload photo (unpublished)
POST /v21.0/{page_id}/photos
url={image_url}
published=false
access_token={page_token}
→ Returns: { "id": "PHOTO_ID" }
Post with photo
POST /v21.0/{page_id}/feed
message=...
attached_media[0]={"media_fbid":"PHOTO_ID"}
access_token={page_token}
Scheduled post
POST /v21.0/{page_id}/feed
message=...
scheduled_publish_time={unix_timestamp}
published=false
access_token={page_token}
Required Permissions
| Permission | Purpose |
|---|---|
pages_manage_posts |
Create/edit posts |
pages_read_engagement |
Read reactions, comments |
pages_show_list |
List managed pages |
public_profile |
Basic user identity |
Rate Limits
- 200 calls/hour/user token
- Implement retry with exponential backoff (see fb_publisher_agent.py)
- POST 4-5 times/day max per Page for safety
Security
- Never log tokens or app secrets
- Store all secrets in .env (ignored by git)
- Validate webhook signatures if using webhooks
- Monitor token validity daily with a cron job
安全使用建议
This skill's purpose (Facebook Page posting and token management) is reasonable, but there are two red flags: (1) the runtime instructions require sensitive credentials (FB_APP_ID, FB_APP_SECRET, FB_PAGE_ID, FB_PAGE_ACCESS_TOKEN) yet the published metadata does not declare them; and (2) the README instructs you to run scripts (fb_token_helper.py, fb_publisher_agent.py, config.py) that are not included. Before installing or running anything: do not paste secrets into a tool you can't inspect; ask the publisher for the missing code or a verified package; insist the skill metadata list required env vars and primary credential; review any provided scripts for secret handling and network behavior; store tokens in a secure secret manager (not plain .env in shared repos); use least-privilege page tokens and rotate them after testing; and verify webhook signature validation and retry/backoff behavior in the actual code. If the publisher cannot supply the referenced code or explain why metadata omits env vars, avoid providing credentials.
功能分析
Type: OpenClaw Skill
Name: aiagent
Version: 1.0.0
The bundle contains documentation and metadata for a Facebook Graph API integration. The SKILL.md file provides standard instructions for managing Facebook Page tokens and publishing posts via legitimate API endpoints. No malicious code, exfiltration logic, or harmful prompt-injection instructions were found in the provided files.
能力评估
Purpose & Capability
The SKILL.md describes a Facebook Page posting and token-management tool (requires FB_APP_ID, FB_APP_SECRET, FB_PAGE_ID, FB_PAGE_ACCESS_TOKEN) which is coherent with the stated purpose. However, the registry metadata declares no required environment variables or primary credential, creating a mismatch: the skill asks for sensitive credentials in its instructions but the published metadata does not reflect that.
Instruction Scope
SKILL.md instructs running and referencing files (agents/fb_token_helper.py, agents/fb_publisher_agent.py, config.py, test_fb_connection.py) and reading env vars/.env, yet no code files are included in the package. That leaves the runtime behavior underspecified and requires the user to run or obtain scripts not provided here, which is a notable inconsistency and operational risk.
Install Mechanism
Instruction-only skill with no install spec and no binaries to download — low install-time risk. Nothing in the package will be written to disk by an installer because there is no installer.
Credentials
The SKILL.md legitimately requires sensitive values (FB_APP_SECRET and FB_PAGE_ACCESS_TOKEN) for the claimed functionality, which is proportionate to posting on Pages. However, these credentials are not declared in the skill metadata (primaryEnv missing) and there is no secure secret storage mechanism described beyond a .env file recommendation. The absence of declared env vars in registry metadata reduces transparency and increases risk of accidental credential misuse.
Persistence & Privilege
The skill is not force-included (always: false) and uses default autonomous invocation settings; it does not request persistent system-level privileges or modify other skills' configs. No additional persistence or elevated privileges are declared.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install ai-agent - 安装完成后,直接呼叫该 Skill 的名称或使用
/ai-agent触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of advanced Facebook Graph API automation skill.
- Guides production-safe posting for Facebook Pages with text and images via HTTPS.
- Includes token acquisition, exchange, and safe management workflow.
- Modular agents to fetch tokens, post content, and verify app setup.
- Emphasizes environment setup, key permissions, and rate-limit awareness.
- Security best practices and endpoint usage examples provided for smooth deployment.
元数据
常见问题
ai agent 是什么?
Automate Facebook Page posting and token management using Graph API with retry-safe, rate-limit-aware workflows for text and image content. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 229 次。
如何安装 ai agent?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install ai-agent」即可一键安装,无需额外配置。
ai agent 是免费的吗?
是的,ai agent 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
ai agent 支持哪些平台?
ai agent 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 ai agent?
由 Phan Văn Năng(@yunneetoichoi)开发并维护,当前版本 v1.0.0。
推荐 Skills