How PM Skills Marketplace Chains Multiple Skills in a Single Command Workflow

TLDR: The PM Skills Marketplace implements deterministic command-driven workflows by parsing a Workflow section in markdown command files, then sequentially loading and executing skills from the plugins/*/skills/ directory while passing a shared context dictionary between each step until the workflow completes.

The phuryn/pm-skills repository provides a modular framework for product management automation. It chains multiple skills together in a single command workflow by orchestrating reusable skill blocks through a deterministic execution pipeline defined in markdown configuration files.

Understanding Command Definitions

Each slash-command in the PM Skills Marketplace lives in a *.md file under a plugin's commands/ folder. For example, the /discover command is defined in pm-product-discovery/commands/discover.md.

These command files contain a Workflow section that explicitly lists the execution steps and the skill names to be applied. According to the source code at lines 33-71 of discover.md, this section declares a sequential chain of skills that the runtime will invoke in order.

How the Skill Chaining Mechanism Works

The chaining system operates through three distinct phases that ensure deterministic execution from start to finish.

Step 1: Workflow Parsing

When a user invokes a command, the runtime parses the workflow definition from the command's markdown file. The workflow specifies an ordered list of skills to execute, such as brainstorm-ideas-existing, identify-assumptions-existing, and subsequent steps.

Step 2: Dynamic Skill Loading

Skills are stored as plain markdown files under plugins/*/skills/ directories. When the execution reaches a workflow step, the runtime automatically loads that skill's definition from its respective file. Because skills are decoupled from commands, a single skill becomes a reusable building block across multiple workflows.

Step 3: Context Passing and Execution

The orchestration follows a deterministic pattern: skill → skill → skill until completion. The command processor captures the output of each skill and passes the resulting context to the next skill in the chain.

The internal pseudo-code implementation follows this pattern:

def run_command(cmd, args):
    workflow = parse_workflow(cmd)
    context = {"args": args}
    for step in workflow:
        skill = load_skill(step.skill_name)
        context = skill.run(context)   # each skill receives & returns a dict

    return context

Each skill receives a context dictionary containing the current state (including previous outputs) and returns an updated dictionary for the next skill. Checkpoints within the workflow allow user steering, but the underlying orchestration remains deterministic.

Real-World Example: The /discover Command

The /discover command demonstrates the complete chaining pattern. When invoked with a product concept, it executes four skills sequentially:

  1. brainstorm-ideas-existing – Generates 10 product ideas based on the input
  2. identify-assumptions-existing – Lists assumptions for each generated idea
  3. prioritize-assumptions – Ranks assumptions on Impact × Risk criteria
  4. brainstorm-experiments-existing – Proposes experiments for the top-ranked assumptions

This workflow is defined in pm-product-discovery/commands/discover.md and utilizes skills stored in pm-product-discovery/skills/brainstorm-ideas-existing/SKILL.md and pm-product-discovery/skills/identify-assumptions-existing/SKILL.md.

Extending Workflows with Reusable Skills

Adding a new multi-skill command requires only defining a new markdown file in a commands/ folder that lists the desired skill chain. Because skills remain decoupled from specific commands, any new workflow can reuse existing skills without code duplication.

For example, the pm-toolkit/skills/review-resume/SKILL.md skill can be referenced by multiple unrelated commands, demonstrating the platform's modular architecture.

Summary

  • Command definitions reside in commands/*.md files containing a Workflow section that declares the skill execution order.
  • Skills are modular markdown files stored in plugins/*/skills/ directories that execute specific product management tasks.
  • Context passing occurs through a shared dictionary that each skill updates and passes to the next step in the chain.
  • The /discover command exemplifies the pattern by chaining four distinct skills: brainstorming, assumption identification, prioritization, and experiment design.
  • The architecture supports extensibility through decoupled, reusable skill blocks that any command can orchestrate.

Frequently Asked Questions

How does the PM Skills Marketplace pass data between skills in a workflow?

The marketplace passes a shared context dictionary between skills. Each skill receives the current context as a parameter, processes the data, and returns an updated dictionary containing its outputs. This context object flows sequentially through the workflow steps, allowing each skill to access previous results.

Can skills be reused across different command workflows?

Yes. Skills are decoupled building blocks stored in plugins/*/skills/ directories. Because the workflow system references skills by name in the command's markdown definition, any skill can be invoked by any command. For example, the resume review skill in pm-toolkit/skills/review-resume/SKILL.md can be chained into multiple unrelated command workflows.

What happens if a user needs to intervene during a skill chain?

The workflow supports checkpoints that pause execution to allow user steering. While the underlying orchestration remains deterministic (skill → skill → skill), checkpoints present intermediate outputs (such as "Here are 10 ideas. Which ones should we stress-test?") and accept user input before continuing to the next skill in the sequence.

Where are command workflows defined in the repository?

Command workflows are defined in markdown files located within plugin-specific commands/ folders. For instance, the /discover command workflow is defined in pm-product-discovery/commands/discover.md at lines 33-71, which lists the sequential skills to execute.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →