How Arguments Are Passed to PM Skills: Variable Injection and Command Binding
Arguments are passed to PM Skills through dollar-prefixed placeholders (e.g., $RESUME) declared in the skill's markdown definition, which the AI assistant populates by parsing user input according to the command's argument-hint specification.
The phuryn/pm-skills repository provides a structured framework for product management AI capabilities organized as self-contained markdown skills. Understanding how arguments are passed to PM Skills enables developers to create reusable command interfaces and helps users provide inputs correctly to trigger skill execution with the right context.
The Argument Declaration Architecture
PM Skills utilize a two-file pattern where skills declare their expected inputs independently of the commands that invoke them.
Skill-Level Variable Declaration
Each skill declares expected variables in its SKILL.md file using a dollar sign prefix. In pm-toolkit/skills/review-resume/SKILL.md (lines 12‑14), the arguments are defined as:
## Input Arguments
- $RESUME: The resume text or content to review
- $JOB_POSTING: (Optional) The job posting or target role description for tailoring feedback
The dollar-prefixed placeholders ($RESUME, $JOB_POSTING) act as variable names that the AI runtime substitutes with concrete values before executing the skill logic.
Command-Level Input Mapping
Commands that invoke skills are defined in separate markdown files under the commands/ directory. These files include an argument-hint field that instructs Claude (or the target AI assistant) on how to interpret user input. For example, in pm-toolkit/commands/review-resume.md (lines 3‑4):
argument-hint: "<resume as text or file>"
This hint tells the assistant which portion of the user's message should be bound to the skill's placeholder variables.
Runtime Argument Injection Flow
When a user invokes a skill, the argument passing follows a specific pipeline:
- User invokes a command – e.g., typing
/review-resumefollowed by content. - Argument hint parsing – The AI reads the command's
argument-hintto determine how to segment the user input. - Variable population – The AI substitutes the
$placeholders in the skill with the parsed concrete values. - Skill execution – The skill runs with the injected arguments; no explicit parameter syntax is required from the user.
This mechanism applies universally across the repository, from resume reviewing to data analytics tasks.
Practical Input Patterns
The following examples demonstrate how arguments are passed to PM Skills in practice, based on the review-resume skill implementation.
Direct Text Input
When providing content inline, the AI maps the text block to the $RESUME variable:
/review-resume
John Doe – Product Manager with 5 years experience...
The assistant assigns the pasted content to $RESUME and executes the skill.
File Upload Handling
For document-based inputs, the AI extracts text from the uploaded file and injects it into the placeholder:
/review-resume [upload résumé.pdf]
The uploaded file content becomes the value for $RESUME automatically.
Multiple Arguments with Delimiters
To supply the optional $JOB_POSTING argument, users can employ delimiters that the AI recognizes based on the command context:
/review-resume
[resume text]
---JOB---
Senior PM – AI Platform role requiring...
Content before ---JOB--- maps to $RESUME; content after maps to $JOB_POSTING.
Cross-Skill Pattern Consistency
The same argument passing mechanism works for other skills, such as sql-queries in pm-data-analytics/skills/sql-queries/SKILL.md:
# skill: sql-queries
## Input Arguments
- $QUERY: Natural‑language description of the data you need
- $DIALECT: Optional database dialect (bigquery, postgres, …)
If the corresponding command provides argument-hint: "<natural language query>", the assistant substitutes $QUERY with the user's input.
Key Implementation Files
| Component | File Path | Purpose |
|---|---|---|
| Skill Definition | pm-toolkit/skills/review-resume/SKILL.md |
Declares $RESUME and $JOB_POSTING placeholders (lines 12‑14). |
| Command Mapping | pm-toolkit/commands/review-resume.md |
Contains argument-hint used to bind user input to placeholders (lines 3‑4). |
| Template Reference | pm-data-analytics/skills/sql-queries/SKILL.md |
Demonstrates argument placeholders in analytics domain skills. |
| Architecture Docs | README.md (How It Works section) |
Explains that skills auto-load and arguments inject automatically. |
Summary
- Skills declare variables using
$prefixes in theirSKILL.mdfiles under the "Input Arguments" section. - Commands provide parsing hints via the
argument-hintfield to guide how user input maps to skill variables. - AI performs automatic substitution at runtime, populating placeholders with concrete values before skill execution.
- Optional arguments are supported by omitting the corresponding input or using delimiters to separate multiple values.
- No explicit syntax is required from users; the AI handles binding based on the command definition.
Frequently Asked Questions
How does the AI know which user input maps to which skill argument?
The AI reads the argument-hint field defined in the command's markdown file (e.g., pm-toolkit/commands/review-resume.md). This hint specifies the expected format of user input, allowing the assistant to parse and route values to the corresponding dollar-prefixed placeholders ($VARIABLE) declared in the skill.
Can I pass optional arguments to a PM Skill?
Yes. Skills declare optional arguments in their SKILL.md file by marking them as optional in the description, such as $JOB_POSTING: (Optional).... If the user does not provide content for that variable, the skill executes with that placeholder empty or with a default value depending on the skill's logic.
Where do I define the arguments a skill accepts?
Arguments are defined in the Input Arguments section of the skill's SKILL.md file using dollar-prefixed syntax (e.g., $RESUME). These definitions are located in the pm-toolkit/skills/[skill-name]/SKILL.md files or equivalent paths for other skill categories.
What happens if I don't provide a required argument?
If a required argument lacks a value when the skill is invoked, the AI typically prompts the user to provide the missing information before executing the skill, or the skill may execute with an empty value depending on the specific command's error handling configuration.
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 →