Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add thapaliyabikendra/ai-artifacts --skill postgresql-query-generationgit clone --depth 1 https://github.com/thapaliyabikendra/ai-artifactsWrote 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/skills/thapaliyabikendra/ai-artifacts/postgresql-query-generation)<a href="https://agentmods.dev/skills/thapaliyabikendra/ai-artifacts/postgresql-query-generation"><img src="https://agentmods.dev/badge/skills/thapaliyabikendra/ai-artifacts/postgresql-query-generation/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/skills/thapaliyabikendra/ai-artifacts/postgresql-query-generation"><img src="https://agentmods.dev/badge/skills/thapaliyabikendra/ai-artifacts/postgresql-query-generation.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.00101 | $0.01880 |
| Opus 5.5 | $0.00040 | $0.00752 |
| Sonnet 5.5 | $0.00020 | $0.00376 |
| Haiku 4.5 | $0.00010 | $0.00188 |
Grade A, and why
postgresql-query-generation 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 3mo 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 — 220 lines — stays where its author put it; the contents beside it link to each section on GitHub.
PostgreSQL Query Generation
Generate production-ready PostgreSQL queries for any .NET project using Entity Framework Core. This skill automatically discovers your domain structure and generates optimized SQL with proper relationships, multi-tenancy, soft delete filters, and ABP Framework conventions.
Quick Start
# Interactive mode (output to stdout)
python scripts/generate_query.py --interactive
# Generate query - automatically saves .sql file in current directory
python scripts/generate_query.py --query "get all applications with workflow stages"
# Generate query with custom output filename
python scripts/generate_query.py --query "get all applications" --output my_query.sql
# Only discover domain (output schema as JSON)
python scripts/generate_query.py --discover-only --output schema.json
What It Does
- Discovers domain entities by scanning C# entity files
- Analyzes relationships (foreign keys, navigation properties)
- Detects project conventions (multi-tenancy, soft delete, audit fields)
- Generates optimized queries with proper JOINs and WHERE clauses
- Adapts to any domain (ABP, custom DDD, layered monoliths)
Capabilities
Automatic Discovery
- Scans
src/*/Domain/Entities/**/*.csfor entity classes - Inherits properties from base classes (FullAuditedAggregateRoot, SetupEntity, etc.)
- Detects foreign keys by
{EntityName}Idpattern - Identifies navigation properties (ICollection, T)
- Maps C# types to PostgreSQL types automatically
Query Patterns Supported
- ✅ Multi-entity JOIN queries
- ✅ Many-to-many relationships via join tables
- ✅ Hierarchical/self-referencing (recursive CTE)
- ✅ JSONB querying (
@>,?,jsonb_path_query) - ✅ Window functions (ROW_NUMBER, FIRST_VALUE, etc.)
- ✅ Pagination with COUNT
- ✅ Permission/security queries with complex joins
- ✅ Aggregations and GROUP BY
- ✅ Full-text search (ILIKE)
- ✅ Bulk operations (INSERT/UPDATE with CASE)
Project-Specific Patterns
- ABP Framework: Auto-detects TenantId, IsDeleted, CreationTime audit fields
- Multi-tenancy: Always adds
TenantId = @tenantIdfilter - Soft delete: Adds
IsDeleted = falsefilter - JSONB fields: Optimized queries for InitialData, FormData, JsonSchema, etc.
- Naming conventions: Uses quoted identifiers (e.g.,
"SystemName")
What ships with it
9 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- assets/example-queries.sql 5.9 KB
- references/entity-discovery.md 9.7 KB
- references/query-examples.md 19 KB
- references/query-patterns.md 14 KB
- references/troubleshooting.md 12 KB
- references/type-mappings.md 7.5 KB
- scripts/__pycache__/generate_query.cpython-313.pyc 32 KB
- scripts/generate_query.py 27 KB runs code
- scripts/get_all_applications_with_1774248867.sql 375 B
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.
- 3mo ago First seen · 220 lines · 101 tokens per session scan A bca91834ca29
postgresql-query-generation is a skill published in the GitHub repository thapaliyabikendra/ai-artifacts (25 stars, last pushed 8mo ago), licensed Apache-2.0. It adds 101 tokens to every session and 1,880 once invoked, about $0.0004 per session on Opus 5.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-09-03.
postgresql-query-generation compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| postgresql-query-generationthapaliyabikendra/ai-artifacts | Skill | 25 | 8mo ago | Apache-2.0 | A | 101 | Claude Code |
| supabasesupabase/agent-skills | Skill | 3.2k | yesterday | MIT | A | 185 | Claude Code, Codex |
| azure-postgres-tsmicrosoft/skills | Skill | 3.3k | yesterday | MIT | A | 94 | Claude Code |
| butterbasebutterbase-ai/butterbase | Skill | 3.0k | 3d ago | Apache-2.0 | A | 34 | Claude Code, Codex |
| supabase-clifcakyon/claude-codex-settings | Skill | 1.2k | today | Apache-2.0 | A | 60 | Claude Code |
| supabase-jsfcakyon/claude-codex-settings | Skill | 1.2k | today | Apache-2.0 | A | 64 | Claude Code |
| supabase-nodealinaqi/maggy | Skill | 713 | 6d ago | MIT | A | 14 | Claude Code |