Frappe Agent Validator logo

Frappe Agent Validator

Organization
Impertio-Studio
frappe-agent-validator

Use when reviewing or validating Frappe/ERPNext code against best practices and common pitfalls. Checks generated code before deployment, validates against all 61 frappe-* skills, catches v16 patterns (extend_doctype_class, type annotations), validates ops patterns (bench commands, deployment), and generates correction reports. Keywords: review code, check script, validate deployment, find bugs, code quality, check my code, is this correct, code review, before deploying, best practices check.

Overview

PublisherImpertio-Studio
RepositoryFrappe_Claude_Skill_Package
Skill namefrappe-agent-validator
Stars
180
Forks
53
Bundled files
3
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 3 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by Impertio-Studio on GitHub. Read the source before you install it.

Installation

Install the Frappe Agent Validator AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Impertio-Studio/Frappe_Claude_Skill_Package.git /tmp/Frappe_Claude_Skill_Package
mkdir -p .claude/skills
cp -r /tmp/Frappe_Claude_Skill_Package/skills/source/agents/frappe-agent-validator .claude/skills/frappe-agent-validator
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Frappe Agent Validator in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Frappe Agent Validator on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Frappe Agent Validator is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Frappe Code Validator Agent

Validates Frappe/ERPNext code against the complete 61-skill knowledge base, catching errors BEFORE deployment.

Purpose: Catch errors before deployment, not after

When to Use This Agent

CODE VALIDATION TRIGGERS
|
+-- Code has been generated and needs review
|   "Check this Server Script before I save it"
|   --> USE THIS AGENT
|
+-- Code is causing errors
|   "Why isn't this working?"
|   --> USE THIS AGENT
|
+-- Pre-deployment validation
|   "Is this production-ready?"
|   --> USE THIS AGENT
|
+-- Code review for best practices
|   "Can this be improved?"
|   --> USE THIS AGENT
|
+-- Ops/deployment validation
|   "Is my bench setup correct?"
|   --> USE THIS AGENT

Validation Workflow

STEP 1: IDENTIFY CODE TYPE
  Client Script | Server Script | Controller | hooks.py |
  Jinja | Whitelisted | Bench/Ops | DocType JSON

STEP 2: RUN TYPE-SPECIFIC CHECKS
  Apply checklist for identified code type

STEP 3: CHECK UNIVERSAL RULES
  Error handling | Security | Performance | User feedback

STEP 4: VERIFY VERSION COMPATIBILITY
  v14/v15/v16 features | Deprecated patterns

STEP 5: VALIDATE AGAINST SKILL CATALOG
  Cross-reference with relevant frappe-* skills

STEP 6: GENERATE VALIDATION REPORT
  Critical errors | Warnings | Suggestions | Corrected code

See references/workflow.md for detailed steps.

Critical Checks by Code Type

Server Script Checks

CheckSeverityPatternFix
Import statementsFATALimport X or from X import YUse frappe.utils.X() directly
Wrong doc variableFATALself.field or document.fieldUse doc.field
Wrong event for purposeERRORValidation code in on_updateMove to validate event
try/except blocksWARNINGtry: ... except:Use frappe.throw() for validation
No null checksWARNINGdoc.field.lower()Add if doc.field: guard

Client Script Checks

CheckSeverityPatternFix
Server-side API callsFATALfrappe.db.get_value()Use frappe.call()
Missing async handlingFATALlet x = frappe.call()Use callback or async/await
No refresh after set_valueERRORfrm.set_value() aloneAdd frm.refresh_field()
Using cur_frmWARNINGcur_frm.doc.fieldUse frm parameter
No form state checkWARNINGMissing __islocal/docstatusAdd state guards

Controller Checks

CheckSeverityPatternFix
self.* in on_updateFATALself.field = X in on_updateUse self.db_set()
Circular saveFATALself.save() in lifecycle hookRemove self.save()
Missing super()ERROROverride without super()Add super().method()
v16 extend_doctype_classERRORMissing super() in mixinALWAYS call super() first
No type annotationsSUGGESTIONMissing type hints (v16)Add type annotations

hooks.py Checks

CheckSeverityPatternFix
Invalid Python syntaxFATALSyntax errorsFix dict/list structure
Wrong event namesFATALTypo in event nameUse correct event names
Invalid function pathsFATALWrong dotted pathVerify path exists
v16-only hooks on v14/v15ERRORextend_doctype_classUse doc_events instead
Missing required_appsWARNINGNo dependency declarationAdd all dependencies

Ops/Bench Checks

CheckSeverityPatternFix
No migrate after hooksFATALhooks.py changed, no migrateRun bench migrate
Wrong bench command syntaxERRORIncorrect CLI argsCheck frappe-ops-bench
Missing backup before upgradeERRORUpgrade without backupALWAYS backup first
Production without supervisorWARNINGNo process managerUse supervisor/systemd
No SSL in productionWARNINGHTTP-only deploymentConfigure SSL/TLS

DocType JSON Checks

CheckSeverityPatternFix
Missing mandatory fieldsERRORNo primary identifierAdd name or autoname
Duplicate fieldnamesFATALSame fieldname twiceUse unique fieldnames
Wrong fieldtype for dataWARNINGText for short valuesUse Data/Small Text
No permissions definedWARNINGEmpty permission listAdd role permissions

v16 Specific Validations

extend_doctype_class Pattern

python
# VALIDATE: Mixin class MUST call super()
class CustomSalesInvoice(SalesInvoice):
    def validate(self):
        super().validate()       # REQUIRED - never skip
        self.custom_validation()

    def on_submit(self):
        super().on_submit()      # REQUIRED - never skip
        self.custom_on_submit()

Type Annotations (v16 best practice)

python
# v16 recommended pattern
def get_customer_balance(customer: str) -> float:
    ...

# Validate: type hints on public API methods
@frappe.whitelist()
def process_order(order_name: str, action: str = "approve") -> dict:
    ...

Data Masking (v16)

python
# Validate: sensitive fields should use data masking
# Check if PII fields have mask_with configured in DocType JSON

Universal Validation Rules

Security Checks (ALL code types)

CheckSeverityDescription
SQL InjectionCRITICALRaw user input in SQL
Permission bypassCRITICALMissing permission checks
XSS vulnerabilityHIGHUnescaped user input in HTML
Sensitive data exposureHIGHLogging passwords/tokens
Hardcoded credentialsCRITICALAPI keys in source code

Performance Checks (ALL code types)

CheckSeverityDescription
Query in loopHIGHfrappe.db.* inside for loop
Unbounded queryMEDIUMSELECT without LIMIT
Unnecessary get_docLOWget_doc when get_value suffices
Missing indexMEDIUMFilter on non-indexed field
No batch commitHIGHCommit per record in bulk ops

Error Handling Checks (ALL code types)

CheckSeverityDescription
Silent failuresHIGHexcept: pass without logging
Missing user feedbackMEDIUMErrors not shown to user
Generic error messagesLOW"An error occurred"
No rollback on failureHIGHPartial data on error

Validation Report Format

ALWAYS generate reports in this format:

markdown
## Code Validation Report

### Code Type: [type]
### Target: [DocType / App / File]
### Event/Trigger: [if applicable]

### CRITICAL ERRORS (Must Fix)
| # | Line | Issue | Fix |
|---|------|-------|-----|

### WARNINGS (Should Fix)
| # | Line | Issue | Recommendation |
|---|------|-------|----------------|

### SUGGESTIONS (Nice to Have)
| # | Line | Suggestion |
|---|------|------------|

### Corrected Code
[If critical errors found, provide corrected version]

### Version Compatibility
| Version | Status | Notes |
|---------|--------|-------|
| v14 | [status] | |
| v15 | [status] | |
| v16 | [status] | |

### Referenced Skills
- frappe-skill-name: [what was validated against]

Validation Depth Levels

LevelChecksUse When
QuickFatal errors onlyInitial scan
Standard+ Warnings + SecurityPre-deployment (DEFAULT)
Deep+ Suggestions + Performance + OpsProduction review

Skill Catalog Cross-Reference

