AgriciDaniel/claude-blog / skills/blog-audio
blog-audio
VerifiedPaid Gemini TTS audio for a finished blog post: summary, full read-aloud, or two-speaker dialogue, with an MP3 and an HTML5 embed. Asks for explicit consent before the first paid call. Runs only on an explicit request: /blog audio, "generate audio for this blog post", "narrate this blog post", "audio version of this post", or "podcast version of this post". Not for general speech or dictation questions.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 13.9 KB |
| references/models.md | markdown | 1.4 KB |
| references/voices.md | markdown | 6.4 KB |
| scripts/__init__.py | script | 62 B |
| scripts/generate_audio.py | script | 32.8 KB |
| scripts/requirements.lock | other | 51.3 KB |
| scripts/requirements.txt | manifest | 499 B |
| scripts/run.py | script | 3.6 KB |
| scripts/runtime_paths.py | script | 2.6 KB |
| scripts/setup_environment.py | script | 6.1 KB |
scripts/run.py
View on GitHub#!/usr/bin/env python3
"""
Universal runner for Blog Audio skill scripts.
Ensures all scripts run with the correct virtual environment.
"""
import json
import os
import subprocess
import sys
import argparse
from pathlib import Path
# Load only the helper shipped beside this installed script, never from CWD.
sys.path.insert(0, str(Path(__file__).resolve().parent))
from runtime_paths import resolve_runtime_paths
def get_venv_python():
"""Get the virtual environment Python executable"""
skill_dir = Path(__file__).resolve().parent.parent
venv_dir = resolve_runtime_paths(skill_dir, "blog-audio").venv
if os.name == 'nt': # Windows
venv_python = venv_dir / "Scripts" / "python.exe"
else: # Unix/Linux/Mac
venv_python = venv_dir / "bin" / "python"
return venv_python
def ensure_venv():
"""Return the configured interpreter without mutating the environment."""
venv_python = get_venv_python()
return venv_python if venv_python.is_file() else None
def wants_json(args):
"""Return True when wrapper-level errors should be JSON."""
return "--json" in args
def emit_error(message, code, as_json):
"""Emit a wrapper-level error and exit."""
if as_json:
print(json.dumps({"status": "error", "error": message, "exit_code": code}))
else:
print(message)
sys.exit(code)
def main():
"""Main runner"""
parser = argparse.ArgumentParser(
description="Run Blog Audio skill scripts with the managed virtual environment"
)
parser.add_argument("--json", action="store_true", help=argparse.SUPPRESS)
parser.add_argument("script_name", nargs="?", help="Script file name to run")
parser.add_argument("script_args", nargs=argparse.REMAINDER, help="Arguments for the script")
args = parser.parse_args()
if not args.script_name:
emit_error(
"Usage: python3 run.py <script_name> [args...]",
1,
args.json or wants_json(sys.argv[1:]),
)
script_name = args.script_name
script_args = args.script_args
as_json = args.json or wants_json(script_args)
if "/" in script_name or "\\" in script_name or Path(script_name).name != script_name:
emit_error("Script name must be a file name, not a path", 2, as_json)
# Ensure .py extension
if not script_name.endswith('.py'):
script_name += '.py'
# Get script path
skill_dir = Path(__file__).resolve().parent.parent
scripts_dir = (skill_dir / "scripts").resolve()
script_path = (scripts_dir / script_name).resolve()
if script_path.parent != scripts_dir:
emit_error("Script path escapes the skill scripts directory", 2, as_json)
if not script_path.exists():
emit_error(f"Script not found: {script_name}", 1, as_json)
# Ordinary runs are read-only with respect to the managed environment.
# Installation is reserved for the explicit setup_environment.py command.
try:
venv_python = ensure_venv()
except ValueError as exc:
emit_error(str(exc), 1, as_json)
if venv_python is None:
emit_error(
"Blog Audio setup required. Run: python3 skills/blog-audio/scripts/setup_environment.py",
1,
as_json,
)
# Build command
cmd = [str(venv_python), str(script_path)] + script_args
# Run the script
try:
result = subprocess.run(cmd)
sys.exit(result.returncode)
except KeyboardInterrupt:
emit_error("Interrupted by user", 130, as_json)
except Exception as e:
emit_error(f"Error: {e}", 1, as_json)
if __name__ == "__main__":
main()
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |