Harmix/open-stanley / open-stanley/skills/stanley
stanley
VerifiedYour head of content. Use this whenever the user wants help with LinkedIn or X (Twitter) — writing or scheduling a post, finding things to comment on, turning a meeting, voice note, or Slack thread into a post, reviewing why a post did or didn't work, planning the week's content, or asking "what should I post". Also use it for anything that mentions Stanley, ghostwriting, personal brand, founder-led content, building in public, or growing followers, even if the user doesn't say "post". Start here; it routes to the other open-stanley skills and holds the operating rules they all share.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 14.2 KB |
| references/capabilities.md | markdown | 3.3 KB |
| references/platform-access.md | markdown | 4.0 KB |
| references/recommended-mcps.md | markdown | 5.5 KB |
| references/recommended.mcp.json | config | 2.0 KB |
| references/research-linkedin-2026.md | markdown | 6.7 KB |
| references/scheduling.md | markdown | 8.6 KB |
| references/vault-backends.md | markdown | 6.8 KB |
| references/verify-live.md | markdown | 2.2 KB |
| references/why-these-rules.md | markdown | 2.1 KB |
| scripts/stanley-auditexecutable | script | 24.6 KB |
| scripts/stanley-briefexecutable | script | 6.4 KB |
| scripts/stanley-chartexecutable | script | 14.5 KB |
| scripts/stanley-previewexecutable | script | 5.8 KB |
| scripts/stanley-statsexecutable | script | 14.9 KB |
| scripts/stanley-trace | other | 6.3 KB |
| scripts/stanley-vaultexecutable | script | 35.1 KB |
scripts/stanley-preview
View on GitHub#!/usr/bin/env python3
"""stanley-preview: render a post draft as a LinkedIn or X preview card (PNG).
This is the "Edit this draft" card the paid product sends: the post as it will
look in the feed, with the fold marked, so the human reviews the real thing.
Usage:
stanley-preview DRAFT.md --platform linkedin|x --out preview.png
[--name "Nazar Ponochevnyi"] [--headline "Founder & CEO at Harmix"]
[--handle nazar_198] [--avatar path.jpg] [--dark]
Needs Playwright (python) with Chromium. Falls back to writing the HTML next to
--out (preview.html) if Playwright is unavailable, so a browser tool can render it.
"""
import argparse, base64, html, re, sys
from pathlib import Path
CSS = """
*{box-sizing:border-box} body{margin:0;background:#f3f2ef;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif}
.card{width:640px;margin:32px auto;background:#fff;border-radius:12px;box-shadow:0 1px 3px rgba(0,0,0,.15);padding:16px 20px;color:#1a1a1a}
.hd{display:flex;gap:12px;align-items:center;margin-bottom:12px}
.av{width:48px;height:48px;border-radius:50%;background:#ccc;object-fit:cover}
.nm{font-weight:600;font-size:15px}.sub{color:#666;font-size:12px}
.body{font-size:15px;line-height:1.45;white-space:pre-wrap;word-wrap:break-word}
.fold{border-top:1px dashed #d33;color:#d33;font-size:11px;padding-top:4px;margin:10px 0 6px}
.ft{display:flex;justify-content:space-between;color:#666;font-size:12px;margin-top:14px;border-top:1px solid #eee;padding-top:10px}
.x body{background:#000}.x .card{background:#000;color:#e7e9ea;border:1px solid #2f3336;box-shadow:none}.x .nm{color:#e7e9ea}.x .sub{color:#71767b}.x .ft{color:#71767b;border-top-color:#2f3336}
.x .tweet{border-bottom:1px solid #2f3336;padding:10px 0}.x .tweet:last-child{border:none}
.badge{position:absolute;top:8px;right:16px;font-size:11px;color:#999}
"""
def esc(t): return html.escape(t)
def linkedin_html(text, name, headline, avatar, chars):
fold_at = 210 # desktop shows ~210 chars / 3 lines before "...more"; phones cut at ~140 on long words. Both are estimates.
first = text[:fold_at]; rest = text[fold_at:]
body = esc(first) + ('<div class="fold">— fold: "…more" appears about here (%d chars shown) —</div>' % fold_at if rest else "") + esc(rest)
return f"""<div class="card"><div class="hd"><img class="av" src="{avatar}"><div><div class="nm">{esc(name)}</div><div class="sub">{esc(headline)}</div><div class="sub">Now · 🌐</div></div></div>
<div class="body">{body}</div><div class="ft"><span>👍 ❤️ 💡</span><span>{chars} characters</span></div></div>"""
def x_html(text, name, handle, avatar):
tweets = [t.strip() for t in re.split(r"\n\s*---+\s*\n", text) if t.strip()]
parts = []
for i, t in enumerate(tweets):
over = len(t) > 280
parts.append(f'<div class="tweet"><div class="hd"><img class="av" src="{avatar}"><div><div class="nm">{esc(name)} <span class="sub">@{esc(handle)} · now</span></div></div></div>'
f'<div class="body">{esc(t)}</div><div class="ft"><span>💬 🔁 ♡ 📊</span><span style="color:{"#d33" if over else "inherit"}">{len(t)}/280{" — over" if over else ""}</span></div></div>')
return '<div class="card">' + "".join(parts) + "</div>"
def build(text, platform, name, headline, handle, avatar_path):
if avatar_path and Path(avatar_path).exists():
b = base64.b64encode(Path(avatar_path).read_bytes()).decode()
avatar = f"data:image/jpeg;base64,{b}"
else:
avatar = "data:image/svg+xml;base64," + base64.b64encode(b'<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48"><circle cx="24" cy="24" r="24" fill="#c9c9c9"/></svg>').decode()
inner = linkedin_html(text, name, headline, avatar, len(text)) if platform == "linkedin" else x_html(text, name, handle, avatar)
return f"<!doctype html><html class='{platform}'><head><meta charset='utf-8'><style>{CSS}</style></head><body>{inner}</body></html>"
def strip_png_metadata(path):
"""Cloud sandboxes stamp rendered PNGs with a C2PA manifest (caBX chunk) that LinkedIn shows as a "Content credentials" label. Drop it and the text chunks."""
import struct
d = Path(path).read_bytes()
if d[:8] != b"\x89PNG\r\n\x1a\n": return
out = bytearray(d[:8]); i = 8
while i + 8 <= len(d):
n = struct.unpack(">I", d[i:i+4])[0]; t = d[i+4:i+8]
if t not in (b"caBX", b"tEXt", b"iTXt", b"zTXt", b"eXIf"): out += d[i:i+12+n]
i += 12 + n
Path(path).write_bytes(bytes(out))
def main():
ap = argparse.ArgumentParser()
ap.add_argument("draft"); ap.add_argument("--platform", default="linkedin", choices=["linkedin", "x"])
ap.add_argument("--out", default="preview.png"); ap.add_argument("--name", default="Your Name")
ap.add_argument("--headline", default="Your headline"); ap.add_argument("--handle", default="handle"); ap.add_argument("--avatar")
a = ap.parse_args()
text = Path(a.draft).read_text(encoding="utf-8") if a.draft != "-" else sys.stdin.read()
page = build(text.strip(), a.platform, a.name, a.headline, a.handle, a.avatar)
out = Path(a.out); html_path = out.with_suffix(".html"); html_path.write_text(page, encoding="utf-8")
try:
from playwright.sync_api import sync_playwright
with sync_playwright() as p:
b = p.chromium.launch(); pg = b.new_page(viewport={"width": 704, "height": 400}, device_scale_factor=2)
pg.set_content(page); pg.locator(".card").screenshot(path=str(out)); b.close()
strip_png_metadata(out)
print(out)
except Exception as e:
print(f"{html_path} (Playwright unavailable on this machine: {type(e).__name__}. The HTML is the preview; render it to PNG where Chromium exists: the cloud container in a Cowork session, or `pip install playwright && playwright install chromium` here.)")
if __name__ == "__main__":
main()
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |