Install
$ agentstack add skill-venkateshvenki404224-frappe-apps-manager-frappe-fixture-creator ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
Frappe Fixture Creator
Generate fixture JSON files for test data, master data, and initial site configuration in Frappe applications.
Global Rules
These Frappe conventions apply to everything this skill generates, and override any conflicting example below.
- Bench commands: use bare
bench(never./env/bin/benchor a full path). Always pass--siteexplicitly — never run a barebench migrate/bench run-tests. Runbench startin the background and only if it isn't already running. Don't run discovery commands (which bench,bench --version). - DocType files live at
apps////doctype//.json— the app name appears twice (directory + Python package) — with an empty__init__.pyalongside. Nevermkdirthe folder; write the JSON and runbench --site migrateto create the structure. Don't addcreation,modified,owner,modified_by, ordocstatusas fields — Frappe manages them. - Database & ORM: prefer
frappe.qb.get_query()over rawfrappe.db.sql(). Usefrappe.db.get_all()for server logic (ignores permissions) andfrappe.db.get_list()for user-facing APIs (enforces them). Never usefrappe.db.set_value()on a field with validation or lifecycle logic — load the doc anddoc.save()so controller hooks run. Batch-fetch related records; never query inside a loop (N+1). - Never call
frappe.db.commit()in controllers, request handlers, background jobs, or patches — Frappe auto-commits on success and rolls back on uncaught errors. Flush manually only to make a write visible to a subsequentfrappe.enqueue()(or passenqueue_after_commit=True). - Permissions & APIs: put permission checks inside controller methods (enforced on every call path), not in API wrappers. Type-hint every
@frappe.whitelist()parameter so Frappe validates and casts it, and passmethods=[...]to pin the HTTP verb.
When to Use This Skill
Claude should invoke this skill when:
- User wants to create test fixtures
- User needs master data setup
- User mentions fixtures, test data, or setup data
- User wants repeatable site setup
- User needs demo or sample data
Capabilities
1. Test Fixture Generation
Item Fixtures:
[
{
"doctype": "Item",
"item_code": "_Test Item",
"item_name": "Test Item",
"item_group": "Products",
"stock_uom": "Nos",
"is_stock_item": 1,
"is_purchase_item": 1,
"is_sales_item": 1,
"opening_stock": 100,
"valuation_rate": 100,
"standard_rate": 150
},
{
"doctype": "Item",
"item_code": "_Test Service Item",
"item_name": "Test Service",
"item_group": "Services",
"stock_uom": "Nos",
"is_stock_item": 0,
"is_sales_item": 1,
"standard_rate": 500
}
]
2. Hierarchical Fixtures
Customer Group Tree:
[
{
"doctype": "Customer Group",
"customer_group_name": "All Customer Groups",
"is_group": 1
},
{
"doctype": "Customer Group",
"customer_group_name": "Commercial",
"parent_customer_group": "All Customer Groups",
"is_group": 0
},
{
"doctype": "Customer Group",
"customer_group_name": "Individual",
"parent_customer_group": "All Customer Groups",
"is_group": 0
}
]
3. Import Fixture
Load Fixture in App:
# In app setup
def before_install():
"""Install fixtures before site setup"""
from frappe.core.page.data_import_tool.data_import_tool import import_doc
import_doc('my_app/fixtures/item_groups.json')
import_doc('my_app/fixtures/territories.json')
4. Hooks-based fixtures (preferred)
Declare a fixtures list in the app's hooks.py (apps///hooks.py). On bench --site export-fixtures --app , Frappe writes each entry's records to apps///fixtures/, and reimports them on bench --site migrate / install.
# hooks.py
fixtures = [
"Item Group",
{"dt": "Role", "filters": [["name", "in", ["Expense Manager", "Expense User"]]]},
]
Export:
bench --site export-fixtures --app
CRITICAL — always filter Custom Field and Property Setter to your own records. A bare "Custom Field" in fixtures exports EVERY customization on the site, including those owned by other apps and by the user. Filter to the fieldnames your app introduces:
# hooks.py
fixtures = [
{"dt": "Custom Field", "filters": [["fieldname", "in", ["my_field_1", "my_field_2"]]]},
{"dt": "Property Setter", "filters": [["name", "in", ["Sales Invoice-my_field_1-hidden"]]]},
]
5. Extend a DocType you don't own
To add fields to a DocType owned by another app (e.g. ERPNext's Sales Invoice), never fork its JSON. Add a Custom Field (and a Property Setter to tweak existing properties) from an after_install hook:
# hooks.py
after_install = "my_app.setup.after_install"
# my_app/setup.py
from frappe.custom.doctype.custom_field.custom_field import create_custom_fields
def after_install():
create_custom_fields({
"Sales Invoice": [
{
"fieldname": "my_field_1",
"label": "My Field",
"fieldtype": "Data",
"insert_after": "customer",
},
],
})
Then export those Custom Fields as filtered fixtures (see section 4) so they ship with the app.
Related Skills
frappe-doctype-architectdecides — in its reuse/extend plan — when a DocType should be extended with a Custom Field fixture (the section 5 pattern) versus created fresh. Implement fixtures from that plan.
References
Frappe Fixture Patterns:
- Install Fixtures: https://github.com/frappe/frappe/blob/develop/frappe/core/page/dataimporttool/dataimporttool.py
- ERPNext Fixtures: https://github.com/frappe/erpnext/tree/develop/erpnext/setup/fixtures
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: Venkateshvenki404224
- Source: Venkateshvenki404224/frappe-apps-manager
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.