How to Integrate pm-product-discovery Skills with Existing Product Management Tools
The pm-product-discovery skills from the phuryn/pm-skills repository integrate with existing product management tools via the pm-toolkit CLI, which executes LLM prompts from Markdown skill files and can be invoked through standard shell commands from any platform supporting webhooks or automation scripts.
The phuryn/pm-skills repository ships a collection of ready-to-use product discovery "skills" written as Markdown files that describe prompting patterns for large language models (LLMs). Because the pm-toolkit CLI consumes these declarative skill files and exposes them as standard shell commands, pm-product-discovery skills integration requires no proprietary APIs or complex middleware—just the ability to execute bash commands and process JSON payloads in your existing product management environment.
Architectural Overview
The integration relies on a stateless, file-based architecture where the CLI acts as the bridge between your product management tool and the LLM provider.
Core Components:
- Skill Markdown Files (
*.md) – Declarative descriptions of tasks containing prompt templates, input variables, and output formats. These reside in paths likepm-product-discovery/skills/prioritize-features/SKILL.md. - pm-toolkit CLI (
pm) – Parses skill files, gathers arguments, builds the final LLM prompt, and streams the response from configured providers (OpenAI, Anthropic, Azure). - Adapter Layer – A thin wrapper (bash, Python, or low-code automation) that translates tool-specific payloads into CLI arguments and pushes the output back into the tool.
Data Flow:
- A trigger event occurs in your product management tool (e.g., a Jira ticket labeled "pm-discover").
- The adapter extracts relevant data (descriptions, custom fields) and formats it as JSON.
- The adapter executes
pm run <skill-name> --input '<json-payload>'. - The CLI reads the corresponding
SKILL.mdfile, substitutes variables, and sends the prompt to the LLM. - The LLM response is captured and injected back into the originating tool as a comment, child task, or document.
Because the CLI is stateless and reads skills dynamically from the filesystem, you can add or customize discovery workflows by simply editing Markdown files without recompiling binaries.
Integration Patterns
Bash Wrapper for Jira Webhooks
For Jira Cloud or Data Center, create a webhook-triggered script that runs on your automation server. This example assumes Jira sends issue data via stdin when the webhook fires:
#!/usr/bin/env bash
# jira-prioritize-features.sh
# Called by a Jira webhook when a ticket is labeled "pm-discover".
# Pull the JSON payload from stdin
payload=$(cat)
# Extract the description field
description=$(echo "$payload" | jq -r '.issue.fields.description')
# Run the skill – the CLI expects a single JSON argument
pm run prioritize-features --input "{\"interview\":\"$description\"}" > /tmp/result.md
# Post the result back to Jira as a comment
curl -s -X POST \
-H "Authorization: Bearer $JIRA_TOKEN" \
-H "Content-Type: application/json" \
-d "{\"body\":\"$(cat /tmp/result.md)\"}" \
"https://yourcompany.atlassian.net/rest/api/3/issue/${ISSUE_KEY}/comment"
Key file referenced: pm-product-discovery/skills/prioritize-features/SKILL.md
GitHub Actions Workflow
Embed discovery skills directly into your CI/CD pipeline to analyze pull request descriptions or review comments:
name: Product Discovery Review
on:
pull_request_review:
types: [submitted]
jobs:
prioritize:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up pm-skills
run: |
curl -sSL https://raw.githubusercontent.com/phuryn/pm-skills/main/install.sh | bash
- name: Run prioritize-features
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
run: |
# Extract the PR description
desc=$(jq -r .pull_request.body "$GITHUB_EVENT_PATH")
# Execute the discovery skill
pm run prioritize-features --input "{\"interview\":\"$desc\"}" > result.md
# Post as a PR comment
gh pr comment ${{ github.event.pull_request.number }} --body "$(cat result.md)"
Key file referenced: pm-product-discovery/skills/prioritize-features/SKILL.md
Python Adapter for Asana
For platforms like Asana that provide Python SDKs, wrap the CLI call in a subprocess:
import os, subprocess
from asana import Client
def run_discovery_skill(task_id):
client = Client.access_token(os.getenv("ASANA_TOKEN"))
task = client.tasks.find_by_id(task_id)
# Extract task description
desc = task.get('notes', '')
# Run the CLI skill
result = subprocess.check_output([
"pm", "run", "summarize-interview",
f'--input={{"interview":"{desc}"}}'
]).decode()
# Append result as a comment
client.tasks.add_comment(task_id, {'text': result})
return result
Key file referenced: pm-product-discovery/skills/summarize-interview/SKILL.md
Key Source Files and Implementation Details
Understanding these specific files in the phuryn/pm-skills repository helps you customize integrations:
pm-product-discovery/skills/prioritize-features/SKILL.md– Contains the prompt template for feature prioritization that the CLI renders when executingpm run prioritize-features.pm-product-discovery/skills/summarize-interview/SKILL.md– Defines the interview summarization logic used in the Python adapter example above..claude-plugin/marketplace.json– Exposes skill metadata for AI-assistant platforms, providing another integration path for tools supporting the Claude plugin format.README.md– Documents CLI installation methods and thepm runcommand syntax.
The CLI determines which LLM provider to use based on standard environment variables: OPENAI_API_KEY, ANTHROPIC_API_KEY, or AZURE_OPENAI_API_KEY.
Summary
- pm-product-discovery skills are standard Markdown files consumed by the
pmCLI, making them portable across any environment that supports shell execution. - Integration requires only a thin adapter layer to translate product management tool payloads into JSON arguments for the CLI.
- The CLI is stateless and dynamically reads skills from the filesystem, allowing real-time customization without rebuilding binaries.
- Supported LLM providers include OpenAI, Anthropic, and Azure, configured via environment variables.
Frequently Asked Questions
Can pm-product-discovery skills integrate with Jira Cloud automation rules?
Yes. Jira Cloud automation rules can trigger webhooks that execute shell scripts containing pm run commands. Because the CLI accepts JSON input via the --input flag and returns text to stdout, you can pipe results directly back into Jira issue comments using Jira's REST API and basic authentication tokens.
What file format defines the discovery skills in the phuryn/pm-skills repository?
Skills are defined as Markdown files (.md) containing YAML frontmatter and prompt templates. For example, pm-product-discovery/skills/prioritize-features/SKILL.md defines the inputs, output format, and LLM instructions for the prioritization workflow. The CLI parses these files at runtime to construct the final prompt.
Which LLM providers are supported by the pm-toolkit CLI?
The CLI supports major providers including OpenAI, Anthropic, and Azure OpenAI Service. Configuration is handled through environment variables (OPENAI_API_KEY, ANTHROPIC_API_KEY, AZURE_OPENAI_API_KEY), allowing you to switch providers without modifying skill definitions or integration code.
Do I need to rebuild the CLI after editing a skill definition?
No. The CLI reads skill files dynamically from the filesystem at execution time. You can modify SKILL.md files or add new skills to the pm-product-discovery/skills/ directory, and the next invocation of pm run will immediately use the updated definitions without recompilation or container restarts.
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:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →