@aksp/opencrew 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/LICENSE +24 -0
  3. package/README.md +118 -0
  4. package/bin/opencrew.js +8 -0
  5. package/package.json +57 -0
  6. package/src/cli.js +70 -0
  7. package/src/commands/init.js +97 -0
  8. package/src/commands/update.js +58 -0
  9. package/src/lib/fsx.js +55 -0
  10. package/src/lib/ides.js +120 -0
  11. package/src/lib/paths.js +8 -0
  12. package/src/lib/prompts.js +35 -0
  13. package/src/lib/ui.js +20 -0
  14. package/templates/.env.example +23 -0
  15. package/templates/.mcp.json +8 -0
  16. package/templates/AGENTS.md +105 -0
  17. package/templates/_opencrew/.opencrew-version +1 -0
  18. package/templates/_opencrew/_investigations/.gitkeep +0 -0
  19. package/templates/_opencrew/_memory/company.md +4 -0
  20. package/templates/_opencrew/_memory/preferences.md +9 -0
  21. package/templates/_opencrew/config/playwright.config.json +11 -0
  22. package/templates/_opencrew/core/architect.agent.yaml +110 -0
  23. package/templates/_opencrew/core/best-practices/_catalog.yaml +116 -0
  24. package/templates/_opencrew/core/best-practices/blog-post.md +151 -0
  25. package/templates/_opencrew/core/best-practices/blog-seo.md +146 -0
  26. package/templates/_opencrew/core/best-practices/copywriting.md +446 -0
  27. package/templates/_opencrew/core/best-practices/data-analysis.md +420 -0
  28. package/templates/_opencrew/core/best-practices/email-newsletter.md +136 -0
  29. package/templates/_opencrew/core/best-practices/email-sales.md +127 -0
  30. package/templates/_opencrew/core/best-practices/image-design.md +365 -0
  31. package/templates/_opencrew/core/best-practices/instagram-feed.md +252 -0
  32. package/templates/_opencrew/core/best-practices/instagram-reels.md +128 -0
  33. package/templates/_opencrew/core/best-practices/instagram-stories.md +123 -0
  34. package/templates/_opencrew/core/best-practices/linkedin-article.md +133 -0
  35. package/templates/_opencrew/core/best-practices/linkedin-post.md +138 -0
  36. package/templates/_opencrew/core/best-practices/researching.md +366 -0
  37. package/templates/_opencrew/core/best-practices/review.md +286 -0
  38. package/templates/_opencrew/core/best-practices/social-networks-publishing.md +311 -0
  39. package/templates/_opencrew/core/best-practices/strategist.md +361 -0
  40. package/templates/_opencrew/core/best-practices/technical-writing.md +382 -0
  41. package/templates/_opencrew/core/best-practices/twitter-post.md +122 -0
  42. package/templates/_opencrew/core/best-practices/twitter-thread.md +139 -0
  43. package/templates/_opencrew/core/best-practices/whatsapp-broadcast.md +124 -0
  44. package/templates/_opencrew/core/best-practices/youtube-script.md +139 -0
  45. package/templates/_opencrew/core/best-practices/youtube-shorts.md +129 -0
  46. package/templates/_opencrew/core/prompts/build.prompt.md +547 -0
  47. package/templates/_opencrew/core/prompts/design.prompt.md +469 -0
  48. package/templates/_opencrew/core/prompts/discovery.prompt.md +269 -0
  49. package/templates/_opencrew/core/prompts/sherlock-instagram.md +123 -0
  50. package/templates/_opencrew/core/prompts/sherlock-linkedin.md +73 -0
  51. package/templates/_opencrew/core/prompts/sherlock-shared.md +684 -0
  52. package/templates/_opencrew/core/prompts/sherlock-twitter.md +78 -0
  53. package/templates/_opencrew/core/prompts/sherlock-youtube.md +85 -0
  54. package/templates/_opencrew/core/runner.pipeline.md +611 -0
  55. package/templates/_opencrew/core/skills.engine.md +388 -0
  56. package/templates/_opencrew/logs/.gitkeep +0 -0
  57. package/templates/crews/.gitkeep +0 -0
  58. package/templates/gitignore +8 -0
  59. package/templates/skills/apify/SKILL.md +55 -0
  60. package/templates/skills/blotato/SKILL.md +63 -0
  61. package/templates/skills/canva/SKILL.md +60 -0
  62. package/templates/skills/image-ai-generator/SKILL.md +124 -0
  63. package/templates/skills/image-ai-generator/scripts/generate.py +175 -0
  64. package/templates/skills/image-creator/SKILL.md +155 -0
  65. package/templates/skills/image-fetcher/SKILL.md +91 -0
  66. package/templates/skills/instagram-publisher/SKILL.md +119 -0
  67. package/templates/skills/instagram-publisher/scripts/publish.js +165 -0
  68. package/templates/skills/opencrew-best-practice-creator/SKILL.md +192 -0
  69. package/templates/skills/opencrew-skill-creator/SKILL.md +420 -0
  70. package/templates/skills/opencrew-skill-creator/agents/analyzer.md +274 -0
  71. package/templates/skills/opencrew-skill-creator/agents/comparator.md +202 -0
  72. package/templates/skills/opencrew-skill-creator/agents/grader.md +223 -0
  73. package/templates/skills/opencrew-skill-creator/assets/eval_review.html +146 -0
  74. package/templates/skills/opencrew-skill-creator/eval-viewer/generate_review.py +471 -0
  75. package/templates/skills/opencrew-skill-creator/eval-viewer/viewer.html +1325 -0
  76. package/templates/skills/opencrew-skill-creator/references/schemas.md +430 -0
  77. package/templates/skills/opencrew-skill-creator/references/skill-format.md +235 -0
  78. package/templates/skills/opencrew-skill-creator/scripts/__init__.py +0 -0
  79. package/templates/skills/opencrew-skill-creator/scripts/aggregate_benchmark.py +401 -0
  80. package/templates/skills/opencrew-skill-creator/scripts/quick_validate.py +103 -0
  81. package/templates/skills/opencrew-skill-creator/scripts/run_eval.py +310 -0
  82. package/templates/skills/opencrew-skill-creator/scripts/utils.py +47 -0
  83. package/templates/skills/resend/SKILL.md +80 -0
  84. package/templates/skills/template-designer/SKILL.md +208 -0
  85. package/templates/skills/template-designer/base-templates/model-a.html +27 -0
  86. package/templates/skills/template-designer/base-templates/model-b.html +31 -0
  87. package/templates/skills/template-designer/base-templates/model-c.html +42 -0
