frappe-sql

frappe-sql is a skill for Claude Code from Dkm0315/frappe-agent. It costs 51 tokens per session (232 once invoked), scanned A, original, MIT.

Database access guidance for Frappe, a Python web framework used by ERPNext. It covers built-in database methods, query building, table names, raw SQL, transactions, and permission checks.

In plain words
What is it for?
Use it when writing or reviewing Frappe database queries, deciding between built-in methods and SQL, checking transaction boundaries, or separating reporting queries from business operations.
Why use it?
It helps developers choose the right way to read or change data without accidentally bypassing user permissions or putting fragile queries in the wrong part of an application.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the frappe-agent plugin — 18 skills, 18 commands shipped together

Good fit Use it when writing or reviewing Frappe database queries, deciding between built-in methods and SQL, checking transaction boundaries, or separating reporting queries from business operations.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/dkm0315/frappe-agent/frappe-sql
Install

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.

Any agent
npx skills add Dkm0315/frappe-agent --skill frappe-sql
Clone the repo
git clone --depth 1 https://github.com/Dkm0315/frappe-agent

Made for: Claude Code.

Or install frappe-agent, the plugin that ships this one along with the rest of its 18 skills, 18 commands.

Wrote 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.

agentmods badge for frappe-sql

README.md
[![agentmods](https://agentmods.dev/badge/skills/dkm0315/frappe-agent/frappe-sql.svg)](https://agentmods.dev/skills/dkm0315/frappe-agent/frappe-sql)
Your own site
<a href="https://agentmods.dev/skills/dkm0315/frappe-agent/frappe-sql"><img src="https://agentmods.dev/badge/skills/dkm0315/frappe-agent/frappe-sql.svg" alt="Measured on agentmods" height="20"></a>
Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 232 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00051 $0.00232
Opus 5 $0.00026 $0.00116
Sonnet 5 $0.00010 $0.00046
Haiku 4.5 $0.00005 $0.00023

Measured 7d ago against content hash 49cf53690a93, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

frappe-sql 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 7d 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.

skills/frappe-sql/SKILL.md · 30 lines

What it actually says

Treat SQL and ORM decisions as first-class Frappe architecture choices.

Cover:

  • frappe.db.get_list
  • frappe.db.get_all
  • frappe.db.get_value
  • frappe.db.exists
  • frappe.qb
  • frappe.db.sql
  • transaction boundaries
  • permission implications

Rules:

  • prefer Frappe-native APIs when they express the query clearly
  • treat get_all and raw SQL as deliberate choices
  • use correct tab{DocType} table naming when raw SQL is necessary
  • flag brittle or permission-blind SQL
  • distinguish reporting SQL from transactional logic

When reviewing code, explicitly state:

  • why the chosen access layer is or is not appropriate
  • whether permissions are respected or bypassed
  • whether the query belongs in a report, service, patch, or controller
Changes

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.

  1. 7d ago First seen · 30 lines · 51 tokens per session scan A 49cf53690a93

Subscribe to this mod's changes

frappe-sql is a skill published in the GitHub repository Dkm0315/frappe-agent (23 stars, last pushed yesterday), licensed MIT. It adds 51 tokens to every session and 232 once invoked, about $0.0003 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.

Related

Other skills, from other repositories