# Performance Considerations When Using pm-skills: A Technical Guide

> Learn performance considerations for phuryn/pm-skills. Discover how this technical guide details scoped audits, SQL optimization, and performance testing for optimal results.

- Repository: [Pawel Huryn/pm-skills](https://github.com/phuryn/pm-skills)
- Tags: performance
- Published: 2026-06-30

---

**The pm-skills repository mitigates performance risks through scoped static audits, automatic SQL optimization with indexing recommendations, and mandatory performance test case generation.**

The `phuryn/pm-skills` repository provides AI-driven skills, commands, and plugins that help product managers automate workflows ranging from code analysis to data analytics. While these tools run as lightweight static prompts, many interact with large codebases, high-volume databases, and complex data aggregations that require careful performance management to maintain fast, cost-effective operations.

## Architecture and Performance-Critical Components

Understanding where bottlenecks occur within the pm-skills ecosystem is essential for optimizing your AI-augmented workflow.

### AI Shipping and Static Analysis

The **`/performance-audit-static`** command performs static analysis of codebases to identify **over-fetching** in view payloads, **missing indexes** on frequently queried columns, and **caching gaps** in static data reads. According to [`pm-ai-shipping/commands/performance-audit-static.md`](https://github.com/phuryn/pm-skills/blob/main/pm-ai-shipping/commands/performance-audit-static.md), this command automatically scopes reviews to "list or dashboard views, frequently hit endpoints, and large tables" when invoked without arguments, reducing unnecessary file traversal on large repositories【^pm-ai-shipping/commands/performance-audit-static.md†L21-L28】.

### SQL Query Generation

The **`sql-queries`** skill in `pm-data-analytics` generates SQL from natural language prompts but includes explicit safeguards for large datasets. The skill automatically appends performance considerations including indexing suggestions, partitioning strategies, and query refactors using `WITH` clauses for materialization. The documentation explicitly requires users to **mention data volume and time ranges** in requests to ensure generated queries account for table size【^pm-data-analytics/skills/sql-queries/SKILL.md†L24-L33】【^pm-data-analytics/skills/sql-queries/SKILL.md†L71-L73】.

### Test Scenario Coverage

The **`test-scenarios`** command in `pm-execution` generates comprehensive test coverage including happy-path, edge-case, error, security, and **performance** test cases. This ensures teams add load and stress-testing scenarios early in development before regressions appear at scale【^pm-execution/commands/test-scenarios.md†L43】.

### Data Analytics Skills

Skills like `cohort-analysis` and `ab-test-analysis` compute retention curves and statistical significance on potentially massive event logs. These skills recommend **sampling strategies** and **time-range constraints** to prevent timeouts and compute budget overruns when processing billions of rows.

## Built-in Performance Optimizations

The repository implements specific architectural decisions to maintain speed and reliability.

### Scoped Static Audits

When running `/performance-audit-static`, you can limit scope to specific sub-paths to avoid analyzing the entire repository. For example:

```bash
/performance-audit-static src/views/dashboard

```

This targets only hot endpoints rather than performing exhaustive I/O-heavy scans across the entire codebase.

### Automatic Query Optimization

The SQL generation skill produces a **Performance Notes** section with every query, automatically suggesting:
- Partial indexes on filter columns
- Partitioning strategies for time-series tables
- BigQuery `_PARTITIONTIME` filters and clustered columns for cost reduction

### Modular Skill Loading

As documented in [`README.md`](https://github.com/phuryn/pm-skills/blob/main/README.md), skills are **modular** and load only when explicitly invoked. You can force-load specific skills using the `/skill-name` syntax to avoid the overhead of initializing unnecessary components【^README.md†L38-L42】.

## Practical Usage Examples

### Running Targeted Performance Audits

To audit a specific high-traffic directory:

```bash
/performance-audit-static src/views

```

This returns a markdown report identifying over-fetch fields, missing indexes, and caching opportunities limited to the specified path.

### Generating Optimized SQL with Performance Hints

When requesting queries for large tables, include volume constraints:

```

Generate a PostgreSQL query for monthly revenue from the orders table (≈ 100M rows).

```

The skill produces optimized SQL with accompanying recommendations:

```sql
SELECT DATE_TRUNC('month', order_date) AS month,
       SUM(amount) AS revenue
FROM   orders
WHERE  order_date >= CURRENT_DATE - INTERVAL '1 year'
GROUP  BY 1
ORDER  BY 1;

```

**Performance Notes:**
- Create a partial index on `order_date` for the last year
- Consider partitioning the `orders` table by month

### Including Performance in Test Coverage

When writing user stories, the framework generates performance test cases:

```bash
/write-stories user --title "Export large CSV of user activity"

```

Output includes:
- **Performance**: Export 1M rows and verify response time remains under 30 seconds

## Key Source Files

- **[`pm-ai-shipping/commands/performance-audit-static.md`](https://github.com/phuryn/pm-skills/blob/main/pm-ai-shipping/commands/performance-audit-static.md)** – Implements the static audit logic that checks for over-fetch, missing indexes, and caching gaps while scoping to hot paths by default.
- **[`pm-data-analytics/skills/sql-queries/SKILL.md`](https://github.com/phuryn/pm-skills/blob/main/pm-data-analytics/skills/sql-queries/SKILL.md)** – Contains the SQL generation prompts that inject performance considerations and indexing recommendations for large datasets.
- **[`pm-execution/commands/test-scenarios.md`](https://github.com/phuryn/pm-skills/blob/main/pm-execution/commands/test-scenarios.md)** – Defines the test generation logic that includes performance as a required coverage dimension alongside functional and security tests.
- **[`pm-ai-shipping/commands/ship-check.md`](https://github.com/phuryn/pm-skills/blob/main/pm-ai-shipping/commands/ship-check.md)** – Orchestrates the full shipping packet, integrating the performance audit into the overall workflow.
- **[`README.md`](https://github.com/phuryn/pm-skills/blob/main/README.md)** – Documents the modular skill architecture that prevents unnecessary loading overhead.

## Summary

- **Scope early** using sub-path arguments with `/performance-audit-static` to avoid scanning entire repositories.
- **Specify data volume** when requesting SQL generation to trigger automatic indexing and partitioning recommendations.
- **Include performance tests** in your test scenarios to catch scaling regressions before they hit production.
- **Load only needed skills** to minimize initialization overhead and reduce turnaround time.

## Frequently Asked Questions

### How does the performance audit handle large codebases?

The `/performance-audit-static` command limits scope to hot endpoints, list views, and large tables by default when no path is specified. You can further constrain the audit by passing a specific subdirectory path as an argument, preventing the tool from traversing thousands of irrelevant files while still catching performance issues in high-traffic areas.

### What performance features are included in the SQL query skill?

The `sql-queries` skill automatically adds a Performance Notes section to every generated query, suggesting indexes on filter columns, partitioning strategies for time-series data, and query refactors using `WITH` clauses. It also prompts users to include data volume and time-range constraints in their requests to ensure the generated SQL accounts for table size and BigQuery partition filters【^pm-data-analytics/skills/sql-queries/SKILL.md†L24-L33】.

### Does pm-skills support load testing scenarios?

Yes. The `test-scenarios` command explicitly includes **performance** as a coverage dimension alongside happy-path, edge-case, error, and security tests. When generating scenarios for features like large CSV exports or complex queries, the skill creates load-test specifications that verify response times under data volume stress, helping teams catch regressions during development rather than in production【^pm-execution/commands/test-scenarios.md†L43】.

### How can I minimize latency when running skills?

Skills in pm-skills are designed to be **modular** and load only when explicitly invoked. To minimize latency, use the `/skill-name` syntax to force-load only the specific skill you need rather than allowing the system to initialize unnecessary components. Additionally, avoid uploading large schema diagrams or markdown files unless required for the specific analysis, as file reads contribute to turnaround time【^README.md†L38-L42】.