LeoYeAI/agent-master-skills / skills/anygen-storybook-generator
anygen-storybook
VerifiedUse this skill any time the user wants to create visual stories, illustrated narratives, or storybook content. This includes: storybooks, comics, children's books, illustrated guides, step-by-step visual tutorials, brand stories, product stories, picture books, graphic novels, and visual explainers. Also trigger when: user says 做个绘本, 画个故事, 做个漫画, 做个图文教程, 做个品牌故事. If a visual story or illustrated content needs to be created, use this skill.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 16.8 KB |
| _meta.json | config | 658 B |
| scripts/anygen.py | script | 35.8 KB |
| scripts/auth.py | script | 1000 B |
| scripts/fileutil.py | script | 2.1 KB |
| skill.md | markdown | 8.3 KB |
scripts/fileutil.py
View on GitHub"""File I/O utilities for AnyGen — validation, encoding, read/write helpers."""
import base64
import json
from pathlib import Path
def validate_file(file_path):
"""Validate file path before upload. Returns (Path, error_msg)."""
path = Path(file_path).expanduser().resolve()
if not path.exists():
return None, f"File not found: {file_path}"
if not path.is_file():
return None, f"Not a regular file: {file_path}"
return path, None
def read_file_bytes(file_path):
"""Validate and read file contents. Returns (filename, bytes, size) or raises ValueError."""
path, err = validate_file(file_path)
if err:
raise ValueError(err)
with open(path, "rb") as f:
content = f.read()
return path.name, content, len(content)
def encode_file(file_path):
"""Encode file to base64 for legacy upload."""
path, err = validate_file(file_path)
if err:
raise ValueError(err)
with open(path, "rb") as f:
content = f.read()
suffix = path.suffix.lower()
mime_types = {
".pdf": "application/pdf",
".png": "image/png",
".jpg": "image/jpeg",
".jpeg": "image/jpeg",
".gif": "image/gif",
".txt": "text/plain",
".doc": "application/msword",
".docx": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
".ppt": "application/vnd.ms-powerpoint",
".pptx": "application/vnd.openxmlformats-officedocument.presentationml.presentation",
}
mime_type = mime_types.get(suffix, "application/octet-stream")
return {
"file_name": path.name,
"file_type": mime_type,
"file_data": base64.b64encode(content).decode("utf-8"),
}
def read_json(file_path):
"""Read and parse a JSON file."""
with open(file_path, "r") as f:
return json.load(f)
def write_json(file_path, data):
"""Write data to a JSON file."""
with open(file_path, "w") as f:
json.dump(data, f, indent=2, ensure_ascii=False)
def write_bytes(file_path, content):
"""Write binary content to a file."""
with open(file_path, "wb") as f:
f.write(content)
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: 472k | Updated | Claude CodeCodex | Unverified | 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 |