Skip to content

Extract workflow skills/gate scripts/agents into a claude-plugins marketplace repo #19

Description

@miridius

Handoff for a new session. All decisions below are owner-approved; execution not started (only git init done).

Locked decisions (owner-approved)

  • Repo: miridius/claude-plugins, PRIVATE, on GitHub.
  • Structure: plugin MARKETPLACE containing plugins (like claude-plugins-official): root .claude-plugin/marketplace.json + plugins/<name>/.claude-plugin/plugin.json + skills/<name>/SKILL.md, agents/*.md, script dir. Reference layout: ~/.claude/plugins/marketplaces/claude-plugins-official (see plugins/pr-review-toolkit and example-plugin for shape).
  • /lgtm ALWAYS chains into the /merge flow after setting human-approved (update merge's "only when the user asks" description accordingly). lgtm keeps disable-model-invocation: true.

State

  • ~/repos/claude-plugins exists, git init -b main done, zero commits, no files.
  • mp4ify-bot side is untouched; its .claude/ copies stay until the follow-up consumption PR.

Contents to extract (from mp4ify-bot's .claude/)

  • skills: pr, commit, address-review, lgtm, merge (each skills/<name>/SKILL.md)
  • gate scripts: commit-gate.sh, pr-approve.sh, pr-gate.sh, review-approve.sh, stage-id.sh
  • agents: comment-audit.md, pr-description-audit.md, rules-compliance.md (near-verbatim; already repo-generic)
  • NOT in scope: settings.json Stop hook, .claude/rules/, permissions.

Adaptation notes (facts found while scoping)

  • stage-id.sh is SOURCED by commit-gate.sh and review-approve.sh via . ./.claude/hooks/stage-id.sh — must become script-dir-relative; resolve the script dir BEFORE cd "$(git rev-parse --show-toplevel)".
  • commit-gate.sh ends exec ./check.sh (repo-specific) — must not assume it exists in a consuming repo.
  • Git hook wiring in mp4ify-bot is simple-git-hooks: pre-commit → ./.claude/hooks/commit-gate.sh, pre-push → ./e2e.sh. The consumption PR must re-point pre-commit at the installed plugin's script path.
  • merge skill step 4 runs ./prod.sh (repo-specific); pr skill hard-codes mp4ify QA (dev bot via web.telegram.org), ./e2e.sh full, check.sh — these need to defer to the consuming repo's CLAUDE.md. Keep the gate semantics and no-scoping prose EXACTLY (battle-tested).
  • Skill prose references ./.claude/hooks/*.sh — repoint to the plugin's script dir. Prefer naming the dir scripts/ (a plugin hooks/ dir suggests hooks.json auto-registration; these are git-hook/gate scripts invoked by skills). In SKILL.md, reference them relative to the injected "Base directory for this skill".
  • Fail-closed properties to preserve exactly: content-bound stage id (HEAD+write-tree), consume-on-attempt marker, 5-min/2-h staleness windows, HEAD-binding + pushed-oid check in pr-gate.sh, stage_id nonzero → refuse.
  • Consuming repo's required status contexts: test, all-pr-skill-steps-passed, human-approved.

Build process (standing instructions)

  • ALL coding via Opus agents through the Workflow tool; orchestrator does not write code.
  • Full review treatment: shell-script correctness (path resolution/fail-closed), fidelity vs. mp4ify sources (flag semantic drift beyond the sanctioned generalizations), plugin/marketplace JSON validity — fix all findings, re-review until clean.
  • Then create the private GH repo (gh repo create miridius/claude-plugins --private), push main, write a README (what the marketplace is, gate model, install + git-hook wiring + branch-protection setup).

Follow-up (after plugin repo lands)

  • mp4ify-bot PR: enable the marketplace + plugin, delete the duplicated .claude skills/agents/hooks, re-point simple-git-hooks pre-commit; goes through /commit + /pr + /lgtm + /merge as usual.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions