Agent workflow packager

From TerminalSkills/skills · View interactive version

Agent workflow packager is an AI agent skill from the GitHub repository TerminalSkills/skills. Turns a workflow a team keeps repeating with a coding agent (a pasted prompt, runbook, review checklist or AGENTS.md section) into a spec-valid Agent Skill folder with SKILL.md, triggers, approval gates and a done check. Use when asked to "turn this into a skill", "package our release checklist as a

How to use this skill

Skill file

Agent Workflow Packager

Overview

A skill is a folder holding a SKILL.md that an agent loads when a task matches it. This skill takes a procedure that people currently paste into chats over and over, and converts it into such a folder that works in any host that implements the Agent Skills format (Claude Code, Codex and others). The result is one focused skill with a description that triggers reliably, steps with a clear end state, approval gates for risky actions, and a validator run as proof.

Hosts read skills in three layers, per the Agent Skills specification: name and description are loaded at startup for every skill (about 100 tokens), the full SKILL.md body loads only when the skill activates (under 5000 tokens recommended), and files in scripts/, references/ and assets/ load on demand. Design every packaging decision around that.

Instructions

1. Decide whether it deserves a skill

Collect evidence of repetition: past chat prompts, a runbook, merged PRs, an AGENTS.md section. A candidate has (a) inputs that look the same each time, (b) steps that mostly do not change, (c) a way to tell it is finished. If the user describes a one-off or a taste ("write cleaner code"), say so and offer a short checklist in AGENTS.md or CLAUDE.md instead. If it is a rule that must hold in every session, that also belongs in those files, not in a skill.

2. Write down the workflow as facts

Fill in six lines before drafting: who runs it, the trigger phrase they actually type, the input artifacts (PR URL, failing log, ticket, repo path), the output artifact (patch, report, file), the corrections users keep making to the agent, and the command or check that proves it is done. Ask for any line you cannot fill from the evidence; do not invent it.

3. Write the description last-mile first

The description is the only text used to decide activation. State what the skill does, then "Use when" with two or three phrases lifted from real requests. Put the key use case first: Claude Code truncates the combined description and when_to_use text at 1,536 characters in its skill listing, and the specification caps description at 1024 anyway. Avoid generic wording ("helps with code") that makes the skill fire on unrelated tasks.

4. Choose name, folder and frontmatter

The specification constrains the fields:

Place the folder where the target host scans it:

| Host | Project scope | Personal scope |

|------|---------------|----------------|

| Claude Code | .claude/skills/<name>/SKILL.md | ~/.claude/skills/<name>/SKILL.md |

| Codex | .agents/skills/<name>/SKILL.md | $HOME/.agents/skills/<name>/SKILL.md |

.claude/skills/changelog-release-notes/
  SKILL.md
  scripts/merged-since-tag.sh
  references/format.md

Claude Code also walks up from the working directory to the repository root; Codex scans .agents/skills in each directory from the working directory to the repository root. Commit project-scope skills so the whole team gets them. For cross-host teams, keep one copy and symlink or copy it into the other path.

5. Draft the body

Use imperative steps, each one an action with an observable result. Include:

Move long tables, API notes or templates to references/, and deterministic helpers to scripts/, and link them with relative paths from SKILL.md. Keep the main file well under the 500-line ceiling the specification recommends.

6. Control activation on the host

Claude Code supports disable-model-invocation: true in frontmatter for steps with side effects, so only the user can start the skill by name. Codex reads agents/openai.yaml; setting policy.allow_implicit_invocation: false there stops implicit matching while $skill-name still works. ```yaml

agents/openai.yaml (Codex)

policy:

allow_implicit_invocation: false


Use these for release, deploy and migration skills.

### 7. Validate and test

1. Install the reference validator in a virtual environment and run it on the folder:

   ```
   python3 -m venv .venv
   .venv/bin/pip install skills-ref
   .venv/bin/agentskills validate path/to/<name>
   ```

   Version 0.1.1 provides the `agentskills` command (subcommands `validate` and `read-properties`). It rejects uppercase or mismatched names and flow-style lists inside `metadata`, so write `metadata` values as plain strings if the validator must pass.
2. Start a fresh agent session in the target repo and send the exact phrase from the description. Confirm the skill activates and the done check runs.
3. Send an unrelated request and confirm the skill stays quiet.
4. Fix the description or steps where either test failed, bump `metadata.version`, repeat.

## Examples

### Example 1: Weekly release notes from merged pull requests

**Request:** "Every Friday I paste the same prompt: list PRs merged since the last tag, group by label, write the CHANGELOG entry. Make it a skill for our repo `acme/billing-api`."

**Plan:**

1. Evidence is repeated weekly, with known input (last git tag) and output (CHANGELOG.md section), so it qualifies.
2. Create `.claude/skills/changelog-release-notes/` (and `.agents/skills/...` as a copy, since the team uses Codex too).
3. Description: "Drafts a CHANGELOG.md entry from pull requests merged since the last git tag. Use when asked to 'write release notes', 'draft the changelog for v2.4.0' or 'summarise what shipped since the last tag'."
4. Body steps: find the tag with `git describe --tags --abbrev=0`; run `scripts/merged-since-tag.sh`; group by label per `references/format.md`; write the entry; show the diff and stop. Committing and tagging are left to the user.
5. Validate:

$ .venv/bin/agentskills validate .claude/skills/changelog-release-notes

Valid skill: .claude/skills/changelog-release-notes

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.