media-setup
Skill7 starsChanged 8 months agoMITView on GitHub
Interactive wizard to configure platform connections, API keys, and dependencies for media-agent. Detects available tools, walks through setup for each platform, tests connections, and writes config files. Run this before any other media-agent skill.
- Reads credentials
- Installs packages
In this repository6 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- media-ideaSkill
- media-imageSkill
- media-publishSkill
- mediaSkill
- media-writeSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
21 rules. About 0 are common, 13 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈13
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 26
Before starting, read the shared library files:
- Very specific: line 27
Read lib/adapter-discovery.md for how adapters work
- Very specific: line 28
Read lib/manifest-ops.md for manifest format
- Distinctive: line 32
Check for required and optional tools:
- Very specific: line 51
If python3 or curl is missing, stop and tell the user how to install them.
- Very specific: line 53
If ImageMagick is missing, warn the user but continue — it's only needed for /media-image.
- Distinctive: line 70
Use AskUserQuestion to ask which platforms the user wants to configure.
- Distinctive: line 81
Verify the repo exists:
- Distinctive: line 88
Ask the user for their Dev.to API key.
- Distinctive: line 100
Ask the user for:
- Distinctive: line 115
Ask if the user wants to set up image generation.
- Distinctive: line 117
If yes, ask for their OpenAI API key (for DALL-E 3).
- Distinctive: line 129
Ask the user if they want to set up their personal writing style.
- Distinctive: line 139
Ask the user to paste 2-3 paragraphs of their own writing (blog posts, READMEs, tweets, etc.).
- Very specific: line 148
Default perspective (first_person/second_person/third_person)
- Distinctive: line 166
Use AskUserQuestion to walk through each trait:
- Very specific: line 176
Write the voice config to content/config/voice.yaml:
- Very specific: line 199
Write credentials to .env (gitignored):
- Very specific: line 211
Write platform config to content/config/platforms.yaml (non-sensitive, git-tracked):
- Distinctive: line 228
If the user expects to publish many posts with images:
- Distinctive: line 234
If git-lfs is available, offer to configure it:
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
/media-setup — Platform Configuration Wizard
Configure your media-agent installation. This skill detects available tools, walks you through API key setup for each platform, tests connections, and writes the config files.
Prerequisites
Before starting, read the shared library files:
- Read
lib/adapter-discovery.mdfor how adapters work - Read
lib/manifest-ops.mdfor manifest format
Step 1: Detect Environment
Check for required and optional tools:
echo "=== media-agent Setup ==="
echo ""
# Required
echo "Checking dependencies..."
which git >/dev/null 2>&1 && echo " [OK] git" || echo " [MISSING] git — required"
which python3 >/dev/null 2>&1 && echo " [OK] python3" || echo " [MISSING] python3 — required for YAML parsing"
which curl >/dev/null 2>&1 && echo " [OK] curl" || echo " [MISSING] curl — required for API calls"
# Optional
echo ""
echo "Optional tools:"
which convert >/dev/null 2>&1 && echo " [OK] ImageMagick" || echo " [MISSING] ImageMagick — needed for image resizing (brew install imagemagick)"
which gh >/dev/null 2>&1 && echo " [OK] GitHub CLI" || echo " [MISSING] GitHub CLI — optional, for GitHub Pages"If python3 or curl is missing, stop and tell the user how to install them.
If ImageMagick is missing, warn the user but continue — it's only needed for /media-image.
Step 2: Discover Available Adapters
echo ""
echo "Available platform adapters:"
for adapter in adapters/*/; do
name=$(basename "$adapter")
display=$(python3 -c "import yaml; print(yaml.safe_load(open('${adapter}adapter.yaml'))['display_name'])" 2>/dev/null || echo "$name")
auth_type=$(python3 -c "import yaml; print(yaml.safe_load(open('${adapter}adapter.yaml'))['auth_type'])" 2>/dev/null || echo "unknown")
echo " - $display ($auth_type)"
doneStep 3: Configure Each Platform
Use AskUserQuestion to ask which platforms the user wants to configure. Then for each selected platform:
GitHub Pages (auth_type: git_push)
Ask the user:
- "What is the local path to your GitHub Pages repository?" (e.g.,
~/myblog) - "Which branch do you publish from?" (default:
main) - "What is your site URL?" (e.g.,
https://username.github.io) - "What directory are posts in?" (default:
_posts)
Verify the repo exists:
[ -d "<repo_path>/.git" ] && echo "OK: Git repo found" || echo "ERROR: Not a git repo"Dev.to (auth_type: api_key)
Ask the user for their Dev.to API key. They can get one at https://dev.to/settings/extensions.
Test the connection:
RESPONSE=$(curl -s -o /dev/null -w "%{http_code}" \
-H "api-key: <API_KEY>" \
"https://dev.to/api/users/me")
[ "$RESPONSE" = "200" ] && echo "OK: Dev.to connected" || echo "ERROR: Auth failed (HTTP $RESPONSE)"Hashnode (auth_type: api_key)
Ask the user for:
- Their Hashnode API key (from https://hashnode.com/settings/developer)
- Their publication ID (from their blog dashboard URL)
Test the connection:
RESPONSE=$(curl -s -w "\n%{http_code}" \
-X POST "https://gql.hashnode.com" \
-H "Authorization: <API_KEY>" \
-H "Content-Type: application/json" \
-d '{"query":"{ me { username } }"}')Step 4: Configure Image Generation (Optional)
Ask if the user wants to set up image generation.
If yes, ask for their OpenAI API key (for DALL-E 3).
Test:
RESPONSE=$(curl -s -o /dev/null -w "%{http_code}" \
-H "Authorization: Bearer <API_KEY>" \
"https://api.openai.com/v1/models")
[ "$RESPONSE" = "200" ] && echo "OK: OpenAI connected" || echo "ERROR: Auth failed"Step 5: Configure Writing Voice (Optional)
Ask the user if they want to set up their personal writing style.
Use AskUserQuestion: "Want to set up your writing voice? This helps the system match your personal style instead of sounding like AI."
- A) Yes, paste writing samples
- B) Yes, describe my style manually
- C) Skip for now
Option A: Writing samples
Ask the user to paste 2-3 paragraphs of their own writing (blog posts, READMEs, tweets, etc.).
Use AskUserQuestion: "Paste a writing sample — anything you've written that sounds like you. Blog post, README, email, tweet thread, 公众号文章 — all work. (Paste one now, I'll ask for more after.)"
Collect 1-3 samples. For each, extract voice traits:
- Average sentence length (short/medium/long)
- Vocabulary level (academic/technical/conversational/casual)
- Humor presence (none/dry/occasional/frequent)
- Default perspective (first_person/second_person/third_person)
- Formality (formal/neutral/informal)
- Language patterns (e.g., uses rhetorical questions, starts with anecdotes, uses 口语化 Chinese)
Show the extracted traits to the user for confirmation:
Based on your samples, here's your voice profile:
sentence_length: short
vocabulary: conversational
humor: dry
perspective: first_person
formality: informal
Does this look right? I can adjust any of these.Option B: Manual style description
Use AskUserQuestion to walk through each trait:
- "How long are your typical sentences?" (short and punchy / medium / long and flowing)
- "What's your vocabulary like?" (academic / technical jargon / conversational / casual slang)
- "Do you use humor in your writing?" (never / dry/subtle / sometimes / a lot)
- "What perspective do you write from?" (I/我 first person / you/你 second person / third person)
- "How formal is your tone?" (formal / neutral / informal/casual)
Write voice.yaml
Write the voice config to content/config/voice.yaml:
# Generated by /media-setup
samples:
- |
<pasted sample 1>
- |
<pasted sample 2>
traits:
sentence_length: <extracted or chosen>
vocabulary: <extracted or chosen>
humor: <extracted or chosen>
perspective: <extracted or chosen>
formality: <extracted or chosen>Tell the user:
"Voice profile saved. The writing skills will match this style automatically. You can update it anytime by editing content/config/voice.yaml or running /media-setup again."
Step 6: Write Config Files
Write credentials to .env (gitignored):
cat > .env << EOF
# Generated by /media-setup on $(date -u +%Y-%m-%dT%H:%M:%SZ)
DEVTO_API_KEY=<value>
HASHNODE_API_KEY=<value>
HASHNODE_PUBLICATION_ID=<value>
OPENAI_API_KEY=<value>
EOF
chmod 600 .envWrite platform config to content/config/platforms.yaml (non-sensitive, git-tracked):
# Generated by /media-setup
github_pages:
repo_path: "<path>"
branch: "<branch>"
site_url: "<url>"
posts_dir: "<dir>"
platforms:
- devto
- hashnode
- github-pagesStep 7: Configure git-lfs (Optional)
If the user expects to publish many posts with images:
which git-lfs >/dev/null 2>&1 && echo "[OK] git-lfs available" || echo "[INFO] git-lfs not installed — recommended for repos with >50 posts"If git-lfs is available, offer to configure it:
git lfs install
git lfs track "content/**/assets/*.png"
git lfs track "content/**/assets/*.jpg"
git add .gitattributesStep 8: Summary
Print a summary of what was configured:
=== media-agent configured! ===
Platforms:
[OK] GitHub Pages → https://username.github.io
[OK] Dev.to → connected as @username
[OK] Hashnode → connected to publication xyz
Image generation:
[OK] OpenAI DALL-E 3
Writing voice:
[OK] Voice profile configured (informal, conversational, first person)
Next steps:
- Run /media-idea to brainstorm your first post
- Run /media to start the full guided workflow
- Or write markdown manually and use /media-publishDoes it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