This validator validates against ALL 61 frappe-* skills:

Syntax Validation (11 skills)

frappe-syntax-clientscripts, frappe-syntax-serverscripts, frappe-syntax-controllers, frappe-syntax-hooks, frappe-syntax-hooks-events, frappe-syntax-whitelisted, frappe-syntax-jinja, frappe-syntax-scheduler, frappe-syntax-customapp, frappe-syntax-doctypes, frappe-syntax-reports

Implementation Validation (12 skills)

frappe-impl-clientscripts, frappe-impl-serverscripts, frappe-impl-controllers, frappe-impl-hooks, frappe-impl-whitelisted, frappe-impl-jinja, frappe-impl-scheduler, frappe-impl-customapp, frappe-impl-reports, frappe-impl-workflow, frappe-impl-website, frappe-impl-ui-components, frappe-impl-integrations

Error Pattern Validation (7 skills)

frappe-errors-clientscripts, frappe-errors-serverscripts, frappe-errors-controllers, frappe-errors-hooks, frappe-errors-api, frappe-errors-permissions, frappe-errors-database

Core Pattern Validation (7 skills)

frappe-core-database, frappe-core-permissions, frappe-core-api, frappe-core-workflow, frappe-core-notifications, frappe-core-files, frappe-core-cache

Ops Validation (8 skills)

frappe-ops-bench, frappe-ops-deployment, frappe-ops-backup, frappe-ops-performance, frappe-ops-upgrades, frappe-ops-cloud, frappe-ops-app-lifecycle, frappe-ops-frontend-build

Testing Validation (2 skills)

frappe-testing-unit, frappe-testing-cicd

Quick Validation Commands

Server Script: 5-point check

  1. Any import statements? --> FATAL
  2. Any self. references? --> FATAL (use doc.)
  3. Any try/except? --> WARNING (usually wrong)
  4. Uses frappe.throw() for validation? --> GOOD
  5. Uses doc.field for access? --> GOOD

Client Script: 5-point check

  1. Any frappe.db.* calls? --> FATAL
  2. Any frappe.get_doc() calls? --> FATAL
  3. frappe.call() without callback? --> FATAL
  4. Uses frm.doc.field for access? --> GOOD
  5. Uses frm.refresh_field() after changes? --> GOOD

Controller: 5-point check

  1. Modifying self.* in on_update? --> FATAL
  2. Missing super().method() calls? --> ERROR
  3. self.save() in lifecycle hook? --> FATAL
  4. Imports at top of file? --> GOOD
  5. Error handling for external calls? --> GOOD

hooks.py: 5-point check

  1. Valid Python syntax? --> Check
  2. Function paths exist? --> Check
  3. v16-only hooks marked? --> Check
  4. required_apps complete? --> Check
  5. Fixture filters present? --> Check

Bench/Ops: 5-point check

  1. bench migrate after changes? --> REQUIRED
  2. Backup before destructive ops? --> REQUIRED
  3. Scheduler enabled? --> Check
  4. Workers running? --> Check
  5. SSL configured (production)? --> Check

See references/checklists.md for complete checklists. See references/examples.md for validation examples.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Frappe Agent Validator AI skill do?

Use when reviewing or validating Frappe/ERPNext code against best practices and common pitfalls. Checks generated code before deployment, validates against all 61 frappe-* skills, catches v16 patterns (extend_doctype_class, type annotations), validates ops patterns (bench commands, deployment), and generates correction reports. Keywords: review code, check script, validate deployment, find bugs, code quality, check my code, is this correct, code review, before deploying, best practices check.

Why use Frappe Agent Validator on TypingMind?

Because you install it once and use it with any model. Frappe Agent Validator is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Frappe Agent Validator in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/Impertio-Studio/Frappe_Claude_Skill_Package/tree/main/skills/source/agents/frappe-agent-validator. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Frappe Agent Validator?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Frappe Agent Validator?

As many as you like. As long as a model supports skills, you can use Frappe Agent Validator with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Frappe Agent Validator AI skill free?

Yes. It is published on GitHub by Impertio-Studio under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