Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/Matt-Dionis/claude-code-configsnpx agentmods add commands/matt-dionis/claude-code-configs/perf-monitorWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/matt-dionis/claude-code-configs/perf-monitor)<a href="https://agentmods.dev/commands/matt-dionis/claude-code-configs/perf-monitor"><img src="https://agentmods.dev/badge/commands/matt-dionis/claude-code-configs/perf-monitor/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/matt-dionis/claude-code-configs/perf-monitor"><img src="https://agentmods.dev/badge/commands/matt-dionis/claude-code-configs/perf-monitor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00012 | $0.02423 |
| Opus 5 | $0.00006 | $0.01211 |
| Sonnet 5 | $0.00002 | $0.00485 |
| Haiku 4.5 | $0.00001 | $0.00242 |
Grade A, and why
perf-monitor scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 13d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 354 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Performance Monitoring Command
Monitor and analyze the performance of vector search operations, index efficiency, and memory lifecycle metrics.
Usage
This command provides comprehensive performance monitoring for:
- Vector search query performance
- Index usage and efficiency
- Memory lifecycle statistics
- Database query patterns
- Resource utilization
Available Monitoring Tasks
1. Vector Search Performance
# Check current pgvector index statistics
psql $DATABASE_URL -c "
SELECT
schemaname,
tablename,
indexname,
idx_scan as index_scans,
idx_tup_read as tuples_read,
idx_tup_fetch as tuples_fetched,
pg_size_pretty(pg_relation_size(indexrelid)) as index_size
FROM pg_stat_user_indexes
WHERE indexname LIKE '%vector%' OR indexname LIKE '%embedding%'
ORDER BY idx_scan DESC;
"
# Analyze query performance for vector operations
psql $DATABASE_URL -c "
SELECT
substring(query, 1, 50) as query_preview,
calls,
mean_exec_time as avg_ms,
min_exec_time as min_ms,
max_exec_time as max_ms,
total_exec_time as total_ms,
rows
FROM pg_stat_statements
WHERE query LIKE '%embedding%' OR query LIKE '%vector%'
ORDER BY mean_exec_time DESC
LIMIT 20;
"
2. Index Efficiency Analysis
# Check IVFFlat index clustering quality
psql $DATABASE_URL -c "
SELECT
indexname,
lists,
pages,
tuples,
ROUND(tuples::numeric / NULLIF(lists, 0), 2) as avg_vectors_per_list,
CASE
WHEN tuples::numeric / NULLIF(lists, 0) > 10000 THEN 'Rebalance recommended'
WHEN tuples::numeric / NULLIF(lists, 0) < 100 THEN 'Over-partitioned'
ELSE 'Optimal'
END as status
FROM (
SELECT
'memories_embedding_ivfflat_idx'::regclass as indexname,
(SELECT current_setting('ivfflat.lists')::int) as lists,
relpages as pages,
reltuples as tuples
FROM pg_class
WHERE oid = 'memories_embedding_ivfflat_idx'::regclass
) index_stats;
"
# Check HNSW index parameters
psql $DATABASE_URL -c "
SELECT
indexname,
m,
ef_construction,
ef_search,
CASE
WHEN ef_search < 100 THEN 'Low recall configuration'
WHEN ef_search > 500 THEN 'High cost configuration'
ELSE 'Balanced configuration'
END as configuration_assessment
FROM (
SELECT
'memories_embedding_hnsw_idx' as indexname,
current_setting('hnsw.m')::int as m,
current_setting('hnsw.ef_construction')::int as ef_construction,
current_setting('hnsw.ef_search')::int as ef_search
) hnsw_config;
"
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 13d ago First seen · 354 lines · 12 tokens per session scan A 23f8556f4b0d
perf-monitor is a command published in the GitHub repository Matt-Dionis/claude-code-configs (624 stars, last pushed 1y ago), licensed MIT. It adds 12 tokens to every session and 2,423 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
querying
Query documents from a search index using type-safe filters with support for pagination, sorting, field selection, scoring, and highlighting. Count matching documents efficiently without returning results.
agent
Add an AI agent / RAG backend (@convex-dev/agent) to the Convex app.
ingest
Manually add knowledge to the Weaviate store.
inference.embed
Embed one or more texts into vectors.
vector.batch_exists
Check existence for multiple vector keys.
vector.batch_upsert
Upsert multiple vectors in one itemwise batch.