SkillAtlasSkill 详情

buffer-api

A curated library of reusable Codex skills for developers, individuals, and teams.

审核状态:已审核Quality 72Security 70

复制安装命令

用 Codex 或 Claude 安装复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它先审查 Skill 页面再帮你安装。

复制前请先查看来源、License 和安全提示。

项目 README

来源文件:README.md

抓取于 2026年9月12日

Codex Skills Library

Codex Skills Library

A curated library of reusable Codex skills for developers, individuals, and teams.

This repository helps you turn OpenAI Codex into a consistent, reliable AI assistant by packaging common workflows into reusable skills instead of repeating prompts.

What is this?

Codex Skills Library is a collection of focused skills for common developer workflows:

  • Code generation and debugging
  • Refactoring and optimization
  • Testing and documentation
  • System design and decision support
  • Engineering operations and reliability

Each skill is small, focused, triggered by natural language, and designed for progressive disclosure.

Repository structure

Skills are organized by domain under skills/. Each skill is a folder with a SKILL.md that includes frontmatter (name, description) and a short workflow.

Skills by domain

Foundation

  • codebase-orientation: Map entry points, key modules, and build/run paths; include local setup commands, env vars, and a safe starter task.
  • git-basic-helper: Provide minimal, safe git commands with clear intent and warnings for destructive actions.
  • debugging-checklist: Give a prioritized checklist from repro to isolation, logging, and hypothesis validation.
  • error-message-explainer: Translate compiler/runtime errors into plain language, likely root causes, and targeted fixes.
  • linter-fix-guide: Explain lint rules, show the expected pattern, and propose the smallest fix.
  • config-file-explainer: Summarize purpose, key sections, defaults, and which settings are safe to change.
  • data-structure-chooser: Recommend a structure based on operations and constraints, with time/space tradeoffs.
  • dependency-install-helper: List required runtimes, install steps by platform, and verification commands.
  • small-script-generator: Generate tiny automation scripts with safe defaults and a usage example.
  • ticket-breakdown: Turn a request into small, testable steps with dependencies and validation checks.
  • log-summarizer: Group errors, identify the first failure, and propose concrete next actions.

Docs

  • readme-polish: Add missing setup details, env vars, and troubleshooting guidance while keeping it concise.
  • function-docstrings: Document purpose, parameters, return values, and error conditions in project style.
  • release-notes-drafter: Group changes by feature/fix/breaking, translate to user impact, and add migration notes.
  • team-onboarding-guide: Provide access/setup steps, key services, and a first-week learning plan.

Testing

  • unit-test-starter: Draft tests around core behavior, edge cases, and failure paths with run instructions.
  • integration-test-planner: Identify integration points, scenarios, data flows, and needed fixtures/mocks.
  • bug-repro-plan: Produce a minimal repro with exact steps, environment details, and expected vs actual.

API

  • buffer-api: Build Buffer GraphQL API integrations for auth, channel discovery, post creation, pagination, errors, and rate limits.
  • api-request-builder: Build curl/fetch requests with auth, headers, and response inspection tips.
  • api-contract-checker: Compare endpoints and payloads, flag breaking changes, and suggest versioning.
  • api-error-taxonomy: Standardize error codes, payload shape, and logging guidance.
  • graphql-query-optimizer: Reduce query depth and N+1 patterns using batching, caching, and pagination.

Frontend

  • accessibility-basic-check: Check contrast, labels, focus order, and keyboard navigation for regressions.
  • css-layout-helper: Diagnose layout intent and provide minimal flex/grid fixes with rationale.
  • cli-ux-improver: Improve CLI defaults, help text, and errors with actionable next steps.

Backend

Data

Infra

Security

Performance

Reliability

Architecture

  • architecture-review: Evaluate assumptions, bottlenecks, and failure modes with tradeoffs.
  • domain-modeling: Identify entities, invariants, and bounded contexts with interfaces.

Planning

Get started

  1. Browse skills/ and open a SKILL.md that matches your task.
  2. Trigger the skill by asking Codex for that workflow.
  3. Improve or extend skills as your team learns what works best.

Step-by-step tutorial: https://proflead.dev/posts/codex-skills-explained-101/

Video tutorial: https://youtu.be/d3Ydt6LyGeY

Contribute

Contributions are welcome. Please open an issue for ideas or send a PR with new skills, improvements, or fixes. If this library is useful, please star the repo and share it with your team.

测试与质量数据与 AI内容与创作

中风险

  • 来源需自行核对维护者身份。
  • 包含脚本或命令调用,安装前请复核。
  • 可能需要外部 token、网络权限或第三方服务。
  • 未检测到高风险命令。
  • 扫描发现:3 条。

Codex — Git Clone 安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 克隆仓库:git clone https://github.com/proflead/codex-skills-library.git
  3. 将 "skills/api/buffer-api" 文件夹复制到 Codex 的 skills 目录中。
  4. 重启 Codex 让新的 skill 生效。

Codex — 手动复制安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 从源仓库下载 SKILL.md 及相关文件。
  3. 在 Codex 的 skills 目录中创建新文件夹。
  4. 将所有 skill 文件复制到新文件夹中。
  5. 重启 Codex 让新的 skill 生效。

Claude Code — Git Clone 安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 克隆仓库:git clone https://github.com/proflead/codex-skills-library.git
  3. 将 "skills/api/buffer-api" 文件夹复制到 Claude Code 的 skills 目录中。
  4. 重启 Claude Code 让新的 skill 生效。

Claude Code — 手动复制安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 从源仓库下载 SKILL.md 及相关文件。
  3. 在 Claude Code 的 skills 目录中创建新文件夹。
  4. 将所有 skill 文件复制到新文件夹中。
  5. 重启 Claude Code 让新的 skill 生效。

Cursor — Git Clone 安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 克隆仓库:git clone https://github.com/proflead/codex-skills-library.git
  3. 将 "skills/api/buffer-api" 文件夹复制到 Cursor 的 skills 目录中。
  4. 重启 Cursor 让新的 skill 生效。

Cursor — 手动复制安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 从源仓库下载 SKILL.md 及相关文件。
  3. 在 Cursor 的 skills 目录中创建新文件夹。
  4. 将所有 skill 文件复制到新文件夹中。
  5. 重启 Cursor 让新的 skill 生效。

GitHub Copilot — Git Clone 安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 克隆仓库:git clone https://github.com/proflead/codex-skills-library.git
  3. 将 "skills/api/buffer-api" 文件夹复制到 GitHub Copilot 的 skills 目录中。
  4. 重启 GitHub Copilot 让新的 skill 生效。

GitHub Copilot — 手动复制安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 从源仓库下载 SKILL.md 及相关文件。
  3. 在 GitHub Copilot 的 skills 目录中创建新文件夹。
  4. 将所有 skill 文件复制到新文件夹中。
  5. 重启 GitHub Copilot 让新的 skill 生效。

Windsurf — Git Clone 安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 克隆仓库:git clone https://github.com/proflead/codex-skills-library.git
  3. 将 "skills/api/buffer-api" 文件夹复制到 Windsurf 的 skills 目录中。
  4. 重启 Windsurf 让新的 skill 生效。

Windsurf — 手动复制安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 从源仓库下载 SKILL.md 及相关文件。
  3. 在 Windsurf 的 skills 目录中创建新文件夹。
  4. 将所有 skill 文件复制到新文件夹中。
  5. 重启 Windsurf 让新的 skill 生效。
查看 SKILL.md 原文
name: buffer-api
description: Manage Buffer content via the GraphQL API. Use when creating, scheduling, editing, or deleting posts, saving ideas, reading scheduled queues, or pulling post analytics. Not for general API debugging.

Buffer API — Content Operations

Purpose

Create, schedule, edit, and analyze social media content through Buffer's GraphQL API at https://api.buffer.com.

Inputs to request

  • What to do: create, schedule, draft, edit, delete, list, or analyze a post — or save/list ideas.
  • Channel ID(s) to target (or ask the user to run the "get channels" query first).
  • Post content: text, and optionally image/video URLs or thread structure.
  • Scheduling intent: add to queue, schedule at a specific time, publish now, or save as draft.
  • For analytics: which post ID(s) and which metrics matter (impressions, reactions, comments, etc.).

Operations map

GoalAPI call
Create / schedule a postcreatePost mutation
Save a post as draftcreatePost with saveToDraft: true
Edit an existing posteditPost mutation
Delete a postdeletePost mutation
List scheduled / sent postsposts query with filter: { status: [scheduled] }
Get a single postpost query by ID
Read post metricspost { metrics } or aggregatedPostMetrics query
Save a content ideacreateIdea mutation
Find channel IDschannels query by organization ID
Find organization IDaccount { organizations { id } } query

Auth setup (one-time)

All requests need Authorization: Bearer $BUFFER_API_KEY and Content-Type: application/json.

For personal scripts and automations: use an API key from https://publish.buffer.com/settings/api. For multi-user apps: use OAuth 2.0 with PKCE — authorize at https://auth.buffer.com/auth, exchange at https://auth.buffer.com/token. Refresh tokens are single-use; always save the new one immediately after refresh.

