From claude-workflow
Start work using a 4-stage pipeline — Opus (high) plans, Sonnet (high) implements, then two parallel Sonnet reviews (acceptance-compliance + code review), with a feedback loop. Works in three input modes — (a) bez argumentu → wybór issue z listy otwartych, (b) jeden lub wiele numerów issue (np. "12" albo "12 13 14"), (c) wolny opis zadania bez issue. Adapts to environment — runs full git/PR workflow when in a git repo, falls back to a prompt-only pipeline (plan → implement → review, no branch, no PR) when not. Use when the user asks to "rozpocznij pracę nad issue N" / "work on issue N" / "rozpocznij pracę" / "popraw X".
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-workflow:work-on-issueThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Generic orchestrator for issue- or task-driven work. The pipeline is the same regardless of environment:
Generic orchestrator for issue- or task-driven work. The pipeline is the same regardless of environment:
Opus plans → Sonnet implements → two parallel Sonnet reviews (compliance + code review) → loop back if needed.
What changes is how much git/PR plumbing wraps it:
If the cwd looks like the llm-chat-python-tutorial-docker project (multi-tenant FastAPI + PostgreSQL/pgvector + scheduler; Nuxt 4 admin panel w admin-ui/), apply the project-specific conventions from CLAUDE.md automatically. Otherwise stay generic and let the planner derive conventions from whatever signals are in the cwd (or from the prompt alone in no-repo mode).
You are the orchestrator. You do not write the implementation yourself — you delegate to subagents and pass artifacts between them. Keep your own context lean: tool output from sub-phases is heavy, so use Agent calls (which keep raw output out of your context) rather than Reading every file the implementer touches.
Raw arguments: $ARGUMENTS
Inspect the argument string and pick exactly one mode:
Empty mode — $ARGUMENTS is empty / whitespace only.
→ Requires gh issue list to work. If it did (see preloaded block), present a short numbered list to the user and ask which issue(s) to work on. Do not start the pipeline before the user answers. If gh issue list failed, tell the user empty mode is unavailable here and ask them to pass an issue number or a free-text description instead.
Issue-number mode — every whitespace/comma-separated token is purely numeric (e.g. 12, 12 13, 12,13,14, #12 #13). Strip leading #.
→ Fetch each issue with gh issue view <N>. If gh is not authenticated, has no default repo, or any fetch fails, stop and report — do not fabricate. With multiple issues in repo mode: one branch, one PR referencing all numbers (e.g. feature/issues-12-13-<slug>), unless the issues are clearly incompatible — then ask the user whether to split. In no-repo mode there is no branch/PR; treat the issues as a bundled task spec.
Free-text mode — argument is non-empty and contains non-numeric content (e.g. dodaj package.json / popraw walidację slug w tenant API).
→ Treat the text verbatim as the task spec. No gh issue view. In repo mode, derive a branch name feature/<slug-from-description> (lowercase ascii, kebab-case, max ~40 chars) and surface it in the first status line so the user can correct it. In no-repo mode, no branch — just announce the task and proceed.
If the mode is ambiguous (e.g. 12 popraw bug), ask the user one short clarifying question instead of guessing.
Raw arguments string (orchestrator parses this itself — see „Input parsing"):
$ARGUMENTS
Working-tree state (preloaded; tolerates failure so the skill loads regardless of environment):
git rev-parse --abbrev-ref HEAD 2>&1 || true
git status --short 2>&1 || true
git remote -v 2>&1 || true
Open issues (works only when gh is authenticated and a default repo is resolvable):
gh issue list --state open --limit 30 --json number,title,labels,milestone 2>&1 || true
Project signals (used to decide whether to apply llm-chat-python-tutorial-docker conventions):
ls -1 CLAUDE.md compose.yml compose.dev.yml pyproject.toml admin-ui 2>&1 || true
Before the pipeline starts, classify the environment from the preloaded blocks above. Surface the result in your first status line.
git_repo — true if git rev-parse --abbrev-ref HEAD returned a branch name without a fatal: error. Otherwise false → no-repo mode.gh_ok — true if gh issue list returned JSON ([ at the start). Otherwise false. When false, empty mode and issue-number mode are blocked unless you can recover (ask user to authenticate or provide the issue manually).project_detected — true if CLAUDE.md exists AND (compose.yml or pyproject.toml or admin-ui also exists). When true, apply project conventions (RLS, with_tenant_context, uv, npm, branch off multi-tenant, etc.). When false, stay generic and infer from cwd signals.State the resulting mode tag in your first status line, e.g.:
feature/<slug> off multi-tenant."If you detected issue-number mode and gh_ok = true, fetch each issue body with one gh issue view <N> --json number,title,body,labels,state,assignees,milestone call per number (parallel — independent). If any call fails, stop and report — do not fabricate.
If gh_ok = false in issue-number mode: tell the user gh is not available here and either (a) ask them to paste the issue body inline (treat as free-text mode after), or (b) abort.
In empty mode and free-text mode skip this step entirely.
Pick the implementer subagent from cwd signals (skip in no-repo mode unless cwd has any project files):
src/chat_ai/**, tests/**, migrations/**, pyproject.toml → voltagent-lang:fastapi-developer (or voltagent-lang:python-pro for non-API code, voltagent-lang:sql-pro for migrations).compose.yml, compose.dev.yml, docker/**, .env*, alembic.ini, scheduler container → devops-engineer.admin-ui/** (Nuxt 4 + @nuxt/ui v4 + Composition API) → voltagent-lang:vue-expert. Use npm, not pnpm/yarn.general-purpose with model: "sonnet".If scope is ambiguous, ask one clarifying question before phase 1.
Run phases sequentially. Phases 1 and 2 are each one Agent tool call. Phase 3 spawns two review agents (3a compliance + 3b code review) in parallel — both Agent calls in a single message — then wait for both completions before evaluating the joint verdict. Do not Read the agent's transcript file mid-flight; wait for the completion notification.
Spawn subagent_type: "Plan" (inherits Opus, read-only).
Brief the planner with:
git_repo, gh_ok, project_detected. In no-repo mode tell the planner explicitly: „nie jesteś w repo git — zaplanuj file changes/artefakty względem cwd, bez brancha, bez PR".project_detected = true → branch off multi-tenant, names feature/issue-<N>-<slug> / feature/issues-<N1>-<N2>-<slug> / feature/<slug> (single / multi / free-text). If already on a relevant feature branch, stay on it.project_detected = false → branch off the current default branch (git remote show origin or just current HEAD), names same scheme.project_detected = true): conventions from CLAUDE.md (multi-tenant, RLS, slug regex, no DELETE tenant, with_tenant_context, ruff + pytest, alembic, uv, npm for admin-ui), plus docs/ADMIN.md, docs/TENANT.md, docs/SCHEDULER.md, docs/ADMIN_UI.md, tutorial-python-high-level.md.In free-text mode, after the plan returns, surface the proposed acceptance criteria to the user and get a quick confirmation before moving to Phase 2.
Capture the returned plan verbatim — it is the contract for phases 2 and 3.
Spawn the implementer. Pick subagent_type from stack detection. Pass model: "sonnet".
Brief the implementer with:
#<N> (issue mode), or no issue — ad-hoc task: <short description> (free-text mode).git_repo, gh_ok, project_detected) + branching instruction (repo mode only — no branching in no-repo mode).project_detected = true: follow CLAUDE.md; respect RLS via with_tenant_context; new migrations via Alembic; tests must pass uv run pytest; lint must pass uv run ruff check; admin-ui uses npm + npm run lint + npm run test.project_detected = false: follow conventions visible in cwd (existing test runner, linter, package manager). If cwd is empty/unrelated (no-repo mode), produce the deliverable as the plan describes — files in cwd or output in the response.After it returns:
git diff --stat and git status.ls -la on the implementer's reported paths). Skip if implementation was conceptual/output-only.Spawn two Agent calls in a single message (parallel). Wait for both before deciding.
subagent_type: "general-purpose", model: "sonnet".git diff <base>...HEAD. In no-repo mode, the implementer's reported file paths + their contents (or output if no files).file:line showing where it is or where it should have been).subagent_type: "code-reviewer", model: "sonnet".project_detected = true: tenant isolation correctness (RLS context, slug validation, no cross-tenant data leak), migration safety (reversible? RLS policies updated?), ruff + pytest expectations, Docker entrypoint impact, observability (per-tenant metrics labeled correctly), admin-ui lint/test if touched.Joint verdict from 3a + 3b:
multi-tenant if project_detected, else the default branch). Do not push or open a PR without explicit confirmation.git init + commit if they want versioning, but don't do it for them.In your first status line state the chosen mode tag (see „Environment detection"). Between phases send one short status line („Plan gotowy, startuję implementację", „Implementacja gotowa, startuję dwa równoległe review"). At the end, report:
reset --hard, push --force, branch -D) without user confirmation; never auto-merge or auto-push; if working tree was dirty at start, ask the user how to proceed (stash, commit, abort) before creating a new branch.gh issue view <N> fails, stop and tell the user — do not fabricate.git command that mutates state. Read-only git rev-parse etc. is fine but generally unnecessary here. Skip the branch/PR steps entirely.multi-tenant base branch, etc.) apply only when project_detected = true. Don't force them onto unrelated tasks.Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub michalstaniecko/claude-workflow --plugin claude-workflow