Skip to content

jianshuo/claude-skills / wjs-x-increasing-follower

wjs-x-increasing-follower

Verified

Use when 王建硕 wants to systematically grow his X (Twitter) followers by running numbered, A/B-testable growth experiments and tracking which ones actually work. Every action gets a number, a hypothesis, a target metric, a before-state (for rollback), and a verdict. The North-Star metric is the new-follower ÷ profile-visit ratio (conversion) — every profile change is judged against it. Daily it ingests the X Analytics CSV export, scores each running experiment, and recommends keep / rollback. Triggers — "涨粉", "增加 X 粉丝", "X 涨粉实验", "follower growth", "A/B test my profile", "今天的涨粉检查", "/wjs-x-increasing-follower".

FileKindSize
SKILL.mdskill md8.3 KB
inbox/.gitignoreother12 B
scripts/_common.pyexecutablescript1.8 KB
scripts/daily-check.shexecutablescript1.1 KB
scripts/evaluate.pyexecutablescript6.6 KB
scripts/ingest-csv.pyexecutablescript4.7 KB
scripts/ledger.pyexecutablescript5.3 KB
scripts/scoreboard.pyexecutablescript4.7 KB
state/.gitignoreother6 B
state/SCOREBOARD.mdmarkdown1.9 KB
state/actions.jsonlother3.0 KB
state/daily.jsonlother45.0 KB

scripts/_common.py

View on GitHub
"""Shared helpers for wjs-x-increasing-follower scripts. stdlib only."""
import json
from datetime import date, datetime, timedelta
from pathlib import Path
from statistics import median

SKILL_DIR = Path(__file__).resolve().parent.parent
STATE = SKILL_DIR / "state"
DAILY = STATE / "daily.jsonl"
ACTIONS = STATE / "actions.jsonl"
SCOREBOARD = STATE / "SCOREBOARD.md"

# action.metric -> daily field
METRIC_FIELD = {
    "ratio": "ratio",
    "visits": "profile_visits",
    "impressions": "impressions",
    "follows": "new_follows",
}
METRIC_LABEL = {
    "ratio": "follows÷visits",
    "visits": "profile visits",
    "impressions": "impressions",
    "follows": "new follows",
}


def read_jsonl(path: Path):
    if not path.exists():
        return []
    rows = []
    for line in path.read_text().splitlines():
        line = line.strip()
        if line:
            rows.append(json.loads(line))
    return rows


def write_jsonl(path: Path, rows):
    path.parent.mkdir(parents=True, exist_ok=True)
    path.write_text("".join(json.dumps(r, ensure_ascii=False) + "\n" for r in rows))


def load_daily():
    """date(str) -> row, sorted by date."""
    rows = {r["date"]: r for r in read_jsonl(DAILY)}
    return [rows[d] for d in sorted(rows)]


def load_actions():
    return read_jsonl(ACTIONS)


def parse_date(s):
    return datetime.strptime(s, "%Y-%m-%d").date()


def daterange_values(daily, field, start: date, end: date):
    """median-ready list of `field` over [start, end] inclusive, skipping None."""
    out = []
    for r in daily:
        d = parse_date(r["date"])
        if start <= d <= end:
            v = r.get(field)
            if v is not None:
                out.append(v)
    return out


def med(vals):
    return round(median(vals), 4) if vals else None


def today_str():
    return date.today().isoformat()
finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the workStars: 323kUpdated Claude CodeCodexVerifiedInstall
systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixesStars: 323kUpdated Claude CodeCodexVerifiedInstall
test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation codeStars: 323kUpdated Claude CodeCodexVerifiedInstall
skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.Stars: 198kUpdated Claude CodeCodexVerifiedInstall