Workflow

  1. Get your organization ID (first time only):

    query { account { organizations { id name } } }
    
  2. Get channel IDs for your target platforms:

    query GetChannels($orgId: String!) {
      channels(input: { organizationId: $orgId }) {
        id name service
      }
    }
    
  3. Create or schedule the post using the relevant example below.

  4. Check the response — the mutation returns a union type. PostActionSuccess means it worked; MutationError carries the reason it failed. GraphQL always responds with HTTP 200, so always inspect the response body.

  5. Edit or delete if needed using the post id returned in step 3.

  6. Pull analytics after the post publishes (metrics are refreshed daily; allow up to 24 hours after publish).

Examples

Create a text post (add to queue)

mutation CreatePost($input: CreatePostInput!) {
  createPost(input: $input) {
    ... on PostActionSuccess {
      post { id text status dueAt }
    }
    ... on MutationError { message }
  }
}
{
  "input": {
    "text": "Your post content here",
    "channelId": "$CHANNEL_ID",
    "schedulingType": "automatic",
    "mode": "addToQueue"
  }
}

Schedule at a specific time

{
  "input": {
    "text": "Your post content here",
    "channelId": "$CHANNEL_ID",
    "schedulingType": "automatic",
    "mode": "customScheduled",
    "dueAt": "2026-07-01T14:00:00.000Z"
  }
}

Save as draft

{
  "input": {
    "text": "Draft content here",
    "channelId": "$CHANNEL_ID",
    "schedulingType": "automatic",
    "mode": "addToQueue",
    "saveToDraft": true
  }
}

Post with image

{
  "input": {
    "text": "Your caption here",
    "channelId": "$CHANNEL_ID",
    "schedulingType": "automatic",
    "mode": "addToQueue",
    "assets": [{ "image": { "url": "https://your-public-image-url.jpg" } }]
  }
}

Image URL must be publicly accessible. Each asset entry specifies exactly one type: image, video, document, or link.

Edit an existing post

mutation EditPost($input: EditPostInput!) {
  editPost(input: $input) {
    ... on PostActionSuccess {
      post { id text status dueAt }
    }
    ... on MutationError { message }
  }
}
{ "input": { "id": "$POST_ID", "text": "Updated content here" } }

Delete a post

mutation DeletePost {
  deletePost(input: { id: "$POST_ID" }) {
    ... on PostActionSuccess { post { id } }
    ... on MutationError { message }
  }
}

List scheduled posts

query GetScheduledPosts($orgId: String!) {
  posts(input: {
    organizationId: $orgId,
    filter: { status: [scheduled] },
    sort: [{ field: dueAt, direction: asc }]
  }) {
    edges {
      node { id text dueAt channelId }
    }
    pageInfo { hasNextPage endCursor }
  }
}

For more pages, add after: "$endCursor" to input. Page size: 20–50 items.

Get post analytics

query GetPostMetrics {
  post(input: { id: "$POST_ID" }) {
    id text metricsUpdatedAt
    metrics { type name value unit }
  }
}

Available metric types (varies by network): reactions, reposts, comments, shares, impressions, reach, views, saves, follows, likes. Metrics appear up to ~24 hours after publish.

Save an idea

mutation CreateIdea($input: CreateIdeaInput!) {
  createIdea(input: $input) {
    ... on MutationError { message }
  }
}
{
  "input": {
    "organizationId": "$ORG_ID",
    "content": { "title": "Optional title", "text": "Idea content here" }
  }
}

Ideas are org-level (not tied to a channel). Promote to a post by using the idea's text in createPost.

Rate limits

Buffer enforces three time windows. On HTTP 429, read retryAfter (seconds) from the response body.

Plan15-min24-hr30-day
Free1001003,000
Essentials1002507,500
Team10050015,000

Troubleshooting

  • No post field in mutation response → MutationError fired; log data.<mutationName>.message.
  • UNAUTHORIZED → check Authorization: Bearer $BUFFER_API_KEY header is present and token is valid.
  • FORBIDDEN → token lacks the right scope (e.g., posts:write needed for create/edit/delete).
  • Metrics missing → post published less than 24 hours ago; check metricsUpdatedAt.
  • Image not attaching → URL must be publicly accessible; see the Hosting Media guide.

Quality bar

  • Always use GraphQL variables — never interpolate user content into query strings.
  • Include ... on MutationError { message } in every mutation.
  • Never expose real tokens or channel IDs in examples.
  • Metrics API is preview-only and available for personal API keys only (not OAuth apps).

发现问题?提交给管理员复核

评分:

评论 (0)

暂无评论,成为第一个评论者吧!