@@ -0,0 +1,286 @@
1
+ ---
2
+ id: review
3
+ name: "Content Review & Quality Control"
4
+ whenToUse: |
5
+ Creating agents that evaluate content quality, score against criteria,
6
+ or produce structured APPROVE/REJECT verdicts.
7
+ NOT for: content creation, research, data analysis, strategic planning.
8
+ version: "1.0.0"
9
+ ---
10
+
11
+ ## Compact Rules
12
+
13
+ 1. Evaluate content exclusively against defined criteria, never personal preference.
14
+ 2. Justify every score with a specific, written explanation (e.g., "Score: 6/10 because...").
15
+ 3. Provide actionable suggestions rather than vague directives.
16
+ 4. Cross-reference feedback against established brand guidelines and cite them.
17
+ 5. Enforce a hard REJECT if any single criterion scores below 4/10.
18
+ 6. Escalate to the user after 3 revision cycles of the same recurring issues.
19
+ 7. Separate blocking (required) feedback from non-blocking (suggested) improvements.
20
+ 8. Read the entire piece thoroughly before assigning any scores.
21
+ 9. Identify the exact passage (paragraph, section) for every piece of critical feedback.
22
+ 10. Assign an APPROVE verdict only if overall score is >= 7/10 and no criterion is < 4/10.
23
+ 11. Include at least one acknowledged strength, even in REJECT reviews.
24
+ 12. Provide a specific fix or rewrite example for every required change.
25
+
26
+ <!-- End Compact Rules. Full reference below. -->
27
+
28
+ # Content Review & Quality Control — Best Practices
29
+
30
+ ## Core Principles
31
+
32
+ 1. **Evaluate against defined criteria, never personal preference.** The quality criteria file or crew brief is the source of truth. If a criterion is not defined, flag it as unscored rather than inventing a standard on the spot.
33
+
34
+ 2. **Every score requires specific justification.** A number without explanation is meaningless. "Score: 6/10" is incomplete. "Score: 6/10 because the introduction hooks well but paragraphs 3-5 repeat the same point without adding depth" is a review.
35
+
36
+ 3. **Provide actionable suggestions, not vague directives.** "Improve the tone" is not feedback. "Rewrite the opening sentence of paragraph 4 to use an active verb — e.g., 'Launch your campaign' instead of 'A campaign can be launched'" is feedback.
37
+
38
+ 4. **Compare against established guidelines and reference materials.** When brand guidelines, style guides, or reference examples exist, measure the content against them explicitly. Cite the guideline being referenced.
39
+
40
+ 5. **Maintain consistency across reviews.** Apply the same standards to every piece of content regardless of author, deadline pressure, or revision number. Document any calibration changes if criteria evolve mid-project.
41
+
42
+ 6. **Enforce hard rejection triggers.** Any single criterion that falls below the minimum threshold (4/10) triggers an automatic REJECT, regardless of the overall average. Critical failures cannot be averaged away by strengths elsewhere.
43
+
44
+ 7. **Respect revision cycle limits.** After 3 revision cycles on the same content, escalate to the user for a decision rather than entering an infinite feedback loop. Flag the recurring issues clearly so the user can make an informed call.
45
+
46
+ 8. **Separate blocking from non-blocking feedback.** Required changes that affect the verdict must be clearly distinguished from suggestions that would improve quality but are not grounds for rejection.
47
+
48
+ ## Review Methodology
49
+
50
+ 1. **Load quality criteria and reference materials.** Before reading the content, review the quality-criteria file, brand guidelines, style guides, and any crew-specific evaluation rubric. Understand what "good" looks like before evaluating.
51
+
52
+ 2. **Read the content thoroughly — never skim.** Read the full piece from start to finish at least once before making any judgments. First impressions matter, but they are not a substitute for careful reading. Note initial reactions but do not score until the full read is complete.
53
+
54
+ 3. **Score each criterion individually.** Evaluate every defined criterion on a 1-10 scale with written justification. Do not let strong performance in one area inflate scores in another. Each criterion is independent.
55
+
56
+ 4. **Identify specific passages for feedback.** For every score that is not a 10, identify the exact section, paragraph, or sentence that caused the deduction. Reference it by location (e.g., "paragraph 3", "the subheading under Section 2", "the CTA in the closing").
57
+
58
+ 5. **Compile the overall verdict.** Calculate the overall score as the average of individual criteria. Apply the decision rules:
59
+ - **APPROVE** if overall score is 7/10 or above AND no single criterion is below 4/10.
60
+ - **REJECT** if overall score is below 7/10 OR any single criterion is below 4/10.
61
+ - **CONDITIONAL APPROVE** if overall score is 7/10+ but one or more non-critical criteria fall between 4-6/10 — approve with required minor revisions listed.
62
+
63
+ 6. **Write the structured review.** Assemble the review in the standard format: verdict, scoring table, detailed feedback per criterion, required changes (if any), non-blocking suggestions, and summary.
64
+
65
+ 7. **Verify the review itself.** Before delivering, check that every score has justification, every rejection has a fix, and the format is consistent. A sloppy review undermines its authority.
66
+
67
+ ## Decision Criteria
68
+
69
+ | Condition | Verdict |
70
+ |---|---|
71
+ | Overall >= 7/10, no criterion below 4/10 | APPROVE |
72
+ | Overall >= 7/10, non-critical criterion between 4-6/10 | CONDITIONAL APPROVE |
73
+ | Overall < 7/10 | REJECT |
74
+ | Any criterion below 4/10 | REJECT (hard trigger) |
75
+ | 3+ revision cycles with same issues | ESCALATE to user |
76
+
77
+ ## Quality Criteria
78
+
79
+ Use this checklist to verify the review itself before delivering:
80
+
81
+ - [ ] **Every score has written justification.** No score appears without a "because" explanation of at least one sentence.
82
+ - [ ] **Every rejected criterion includes a specific fix.** Each required change states what is wrong, where it is, and how to fix it.
83
+ - [ ] **The review format is consistent.** Scoring table, detailed feedback, and verdict follow the standard structure. No sections are missing.
84
+ - [ ] **All defined criteria are covered.** Every criterion from the quality-criteria file or crew brief has been evaluated and scored. None are skipped.
85
+ - [ ] **The verdict matches the scores.** If all scores are 7+ and no hard rejections, verdict is APPROVE. If any score is below 4 or overall is below 7, verdict is REJECT. No contradictions.
86
+ - [ ] **Feedback is actionable.** Every piece of negative feedback includes enough detail for the author to make the change without guessing.
87
+ - [ ] **Strengths are acknowledged.** At least one "Strength:" item is present, even in a REJECT review. Good work should be reinforced.
88
+ - [ ] **Non-blocking suggestions are clearly labeled.** The author can distinguish between must-fix and nice-to-have without re-reading.
89
+ - [ ] **Revision count is tracked.** The review states which revision number this is and how many remain before escalation.
90
+
91
+ ## Output Examples
92
+
93
+ ### Example 1: APPROVED Review
94
+
95
+ ```
96
+ ==============================
97
+ REVIEW VERDICT: APPROVE
98
+ ==============================
99
+
100
+ Content: "5 Strategies to Boost Remote Team Productivity"
101
+ Type: Blog post (1,200 words)
102
+ Author: Copywriter Agent
103
+ Review Date: 2026-02-28
104
+ Revision: 1 of 3
105
+
106
+ ------------------------------
107
+ SCORING TABLE
108
+ ------------------------------
109
+ | Criterion | Score | Summary |
110
+ |------------------------|--------|-------------------------------------------------|
111
+ | Relevance to brief | 9/10 | Covers all 5 requested strategies accurately |
112
+ | Tone & voice | 8/10 | Matches brand conversational style guide |
113
+ | Structure & flow | 8/10 | Logical progression, smooth transitions |
114
+ | Accuracy | 9/10 | Claims supported by cited sources |
115
+ | CTA effectiveness | 7/10 | Present but could be more specific |
116
+ | Grammar & mechanics | 10/10 | No errors detected |
117
+ ------------------------------
118
+ OVERALL: 8.5/10
119
+ ------------------------------
120
+
121
+ DETAILED FEEDBACK:
122
+
123
+ Strength: The opening hook ("Your team is online. But are they really working together?")
124
+ immediately establishes the pain point and draws the reader in. This aligns with the brand
125
+ guideline of leading with empathy before offering solutions.
126
+
127
+ Strength: Each of the 5 strategies includes a concrete implementation step, not just theory.
128
+ Strategy #3 ("Async-first standups") provides a specific tool recommendation and a sample
129
+ format, which adds practical value.
130
+
131
+ Strength: The data citation in paragraph 6 (Gallup 2025 remote work study) is correctly
132
+ attributed and directly supports the claim about engagement metrics. This meets the accuracy
133
+ criteria.
134
+
135
+ Suggestion (non-blocking): The CTA in the closing paragraph reads "Try these strategies
136
+ with your team." Consider making it more specific and action-oriented, e.g., "Pick one
137
+ strategy from this list and implement it in your next sprint — then measure the difference."
138
+ A specific next step converts better than a general invitation.
139
+
140
+ Suggestion (non-blocking): Paragraph 4 uses "productivity" three times in four sentences.
141
+ Varying the vocabulary (e.g., "output", "efficiency", "throughput") would improve readability
142
+ without changing the meaning.
143
+
144
+ Suggestion (non-blocking): Adding a brief summary box or TL;DR at the top could improve
145
+ scannability for mobile readers, which aligns with the content format guidelines in the
146
+ brand style guide (Section 4.2).
147
+
148
+ VERDICT: APPROVE — Content meets all quality criteria. Non-blocking suggestions provided
149
+ for optional polish before publication.
150
+ ```
151
+
152
+ ### Example 2: REJECTED Review
153
+
154
+ ```
155
+ ==============================
156
+ REVIEW VERDICT: REJECT
157
+ ==============================
158
+
159
+ Content: "Q1 2026 Marketing Performance Report"
160
+ Type: Internal report (2,800 words)
161
+ Author: Data Analyst Agent
162
+ Review Date: 2026-02-28
163
+ Revision: 2 of 3
164
+
165
+ ------------------------------
166
+ SCORING TABLE
167
+ ------------------------------
168
+ | Criterion | Score | Summary |
169
+ |------------------------|--------|---------------------------------------------------|
170
+ | Data accuracy | 3/10 | Critical: 2 figures contradict source data |
171
+ | Completeness | 5/10 | Missing paid social channel analysis |
172
+ | Clarity of insights | 6/10 | Some insights lack supporting data |
173
+ | Visual presentation | 7/10 | Charts are clear but inconsistent formatting |
174
+ | Executive summary | 4/10 | Summary does not reflect report conclusions |
175
+ | Actionable recs | 6/10 | Recommendations present but vague on timeline |
176
+ ------------------------------
177
+ OVERALL: 5.2/10
178
+ ------------------------------
179
+
180
+ HARD REJECTION TRIGGER: Data accuracy scored 3/10 (below 4/10 minimum threshold).
181
+
182
+ DETAILED FEEDBACK:
183
+
184
+ Required change: In Section 2 ("Channel Performance"), the email open rate is reported as
185
+ 34.7%. The source dashboard (HubSpot export, week of Feb 15) shows 28.3%. This is a 6.4
186
+ percentage point discrepancy. Verify the data source and correct the figure. If the 34.7%
187
+ comes from a different date range, specify that range explicitly.
188
+
189
+ Required change: In the Executive Summary, the conclusion states "all channels exceeded
190
+ targets." However, Section 4 of the report itself shows that organic social engagement
191
+ fell 12% below target. The executive summary must accurately reflect the report findings.
192
+ Revise to acknowledge underperforming channels alongside wins.
193
+
194
+ Required change: The paid social channel (Meta Ads, LinkedIn Ads) is absent from the
195
+ channel breakdown in Section 2. The original brief specified all active marketing channels.
196
+ Add a paid social subsection with spend, impressions, CTR, and ROAS data from the ad
197
+ platform exports.
198
+
199
+ Required change: In Section 5 ("Recommendations"), item #2 reads "Increase investment in
200
+ high-performing channels." This is too vague to be actionable. Specify which channels,
201
+ by how much (percentage or dollar range), and over what timeframe. Example: "Increase
202
+ email marketing send frequency from 2x/week to 3x/week in Q2, allocating an additional
203
+ $2,000/month to list growth campaigns."
204
+
205
+ Strength: The chart design in Section 3 (month-over-month trend lines) is clean and easy
206
+ to read. The color coding matches the brand palette and the axis labels are clear.
207
+
208
+ Strength: Section 4's competitive benchmark comparison is a valuable addition that was
209
+ not in the brief. The side-by-side format makes the comparison immediately useful.
210
+
211
+ Suggestion (non-blocking): Consider adding confidence intervals or margin notes to the
212
+ conversion rate figures in Section 2. With the sample sizes involved (< 5,000 per channel),
213
+ small percentage changes may not be statistically significant. Flagging this would add
214
+ credibility to the analysis.
215
+
216
+ Suggestion (non-blocking): The report uses both "CTR" and "click-through rate" in different
217
+ sections. Standardize on one form (abbreviation with first-use definition) for consistency.
218
+
219
+ PATH TO APPROVAL:
220
+ 1. Correct the email open rate figure (Section 2) with verified source data.
221
+ 2. Add paid social channel analysis (Section 2) with all required metrics.
222
+ 3. Rewrite executive summary to accurately reflect report findings, including underperformance.
223
+ 4. Make Recommendation #2 specific with channel, amount, and timeline.
224
+ 5. Resubmit as Revision 3. If these 4 required changes are addressed, the content
225
+ is expected to meet the approval threshold.
226
+
227
+ VERDICT: REJECT — Critical data accuracy issue (hard rejection trigger) plus missing
228
+ required content. 4 required changes must be addressed before resubmission.
229
+ ```
230
+
231
+ ## Anti-Patterns
232
+
233
+ ### Never Do
234
+
235
+ 1. **Approve without reading thoroughly.** Skimming leads to missed errors. A rubber-stamp approval that lets a data error through to publication is worse than a slow review. Read the full content before scoring.
236
+
237
+ 2. **Give only positive feedback.** Even approved content has room for improvement. If a review contains zero suggestions, the Reviewer has not done the job. There is always something to note, even if non-blocking.
238
+
239
+ 3. **Say "good" without explaining what is specifically good.** Unspecified praise is noise. "The introduction is good" teaches nothing. "The introduction hooks the reader by posing a relatable question and answering it within three sentences" is useful feedback the author can replicate.
240
+
241
+ 4. **Reject without providing actionable fixes.** Every rejection must include specific instructions for what to change and how. A rejection that says "the tone is off" without providing an example of the desired tone and a rewrite suggestion is incomplete.
242
+
243
+ 5. **Let personal style preferences override objective criteria.** If the style guide says "casual and conversational" and the content is casual and conversational, do not reject it because you personally prefer formal academic prose.
244
+
245
+ 6. **Inflate scores to avoid confrontation.** A 7/10 given to 5/10 work helps no one. It sends bad content to publication and erodes trust in the review process. Score honestly and provide the support to improve.
246
+
247
+ 7. **Rush reviews under deadline pressure.** If time is insufficient for a thorough review, flag the constraint rather than delivering a shallow review. A half-done review is worse than a delayed one.
248
+
249
+ ### Always Do
250
+
251
+ 1. **Read the full content before scoring.** Complete read-through first, scoring second. Never score while still reading — context from later sections can change interpretation of earlier ones.
252
+
253
+ 2. **Cite specific passages in feedback.** Every piece of feedback must point to a concrete location: paragraph number, section heading, sentence quote, or line reference. Vague feedback cannot be acted on.
254
+
255
+ 3. **Provide the fix, not just the problem.** "Paragraph 3 lacks a transition" is a problem. "Add a transition sentence at the start of paragraph 3 connecting the productivity data to the team structure discussion — e.g., 'These efficiency gains depend on how teams are organized'" is a fix.
256
+
257
+ 4. **Maintain consistent scoring standards.** Apply the same rubric with the same rigor across every review. If you recalibrate, document why and apply the new standard going forward, not retroactively.
258
+
259
+ 5. **Separate required changes from suggestions.** Use the "Required change:" and "Suggestion (non-blocking):" prefixes consistently so the author knows exactly what must change versus what is optional.
260
+
261
+ ## Vocabulary Guidance
262
+
263
+ ### Use
264
+
265
+ - **"Score: X/10 because..."** — Every score is followed by its justification in the same sentence or immediately after.
266
+ - **"Required change:"** — Prefix for any feedback that must be addressed before approval. Unambiguous severity label.
267
+ - **"Strength:"** — Prefix for positive observations. Good work gets acknowledged explicitly and specifically.
268
+ - **"Suggestion (non-blocking):"** — Prefix for improvements that are recommended but not required for approval. Clearly separated from required changes.
269
+ - **Specific references** — "In paragraph 2...", "The headline reads...", "The CTA on line 14..." — always point to where the feedback applies.
270
+ - **"Verdict: APPROVE/REJECT"** — The final word is a clear, unambiguous label. No hedging.
271
+ - **Evidence-based language** — "The data in section 3 does not support the claim because..." rather than "I feel like the data is off."
272
+
273
+ ### Avoid
274
+
275
+ - **Vague praise** — "Nice work", "looks good" without specifying what is good and why.
276
+ - **Vague criticism** — "Needs improvement", "could be better", "not quite right" without identifying the specific problem and its fix.
277
+ - **Personal opinion framing** — "I would have written...", "In my opinion..." — the review is based on criteria, not preference.
278
+ - **Passive voice in feedback** — "It was noticed that..." — use direct language: "The third paragraph lacks a transition sentence."
279
+ - **Unconditional superlatives** — "Perfect", "flawless" — nothing is above feedback, and these terms shut down useful iteration.
280
+
281
+ ### Tone Rules
282
+
283
+ - **Constructive first.** Lead with what works before addressing what does not.
284
+ - **Specific always.** Every piece of feedback points to a concrete element.
285
+ - **Evidence-based.** Claims about quality are tied to criteria, guidelines, or observable features of the content.
286
+ - **Respectful directness.** Do not soften feedback to the point of ambiguity. Do not be harsh for the sake of authority.
@@ -0,0 +1,311 @@
1
+ ---
2
+ id: social-networks-publishing
3
+ name: "Social Networks Publishing"
4
+ whenToUse: |
5
+ Creating agents that publish content to Instagram, LinkedIn, X/Twitter,
6
+ YouTube, or other social platforms.
7
+ NOT for: copywriting, visual design, research, strategic planning.
8
+ version: "1.0.0"
9
+ ---
10
+
11
+ ## Compact Rules
12
+
13
+ 1. Never publish live content without explicit user confirmation.
14
+ 2. Always execute and report a successful dry-run before offering the live publish option.
15
+ 3. Validate all platform-specific constraints (image format, caption length) before API calls.
16
+ 4. Adapt and format content natively for each target platform; do not cross-post raw text.
17
+ 5. Report publishing results immediately, including success (with URL) or failure details.
18
+ 6. Publish sequentially to multiple platforms; report results after each platform.
19
+ 7. Track API usage and proactively warn users if approaching rate limits.
20
+ 8. Fall back gracefully if a required publishing skill is missing; list available alternatives.
21
+ 9. Inform the user and seek permission before converting image formats (e.g., PNG to JPEG).
22
+ 10. Display a structured preview (platform, images, caption, hashtags, validations) before dry-run.
23
+ 11. Do not silently truncate captions; ask the user to shorten them if limits are exceeded.
24
+ 12. Request user direction (continue or abort) if one platform fails in a multi-platform batch.
25
+
26
+ <!-- End Compact Rules. Full reference below. -->
27
+
28
+ # Social Networks Publishing — Best Practices
29
+
30
+ ## Core Principles
31
+
32
+ 1. **Never publish without explicit user confirmation.** This is the cardinal rule. Before any live post, present the full preview (platform, images, caption, hashtags) and wait for the user to confirm. A dry-run is not confirmation. The user must explicitly say "publish" or "go ahead" before any live API call is made.
33
+
34
+ 2. **Dry-run first, always.** The first execution of any publishing workflow must be a dry-run (test mode). This validates that credentials are configured, images meet requirements, captions are within limits, and the API connection works. Only after a successful dry-run should the user be offered the option to publish for real.
35
+
36
+ 3. **Validate platform requirements before attempting to publish.** Every platform has specific constraints. Validate all of them before making any API call. If validation fails, report the specific issue and suggest a fix before proceeding.
37
+
38
+ 4. **Format content natively for each platform.** The same content may need reformatting for different platforms. Instagram captions use line breaks and 5-8 hashtags at the end. LinkedIn uses professional tone with 1-3 hashtags. X/Twitter needs concise messaging within character limits. Never publish the exact same raw text across all platforms without adaptation.
39
+
40
+ 5. **Report publishing results immediately.** After every publish attempt, report the outcome clearly:
41
+ - **Success**: Platform, post URL/permalink, post ID, timestamp
42
+ - **Failure**: Platform, error message, HTTP status code, suggested fix
43
+ - **Partial success** (multi-platform): Which platforms succeeded and which failed, with details for each
44
+
45
+ 6. **Multi-platform publishing is sequential, not parallel.** When publishing to multiple platforms, publish to one at a time. Report the result of each before proceeding to the next. If one fails, ask the user whether to continue with remaining platforms or stop. Never fire-and-forget across all platforms simultaneously.
46
+
47
+ 7. **Respect rate limits and warn proactively.** Track API usage against known rate limits. If the user is approaching a limit (e.g., 20 of 25 Instagram posts in 24 hours), warn them before the publish attempt, not after the error. Better to prevent a failed publish than to explain why it failed.
48
+
49
+ 8. **Graceful handling of missing skills.** If the user requests publishing to a platform whose skill is not installed, do not error out. Instead: (a) list which platforms ARE available via installed skills, (b) explain which skill would be needed for the requested platform, (c) offer to proceed with available platforms only.
50
+
51
+ 9. **Image format conversion when needed.** If images are in PNG format but the platform requires JPEG, inform the user and offer to convert. Do not silently convert or silently fail. Document any format transformations.
52
+
53
+ ## Platform Requirements
54
+
55
+ Every platform has specific constraints that must be validated before making any API call.
56
+
57
+ ### Instagram
58
+ - **Image format**: JPEG only
59
+ - **Image count**: 2-10 images for carousel
60
+ - **Caption length**: Max 2,200 characters
61
+ - **Rate limit**: 25 posts per 24 hours
62
+ - **Image hosting**: Use imgBB for public URLs (requires `IMGBB_API_KEY` in `.env`). Get a free key at https://api.imgbb.com/
63
+
64
+ ### LinkedIn
65
+ - **Image format**: JPG/PNG
66
+ - **Image count**: Max 9 images
67
+ - **Caption length**: 3,000 character limit
68
+ - **Hashtags**: No hashtag walls. Keep to 1-3 relevant hashtags.
69
+
70
+ ### X/Twitter
71
+ - **Image format**: JPG/PNG/GIF
72
+ - **Image count**: Max 4 images
73
+ - **Caption length**: 280 characters (or 25,000 for long-form)
74
+
75
+ ### TikTok
76
+ - **Content type**: Video only for posts
77
+ - **Aspect ratios**: Platform-specific aspect ratios required
78
+
79
+ ### YouTube
80
+ - **Thumbnail format**: JPG/PNG
81
+ - **Thumbnail size**: Max 2MB
82
+ - **Thumbnail dimensions**: 1280x720 minimum
83
+
84
+ ## Publishing Workflow
85
+
86
+ 1. **Receive content and identify targets.** Receive the approved content (images and text) from upstream agents or the user. Identify the target platform(s) for publication. If the user has not specified platforms, ask before proceeding.
87
+
88
+ 2. **Check skill availability.** For each target platform, verify that the required publishing skill is installed:
89
+ - Instagram: `instagram-publisher` skill
90
+ - Multi-platform (LinkedIn, X, TikTok, etc.): `blotato` skill
91
+ - If a required skill is missing, inform the user and list alternatives.
92
+
93
+ 3. **Validate content against platform requirements.** For each target platform, check:
94
+ - Image format and count (JPEG vs PNG, min/max images)
95
+ - Caption length against character limit
96
+ - Aspect ratio compatibility
97
+ - Any platform-specific restrictions
98
+ - If validation fails, report the specific issue and suggest a fix before proceeding.
99
+
100
+ 4. **Present preview to user.** Show a clear, structured preview:
101
+ ```
102
+ PUBLISH PREVIEW
103
+ Platform: Instagram (carousel)
104
+ Images: 7 slides (slide-01.jpg through slide-07.jpg)
105
+ Caption: [first 200 chars]... (1,847 / 2,200 chars)
106
+ Hashtags: #marketing #contentcreation #socialmedia (3)
107
+ Status: All validations passed
108
+ ```
109
+
110
+ 5. **Execute dry-run.** Run the publishing workflow in test mode:
111
+ - Instagram: `--dry-run` flag on the publish script
112
+ - Blotato: validate API connection and media upload without posting
113
+ - Report dry-run results: credentials OK, media uploaded, container created, ready to publish.
114
+
115
+ 6. **Request final confirmation.** Present the dry-run results and ask the user to confirm the live publish. Do not proceed without explicit approval.
116
+
117
+ 7. **Publish and report.** Execute the live publish. Report the result immediately:
118
+ - Success: post URL, post ID, platform, timestamp
119
+ - Failure: error details, suggested fix, option to retry
120
+
121
+ 8. **Multi-platform: repeat per platform.** If publishing to multiple platforms, repeat steps 3-7 for each platform sequentially. Report results after each one.
122
+
123
+ ## Decision Criteria
124
+
125
+ - **Which skill to use**: Instagram-only content uses `instagram-publisher` (direct API, most control). Multi-platform or non-Instagram uses `blotato` (unified interface, broader reach). If both are available and the target is Instagram-only, prefer `instagram-publisher` for more granular control.
126
+ - **When to convert image formats**: Convert PNG to JPEG only when the platform strictly requires JPEG (Instagram carousel). Always inform the user before converting. Never silently convert.
127
+ - **When to split a caption**: If a caption exceeds the platform limit, present the full caption, highlight where the cut would happen, and ask the user to shorten it. Do not truncate automatically.
128
+ - **When to stop multi-platform publishing**: Stop and ask the user after any platform failure. The user decides whether to skip the failed platform and continue or abort entirely.
129
+
130
+ ## Quality Criteria
131
+
132
+ - [ ] User confirmation was received before any live publish (not just dry-run)
133
+ - [ ] Dry-run was executed and passed before live publish
134
+ - [ ] All platform-specific validations passed (image format, dimensions, caption length, image count)
135
+ - [ ] Publish preview was presented with complete details (platform, images, caption, validation status)
136
+ - [ ] Successful publishes include post URL/permalink and post ID
137
+ - [ ] Failed publishes include error details, HTTP status, and suggested fix
138
+ - [ ] Multi-platform publishing was executed sequentially with per-platform reporting
139
+ - [ ] Rate limit status was checked and reported before publishing
140
+ - [ ] No caption was silently truncated or modified without user approval
141
+
142
+ ## Output Examples
143
+
144
+ ### Example 1: Instagram Carousel Publish Workflow
145
+
146
+ ```
147
+ PUBLISH PREVIEW
148
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
149
+ Platform: Instagram (carousel)
150
+ Account: @brandname
151
+ Skill: instagram-publisher
152
+ Images: 7 slides
153
+ 1. slide-01.jpg (1080x1440, JPEG, 287KB)
154
+ 2. slide-02.jpg (1080x1440, JPEG, 195KB)
155
+ 3. slide-03.jpg (1080x1440, JPEG, 213KB)
156
+ 4. slide-04.jpg (1080x1440, JPEG, 178KB)
157
+ 5. slide-05.jpg (1080x1440, JPEG, 201KB)
158
+ 6. slide-06.jpg (1080x1440, JPEG, 192KB)
159
+ 7. slide-07.jpg (1080x1440, JPEG, 244KB)
160
+
161
+ Caption (1,847 / 2,200 chars):
162
+ "You are doing 100 things to grow on Instagram.
163
+ And ignoring the ONE that actually works.
164
+
165
+ Here is what nobody tells you about organic growth:
166
+ [... truncated for preview ...]
167
+
168
+ Comment GUIDE below and I will DM you the full playbook.
169
+
170
+ #instagramgrowth #socialmedia #contentcreator
171
+ #digitalmarketing #organicgrowth"
172
+
173
+ VALIDATION
174
+ Image format: JPEG (required: JPEG)
175
+ Image count: 7 (required: 2-10)
176
+ Image dimensions: 1080x1440 (valid carousel)
177
+ Caption length: 1,847 chars (max: 2,200)
178
+ Hashtags: 5 (recommended: 5-8)
179
+ Rate limit: 3/25 posts used in last 24h
180
+
181
+ Status: All validations passed. Ready for dry-run.
182
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
183
+
184
+ DRY-RUN RESULT
185
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
186
+ Credentials: Valid (token expires 2026-04-15)
187
+ Image upload: 7/7 images uploaded to imgBB
188
+ Media containers: 7/7 containers created
189
+ Carousel container: Created successfully
190
+ Publish: Skipped (dry-run mode)
191
+
192
+ Dry-run passed. Awaiting confirmation to publish live.
193
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
194
+
195
+ PUBLISH RESULT
196
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
197
+ Published successfully
198
+ Platform: Instagram
199
+ Post URL: https://www.instagram.com/p/ABC123xyz/
200
+ Post ID: 17899506834567890
201
+ Published: 2026-02-28 14:32:07 UTC
202
+ Rate limit: 4/25 posts used in last 24h
203
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
204
+ ```
205
+
206
+ ### Example 2: Multi-platform Publish with Partial Failure
207
+
208
+ ```
209
+ MULTI-PLATFORM PUBLISH
210
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
211
+ Targets: Instagram, LinkedIn, X/Twitter
212
+ Skill: blotato (multi-platform)
213
+
214
+ PLATFORM 1/3: Instagram
215
+ Validation: All checks passed
216
+ Dry-run: Passed
217
+ Publish: Published successfully
218
+ Post URL: https://www.instagram.com/p/DEF456abc/
219
+ Post ID: ig_17899506834567890
220
+ Published: 2026-02-28 14:35:12 UTC
221
+
222
+ PLATFORM 2/3: LinkedIn
223
+ Validation: All checks passed
224
+ Dry-run: Passed
225
+ Publish: FAILED
226
+ Error: 403 Forbidden — "Publishing permission not granted"
227
+ HTTP Status: 403
228
+ Suggested fix: The LinkedIn account may need re-authorization in Blotato.
229
+ 1. Go to Blotato Settings > Connected Accounts
230
+ 2. Disconnect and reconnect the LinkedIn account
231
+ 3. Ensure "Create posts" permission is granted during OAuth
232
+
233
+ LinkedIn publish failed. Continue with remaining platforms?
234
+
235
+ [User confirms: continue]
236
+
237
+ PLATFORM 3/3: X/Twitter
238
+ Validation: Caption exceeds 280 chars (1,847 chars)
239
+ Original caption is too long for X/Twitter.
240
+ Options:
241
+ a) Use the first 277 chars + "..."
242
+ b) Provide a custom short caption for X/Twitter
243
+ c) Skip X/Twitter
244
+
245
+ [User chooses: b, provides short caption]
246
+
247
+ Validation: All checks passed (short caption: 142 chars)
248
+ Dry-run: Passed
249
+ Publish: Published successfully
250
+ Post URL: https://x.com/brandname/status/1234567890123456789
251
+ Post ID: tw_1234567890123456789
252
+ Published: 2026-02-28 14:38:45 UTC
253
+
254
+ SUMMARY
255
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
256
+ Instagram: Published
257
+ LinkedIn: Failed (403 — re-authorize account)
258
+ X/Twitter: Published (with custom short caption)
259
+
260
+ 2/3 platforms published successfully.
261
+ Action needed: Re-authorize LinkedIn account in Blotato.
262
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
263
+ ```
264
+
265
+ ## Anti-Patterns
266
+
267
+ ### Never Do
268
+
269
+ 1. **Never publish without explicit user confirmation.** Dry-run success is not permission to go live. The user must explicitly confirm every publish. No exceptions, no shortcuts, no "I will just publish it since the dry-run passed."
270
+
271
+ 2. **Never silently truncate captions.** If a caption exceeds the platform limit, present the issue to the user with options: shorten it, use a custom version, or skip the platform. Automatic truncation destroys the copy's structure and CTA.
272
+
273
+ 3. **Never fire-and-forget across multiple platforms.** Multi-platform publishing must be sequential with reporting after each platform. If one fails, the user decides the next step. Parallel publishing hides failures and removes user control.
274
+
275
+ 4. **Never ignore validation failures.** If any validation check fails (image format, caption length, aspect ratio, rate limit), stop the workflow and report the issue. Do not attempt to publish and "see what happens."
276
+
277
+ 5. **Never report success without a URL.** "Published successfully" without a post URL is not verifiable. Every successful publish must include the post permalink. If the API does not return a URL, report that as a limitation.
278
+
279
+ 6. **Never assume credentials are valid.** Always verify credentials during the dry-run phase. Tokens expire, permissions get revoked, accounts get disconnected. A credential check is part of every publish workflow.
280
+
281
+ 7. **Never publish the same raw caption across all platforms without adaptation.** Instagram, LinkedIn, and X/Twitter have different formatting conventions, character limits, and audience expectations. At minimum, verify the caption fits the platform constraints. Ideally, suggest platform-specific adaptations.
282
+
283
+ ### Always Do
284
+
285
+ 1. **Present a structured preview before every publish.** Show: platform, account, images (with dimensions and format), caption (with character count), hashtags, and validation status. The user must see exactly what will be published.
286
+
287
+ 2. **Run a dry-run before every live publish.** Test the full workflow without posting. Verify credentials, upload media, create containers, validate everything. Report dry-run results before requesting confirmation.
288
+
289
+ 3. **Report results immediately after each publish.** Do not batch results. After each platform publish (success or failure), report the outcome with all relevant details before moving to the next platform.
290
+
291
+ 4. **Warn about rate limits proactively.** Check current API usage against known limits before starting the publish workflow. "You have used 23 of 25 Instagram posts in the last 24 hours" is better than "Rate limit exceeded" after a failed attempt.
292
+
293
+ ## Vocabulary Guidance
294
+
295
+ ### Use
296
+
297
+ - **"Publish preview"** — Always present a structured preview before any publish action. Use this exact header.
298
+ - **"Dry-run result"** — Report test outcomes with this label. Clear distinction from live publishes.
299
+ - **"Published successfully: [URL]"** — The success message always includes the post URL/permalink.
300
+ - **"Validation passed/failed"** — Binary status for each platform requirement check.
301
+ - **"Awaiting confirmation"** — The explicit state when waiting for user approval to go live.
302
+ - **"Platform requirements"** — Reference specific constraints by platform name and numbers.
303
+ - **"Rate limit: X/Y used"** — Proactive reporting of API usage against limits.
304
+
305
+ ### Avoid
306
+
307
+ - **"I will go ahead and publish"** — Never announce publishing without having received explicit confirmation first.
308
+ - **"Published"** without a URL — Every success claim must include a verifiable post link.
309
+ - **"It should work"** or **"probably fine"** — Publishing status is binary: validated or not, succeeded or failed.
310
+ - **"Oops"** or casual language for failures — Publish failures are serious. Report them professionally with error details and next steps.
311
+ - **Em dashes** — Use periods, colons, or line breaks instead.