schedule-approved
Skill0 starsChanged 2 months agoMITView on GitHub
Use when the user wants to send approved LinkedIn drafts to Buffer, check the scheduling queue, or explicitly invokes /schedule-approved. Calls Buffer's real GraphQL API to schedule status:approved drafts, maintains the rolling 2-day-ahead buffer (REQUIREMENTS.md §10), and writes Scheduled Notes. Requires real Buffer credentials in the environment — never attempts a call without them, and never invents a result if a call fails.
- Reads credentials
In this repository38 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- audit-draftSkill
- check-plagiarismSkill
- critique-draftSkill
- critique-draft-substack-articleSkill
- critique-draft-substack-noteSkill
- critique-draft-xSkill
- draft-commentSkill
- draft-replySkill
- extract-hookSkill
- generate-ideasSkill
- generate-visualSkill
- generate-visual-substack-articleSkill
- generate-weekSkill
- generate-week-substackSkill
- generate-week-xSkill
- humanize-draftSkill
- interviewerSkill
- monitor-engagementSkill
- optimize-profileSkill
- plan-advocacySkill
- plan-weekSkill
- plan-week-substack-articleSkill
- plan-week-substack-noteSkill
- plan-week-xSkill
- publish-substackSkill
- pull-analyticsSkill
- pull-analytics-xSkill
- repurpose-postSkill
- research-topicSkill
- review-draftsSkill
- schedule-approved-xSkill
- update-playbookSkill
- write-draftSkill
- write-draft-substack-articleSkill
- write-draft-substack-noteSkill
- write-draft-xSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. About 0 are common, 5 are distinctive, and 9 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 11
Only acts on drafts a human has already approved via /review-drafts — this skill never approves anything itself.
- Very specific: line 16
Read these from the environment (a .env file is fine, must stay git-ignored):
- Very specific: line 38
All requests: POST https://api.buffer.com, header Authorization: Bearer <BUFFER_ACCESS_TOKEN>, JSON body {"query": "...", "variables": …
- Very specific: line 51
Every status: approved draft with an empty scheduled_id.
- Very specific: line 53
If the draft has a preferred_time set (via Change Time in /review-drafts), use it.
- Very specific: line 79
If the response is a MutationError or an HTTP/GraphQL error, stop for that draft, report the exact error message, and do not write a …
- Very specific: line 96
Write a Scheduled Note in Scheduled/ from _Templates/Scheduled-Published-Note.md: draft_id, final_text, buffer_post_id (the returned …
- Distinctive: line 106
After scheduling, recount.
- Distinctive: line 116
Do not notify on ordinary success — a routine schedule confirmation isn't worth an interruption.
- Distinctive: line 121
Never call Buffer without both required env vars actually populated — check their presence and non-placeholder-ness before every run.
- Very specific: line 123
Never invent a buffer_post_id or claim success on a failed call.
- Very specific: line 124
Never schedule a draft that isn't status: approved.
- Distinctive: line 125
Never schedule onto Sat/Sun unless explicitly requested.
- Distinctive: line 126
Never retry a failed call silently more than once — report it.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Schedule Approved (Scheduler Agent — Phase 8)
Sends status: approved drafts to Buffer for real scheduling, using
Buffer's current GraphQL API (verified against developers.buffer.com — the
old REST v1 API is deprecated; this is a GraphQL API at a single endpoint).
Only acts on drafts a human has already approved via /review-drafts —
this skill never approves anything itself.
Required environment
Read these from the environment (a .env file is fine, must stay
git-ignored):
BUFFER_ACCESS_TOKEN— personal API token fromhttps://publish.buffer.com/settings/apiBUFFER_CHANNEL_ID— the Buffer "channel" id for the target LinkedIn profile (Buffer's API calls a connected social profile a "channel," not a "profile" — terminology changed from the old API)
If either is missing or empty, stop immediately and say exactly which one is missing and how to get it. Never attempt a call with a blank or placeholder token.
One-time channel discovery (only if BUFFER_CHANNEL_ID is unknown)
query GetOrganizations { account { organizations { id } } }— get the organization id.query GetChannels { channels(input: { organizationId: "<id>" }) { id name displayName service } }— find the entry whereserviceis the LinkedIn profile, report itsidanddisplayName, and ask the user to confirm before saving it asBUFFER_CHANNEL_ID.
All requests: POST https://api.buffer.com, header
Authorization: Bearer <BUFFER_ACCESS_TOKEN>, JSON body
{"query": "...", "variables": {...}}.
Process
1. Check the rolling buffer (REQUIREMENTS.md §10)
Count approved-or-scheduled content dated within the next 2 days from
today. If it's already below 2 days' worth, say so plainly before doing
anything else — this is the signal that more drafts need to move through
/plan-week → /write-draft → /critique-draft → /review-drafts.
2. Select drafts to schedule
Every status: approved draft with an empty scheduled_id. Determine
timing:
- If the draft has a
preferred_timeset (via Change Time in/review-drafts), use it. - Otherwise use the research-backed generic default time for that
weekday from the table in REQUIREMENTS.md §11 (e.g. Tue 16:00, Thu
17:00, Sat 09:00, local/IST), on the idea's
target_date. This is an unvalidated starting heuristic sourced from external LinkedIn best-time studies, not derived from this account's real performance data — say so, don't present it as optimized. It's superseded automatically onceContent-Learnings/playbook.mdhas ≥3 published posts' worth of day+time evidence (§13).
3. Call Buffer
mutation CreatePost($text: String!, $channelId: ChannelId!, $dueAt: DateTime!) {
createPost(input: {
text: $text
channelId: $channelId
schedulingType: automatic
mode: customScheduled
dueAt: $dueAt
}) {
... on PostActionSuccess { post { id text dueAt } }
... on MutationError { message }
}
}If the response is a MutationError or an HTTP/GraphQL error, stop for
that draft, report the exact error message, and do not write a Scheduled
Note for it. Never fabricate a buffer_post_id. This is also a
notification trigger (Phase 11: "a post fails to publish").
Note: verified live against Buffer's API on 2026-09-09 (first real call
from this pipeline — see Scheduled/2026-09-16--crewai-crews-vs-flows.md
for the full record). One correction was needed and is now baked into the
mutation above: channelId is the custom scalar ChannelId!, not
String! as the docs-only draft of this skill assumed — the live schema
rejected String! with GRAPHQL_VALIDATION_FAILED, and the fix was
applied based on that exact error message, not guessed. The rest of the
shape (mutation name, PostActionSuccess/MutationError union,
schedulingType/mode/dueAt fields) worked as documented on the first
successful call.
4. On success
- Write a Scheduled Note in
Scheduled/from_Templates/Scheduled-Published-Note.md:draft_id,final_text,buffer_post_id(the returnedpost.id),scheduled_date/scheduled_time,publish_status: scheduled, plus category/format/ length/hook_style/hashtags/visual_ids/sources copied from the draft. - Set the Draft Note's
scheduled_idto the new Scheduled Note's id. The draft itself staysstatus: approved— it's the historical record; the Scheduled Note is now the live one.
5. Re-check the rolling buffer
After scheduling, recount. If still below 2 days ahead, flag it again — this is a real, current gap, not a hypothetical one.
Notifications (REQUIREMENTS.md §24)
Send a PushNotification (status: proactive) when:
- the rolling buffer is below 2 days ahead, after step 5 — e.g. "LinkedIn queue: only 1 day of approved posts left, need more drafts."
- a Buffer call fails (step 3) — e.g. "LinkedIn post failed to schedule:
<short error>." Do not notify on ordinary success — a routine schedule confirmation isn't worth an interruption.
Hard rules
- Never call Buffer without both required env vars actually populated — check their presence and non-placeholder-ness before every run.
- Never invent a
buffer_post_idor claim success on a failed call. - Never schedule a draft that isn't
status: approved. - Never schedule onto Sat/Sun unless explicitly requested.
- Never retry a failed call silently more than once — report it.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

