Skip to content

Cassiiopeia/projectops / skills/pro-image

pro-image

Verified

Make image assets (backgrounds, characters, icons, illustrations, items) that fit the project's own style: you write the prompt from a per-repo harness, Codex or Antigravity draws it, the CLI fixes size and transparency. Use for 'make an image', 'draw', 'generate an icon'.

scripts/pro_image/history.py

View on GitHub
"""Generation history: one line per entry in harness history.jsonl (prompt, references, result, approval) > basis for the next request"""
from __future__ import annotations

import json
import time
from pathlib import Path

# Record status: approved user approved and used in the app, rejected user rejected, candidate generated only
STATUSES = ("approved", "rejected", "candidate")
# Prompt storage limit (characters)
PROMPT_KEEP_CHARACTERS = 6000


def append(history_path: Path, entry: dict) -> dict:
    record = {"time": time.strftime("%Y-%m-%dT%H:%M:%S"), **entry}
    if isinstance(record.get("prompt"), str):
        record["prompt"] = record["prompt"][:PROMPT_KEEP_CHARACTERS]
    history_path.parent.mkdir(parents=True, exist_ok=True)
    with history_path.open("a", encoding="utf-8") as handle:
        handle.write(json.dumps(record, ensure_ascii=False) + "\n")
    return record


def read(history_path: Path, kind: str | None, status: str | None, limit: int) -> list[dict]:
    """Recent entries > filtered by kind and status, newest first, limit entries"""
    if not history_path.is_file():
        return []
    rows = []
    for line in history_path.read_text(encoding="utf-8").splitlines():
        try:
            row = json.loads(line)
        except ValueError:
            continue
        if (kind and row.get("kind") != kind) or (status and row.get("status") != status):
            continue
        rows.append(row)
    return list(reversed(rows))[:limit]
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: 471kUpdated Claude CodeCodexVerifiedInstall
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: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
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 availableStars: 322kUpdated Claude CodeCodexVerifiedInstall