{"slug": "from-prompt-files-to-agent-skills-how-i-unified-my-content-automation", "title": "From Prompt Files to Agent Skills: How I Unified My Content Automation", "summary": "A developer evolved their content automation system from basic prompt files into portable agent skills. The original setup used three separate markdown prompts for videos, podcasts, and blogs, but suffered from duplicated instructions, lack of verification, and being locked to VS Code Copilot. The developer converted these into agent skills using playwright-cli for browser automation, enabling cross-agent compatibility and more reliable execution.", "body_md": "A few weeks ago I wrote about [how I use AI agents and MCP to automate my website's content](https://debbie.codes/blog/ai-agents-mcp-automate-content). That post covered the *why* — I create a lot of content and keeping my site up to date was tedious. This post is about what happened next: how I took those initial prompt files and evolved them into something much more powerful.\n\nMy original setup lived in `.github/prompts/`\n\n— three separate markdown files, one for each content type:\n\n```\n.github/prompts/\n├── playwright-add-video.prompt.md\n├── playwright-add-podcast.prompt.md\n└── playwright-add-blog.prompt.md\n```\n\nEach one was pretty simple. Here's what the video prompt looked like:\n\n```\n---\ndescription: 'Add a new video to the content/videos directory'\ntools: ['playwright/*']\n---\n\n# Add a new video\n\nAdd a new video using the MCP server to navigate to the URL to get the required info you need.\n- Ask the user for the url if not provided.\n- Do not invent titles and descriptions.\n- Do not add extra tags only add ones that already exist in the other video files.\n- Make sure the date for the video is correct.\n- Make sure you add a host\n- Close the browser when done.\n```\n\nAbout 15 lines of loose instructions. The podcast and blog prompts were nearly identical — same structure, same rules, just slightly different fields. And they worked! I'd open VS Code, run the prompt with Copilot, paste a YouTube URL, and it would create the markdown file for me.\n\nBut over time I started noticing the cracks.\n\n**What worked:** The core idea was solid. Give the AI a URL, let it browse the page, extract metadata, and create a file. That part was great.\n\n**What didn't work:**\n\n**Duplicated instructions everywhere.** All three prompts had the same rules: \"don't invent content\", \"only use existing tags\", \"verify the date\". If I wanted to change how tags were validated, I had to update three files. And they were already starting to drift — the podcast prompt referenced `microsoft/playwright-mcp/*`\n\nwhile the video prompt referenced `playwright/*`\n\n.\n\n**No verification step.** The prompts created the file and that was it. I had no way to know if the content actually rendered correctly on my site without manually starting the dev server and checking.\n\n**No PR creation.** After the file was created, I still had to manually create a branch, commit, push, and open a PR. That's the boring part that I wanted automated in the first place.\n\n**Locked to VS Code + Copilot.** The `.prompt.md`\n\nformat with its `tools`\n\nfrontmatter was specific to VS Code's Copilot agent mode. I couldn't use these prompts with Goose, Claude Code, or any other AI agent.\n\n**Too vague for reliability.** \"Use the MCP server to navigate to the URL\" is fine for a human reading instructions, but an AI agent needs more specifics. What happens when YouTube shows a cookie consent dialog? How do you extract the exact publish date when YouTube only shows \"7 days ago\"? The prompts didn't capture any of this operational knowledge.\n\nI decided to convert these prompts into [agent skills](https://block.github.io/goose/docs/guides/context-engineering/using-skills) — portable instruction sets that work across AI coding agents. Skills live in `.agents/skills/`\n\nand follow a standard format with a `SKILL.md`\n\nfile that any compatible agent can discover and use.\n\nI started with the video prompt since that was the one I used most. Instead of the Playwright MCP server (which requires a specific MCP configuration), I used [ playwright-cli](https://www.npmjs.com/package/@anthropic-ai/playwright-cli) — a standalone CLI tool for browser automation that works through regular shell commands. This meant any agent with shell access could use it.\n\nThe first version was straightforward — translate the 15-line prompt into a detailed skill with actual steps:\n\n```\n# Instead of \"use the MCP server to navigate\"\nplaywright-cli open \"https://www.youtube.com/watch?v=VIDEO_ID\"\nplaywright-cli snapshot\n# Read the snapshot YAML to extract metadata\nplaywright-cli close\n```\n\nThen I tested it by actually adding a real video. And that's where it got interesting.\n\nTesting the skill on a real YouTube video ([this NDC London talk](https://youtu.be/Numb52aJkJw)) revealed a whole set of things the original prompt never accounted for:\n\n**Cookie consent dialogs.** YouTube showed a full-page cookie consent dialog that blocked all the content. The skill needed to detect and accept it before extracting any metadata.\n\n**Relative dates.** YouTube initially shows \"7 days ago\" instead of the actual date. You have to click the \"...more\" button to expand the description, which reveals the exact publish date like \"11 Feb 2026\".\n\n**Snapshot files need reading.** The `playwright-cli snapshot`\n\ncommand saves a YAML file to disk. You can't just look at the command output — you need to actually read the file and parse through it to find the title, description, channel name, and date.\n\n**Shell environment issues.** Tools like `playwright-cli`\n\nand `npm`\n\nare installed via nvm and aren't on the default shell PATH. Every single shell command needs to source nvm first. The GitHub CLI is at `/opt/homebrew/bin/gh`\n\n, not on PATH either.\n\n**Git authentication.** Pushing to GitHub over HTTPS requires running `gh auth setup-git`\n\nfirst.\n\nNone of this was in the original prompt. And none of it needed to be — because a human was there to handle the edge cases. But for a fully autonomous workflow where the agent creates a branch, makes the file, verifies it on the dev server, and opens a PR? Every one of these details matters.\n\nI captured all of these learnings directly into the skill. Each time something went wrong, I updated the instructions. This is exactly the iteration loop that makes skills powerful — they accumulate operational knowledge over time.\n\nWith the video skill working end-to-end, I looked at the podcast and blog prompts and realized something: about 70% of the instructions were identical across all three.\n\nThe shared parts:\n\nThe unique parts per content type:\n\nThree separate skills would mean tripling the shared instructions and tripling the metadata that's always loaded into the agent's context. Following the [progressive disclosure pattern](https://skills.sh/anthropics/skills/skill-creator) from Anthropic's skill-creator guide, I structured it as one skill with reference files:\n\n```\n.agents/skills/add-content/\n├── SKILL.md                     # Core workflow + routing (75 lines)\n└── references/\n    ├── environment.md           # Shell env, git, dev server, PR creation\n    ├── video.md                 # YouTube-specific extraction + frontmatter\n    ├── podcast.md               # Podcast extraction + Cloudinary upload\n    └── blog.md                  # Blog content extraction + canonical URLs\n```\n\nThe `SKILL.md`\n\nfile is lean — 75 lines. It determines the content type from the URL, points to the right reference file, and defines the core workflow. The agent only loads the reference files it actually needs for the task at hand.\n\nWhen I say \"add this YouTube video\", the agent loads:\n\n`SKILL.md`\n\n(75 lines) — always`references/environment.md`\n\n(126 lines) — for shell/git/PR setup`references/video.md`\n\n(79 lines) — for YouTube-specific stepsIt never loads `podcast.md`\n\nor `blog.md`\n\n. That's 280 lines of context instead of loading three separate 275-line skills worth of metadata.\n\nHere's what changed:\n\n| Prompt Files (Before) | Agent Skill (After) | |\n|---|---|---|\nFiles |\n3 separate `.prompt.md` files |\n1 skill with 4 reference files |\nLines of instructions |\n~15 per prompt (45 total) | 480 total (but loaded progressively) |\nDuplicated logic |\n~70% duplicated across files | Zero — shared logic in `environment.md`\n|\nIDE/Agent support |\nVS Code + Copilot only | Goose, Claude Code, and any agent supporting skills |\nBrowser automation |\nPlaywright MCP server (requires MCP config) |\n`playwright-cli` (standalone CLI, shell only) |\nVerification |\nNone — manual check | Auto: starts dev server, screenshots with playwright-cli |\nPR creation |\nManual | Auto: branch, commit, push, `gh pr create`\n|\nCookie consent handling |\nNot addressed | Built-in step |\nDate extraction |\n\"Make sure the date is correct\" | Specific: click \"...more\", read expanded description |\nError recovery knowledge |\nNone | nvm sourcing, gh path, git auth, URL quoting |\nImage handling (podcasts) |\n\"Ask the user\" | Auto: extract from page → upload via Cloudinary MCP |\nEnd-to-end automation |\nURL → file (then manual steps) | URL → file → verify → PR (fully autonomous) |\n\nThe biggest shift isn't any single feature — it's that the skill captures *operational knowledge*. Every edge case I hit during testing is now encoded in the instructions. The next time the agent runs this workflow, it won't hit the same problems.\n\nHere's what happens when I say \"Add this YouTube video to the site\" and paste a URL:\n\n`playwright-cli`\n\n, navigates to the videoI just merge the PR. That's my only step.\n\nThe skill is in `.agents/skills/`\n\nwhich means it's portable across AI coding agents. I'm using it with [Goose](https://github.com/block/goose) today, but the same skill works with Claude Code or any agent that supports the [Agent Skills](https://agentskills.io) standard.\n\nThe podcast workflow now automatically uploads images to Cloudinary instead of asking me to do it manually. The blog workflow extracts full article content and handles canonical URLs for posts hosted on other platforms.\n\nAnd because skills accumulate knowledge through iteration, they'll keep getting better. Every time something unexpected happens, I update the reference file, and the next run is smoother.\n\nIf you're using prompt files today and finding yourself duplicating instructions or manually handling the steps after the AI creates a file, consider migrating to skills. The initial investment in writing detailed instructions pays off quickly when you stop having to babysit every run.", "url": "https://wpnews.pro/news/from-prompt-files-to-agent-skills-how-i-unified-my-content-automation", "canonical_source": "https://dev.to/debs_obrien/from-prompt-files-to-agent-skills-how-i-unified-my-content-automation-3h9k", "published_at": "2026-07-10 20:48:36+00:00", "updated_at": "2026-07-10 21:14:32.303649+00:00", "lang": "en", "topics": ["ai-agents", "developer-tools", "ai-tools"], "entities": ["VS Code", "Copilot", "Goose", "Claude Code", "Playwright", "MCP", "GitHub"], "alternates": {"html": "https://wpnews.pro/news/from-prompt-files-to-agent-skills-how-i-unified-my-content-automation", "markdown": "https://wpnews.pro/news/from-prompt-files-to-agent-skills-how-i-unified-my-content-automation.md", "text": "https://wpnews.pro/news/from-prompt-files-to-agent-skills-how-i-unified-my-content-automation.txt", "jsonld": "https://wpnews.pro/news/from-prompt-files-to-agent-skills-how-i-unified-my-content-automation.jsonld"}}