filter-benchmark
Skill by saleor
Benchmarks Django ORM filters in the Saleor codebase on large datasets. It generates bulk test data, runs EXPLAIN ANALYZE and checks whether indexes are used. Written for developers who add or change Saleor GraphQL filters.
Install filter-benchmark
Built from the published package, never by AI.
git clone --depth 1 https://github.com/saleor/saleor /tmp/saleor && mkdir -p ~/.claude/skills && cp -r /tmp/saleor/.claude/skills/filter-benchmark ~/.claude/skills/filter-benchmarkRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/saleor/saleor /tmp/saleor && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/saleor/.claude/skills/filter-benchmark ~/.gemini/antigravity-cli/skills/filter-benchmarkAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
Filter Benchmark is an agent skill for testing the performance of Django ORM filters in the Saleor codebase. It walks through identifying the fields a filter touches and the indexes on those fields, then generating a bulk_create script that populates the database to around 100k rows. It also extracts the SQL the filter produces from the ORM.
The skill runs EXPLAIN ANALYZE with default planner settings and again with seq scans disabled to check index availability. A helper script flags sequential scans, row estimate mismatches, sorts and nested loops, saves JSON plans to /tmp and uploads them to explain.dalibo.com. It is aimed at developers who add or change filters in Saleor's GraphQL layer and need to confirm they perform on large datasets.
Written from the project's SKILL.md and checked against it.
What it can do
- Identify filter fieldsReads the filter code and model indexes to see which fields and joins are involved.
- Generate bulk dataWrites a bulk_create script that varies the fields the filter targets.
- Populate databaseRuns the population script in batches in the Django shell to reach 100k+ rows.
- Extract SQLPrints the SQL query that a filter produces from the Django ORM.
- Run EXPLAIN ANALYZEChecks query plans with default settings and with seq scans disabled.
- Flag red flagsReports seq scans, row estimate mismatches, sorts and nested loops with inner seq scans.
- Upload query plansUploads plans to explain.dalibo.com for interactive visualization.
- Clean up test dataDeletes bulk-created objects in reverse dependency order if the user agrees.
What you need
- A Saleor codebase with a .venv Python virtualenv
- Access to the Django shell through manage.py
- Network access to explain.dalibo.com for plan uploads
Try asking
- Test the filter on a big dataset and benchmark the created_at range
- Check if the index is used for this filter with EXPLAIN ANALYZE
- Generate bulk data for performance testing the transactions filter
Good to know
- Built for filters in the Saleor codebase under saleor/graphql/<app>/filters.py
- Query plans are uploaded to an external service, explain.dalibo.com
- If EXPLAIN ANALYZE returns 0 rows, filter inputs must be adjusted to match the data
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: .claude/skills/filter-benchmark/SKILL.md, .claude/skills/filter-benchmark/analyze_query.py. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md9 KB -
analyze_query.py8 KB
Alternatives to filter-benchmark
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
filter-benchmark: common questions
What problems does the skill look for in a query plan?
It looks for sequential scans on large tables, row estimate mismatches, sorts, and nested loops with inner sequential scans. It also checks whether indexes are used when seq scans are disabled.
Where are the query plans saved?
Plans are saved as JSON files in /tmp. They are also uploaded to explain.dalibo.com for interactive viewing.
Does the skill remove the generated test data?
It asks after the report whether to clean up. If the user agrees, it deletes the bulk-created objects in reverse dependency order and prints the counts.
How do I install filter-benchmark?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is filter-benchmark free?
The code is published under the BSD-3-Clause licence. The service it connects to may have its own pricing.
Is filter-benchmark safe to use?
It scores 92 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to filter-benchmark?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
