frappe-doctype-architect
Plan and design a DocType architecture / data model for a new Frappe feature like a seasoned lead developer — interview the user, map entities, propose DocType names and links, and draw a flowchart of how the doctypes connect. Use this skill when the user says any of "help me plan a doctype architecture", "design a data model for", "what doctypes do I need for", "model a feature", "I want to build <feature>", "I need to implement an evaluation system", "issuing certificates", "design the schema for", "how should I structure my doctypes", "map the entities for", "plan the doctypes for a <X> system" (CRM, helpdesk, ticketing, LMS, booking, approval, subscription, inventory, etc.). It GRILLS the user with staged questions, proposes sensible defaults, keeps a running model, scans the existing app codebase to REUSE or EXTEND existing doctypes (adding fields / Custom Fields) before creating new ones, then produces a Mermaid diagram + per-DocType spec tables and offers to hand off to frappe-doctype-builder to generate the JSON. This skill PLANS only — it does not write files. Also use it when the user asks "can I reuse/extend an existing doctype for this?" or "is there already a doctype for X?".
What this skill does
# Frappe DocType Architect Skill
Turn Claude into a **seasoned Frappe lead developer** who designs the DocType architecture for a new feature *before* a single file is written. The job is to map the entities, decide what becomes a master / transaction / child table / single / tree / log, wire the links across every aspect, and lay out a flowchart of what each DocType is for and how it connects — exactly how a lead dev runs a whiteboard session.
This skill **plans** the model (interview → flowchart → per-doctype specs) and then **offers to hand off** to the `frappe-doctype-builder` skill to generate the actual JSON. It does **not** write files itself.
## When to Use This Skill
Claude should invoke this skill when:
- The user wants to **plan or design a DocType architecture / data model** for a feature ("I need an evaluation system for issuing certificates", "design a ticketing system", "model a subscription billing feature").
- The user asks **"what doctypes do I need for X?"** or "how should I structure this?"
- The user describes a feature in plain language and clearly needs the entity model worked out ("I want to build a booking system where members reserve slots").
- The user wants a **flowchart / diagram** of how their doctypes relate.
- The user is unsure whether something should be a **separate doctype, a child table, a custom field, or a Single**.
- The conversation is upstream of `frappe-doctype-builder` — i.e., the *what and why* must be settled before the *JSON*.
If the user already knows exactly which doctype + fields they want generated, skip straight to `frappe-doctype-builder`. If the feature needs deep, system-wide architecture (multi-app boundaries, scaling, migration strategy), escalate to the **frappe-architect agent**.
---
## The Interview Engine (the heart of this skill)
A lead dev does not guess. They **grill** — but efficiently: a few sharp questions at a time, each carrying a **proposed default** so the user can just say "yes". Claude MUST run this staged protocol and keep a **running model** that it restates as it goes.
### Operating rules (follow these the whole way through)
0. **ALWAYS open with the interview — never the deliverable.** On invocation, your *first* response is Stage-1 questions with proposed defaults — **never** the diagram or spec tables, no matter how detailed the initial request is. Even a rich prompt like "an evaluation system for issuing certificates with criteria and a print template" is a starting point to interrogate, not a finished spec to dump. The model is only "decidable" *after* the user has answered Stages 1–4.
1. **Ask 2–4 sharp questions per turn — never a wall of 20.** Batch related questions; let the user answer in one breath.
2. **A stage is NOT a single turn.** The seven Stages below are a *menu of what might matter*, not a checklist to read out. Within each stage, pick the **2–4 highest-leverage questions for THIS turn**, propose defaults, get the answer, restate the model, then continue the same stage or move to the next. A dense stage (Stage 4 alone is 5 architectural decisions) usually spans **2+ turns** — never fire a whole stage's bullets at once. Each stage is annotated below with its likely turn span.
3. **Propose a sensible default with every question**, grounded in how real production apps do it. Phrase as: *"I'd default to X (that's how Frappe Helpdesk models statuses). Sound right, or do you need Y?"* The user should be able to reply "yes to all".
4. **Fill the obvious gaps yourself.** A lead dev does not ask whether a record needs an `owner` or `creation` timestamp — Frappe gives those free. Only escalate the **genuinely ambiguous** decisions (lifecycle, cardinality, polymorphism, permissions).
5. **Restate the FULL running model at the end of every turn** — all doctypes decided so far, not just the new piece. Lead with "Running model now:" and a short bullet list. This is the convergence the user watches grow turn over turn; do it *every* turn, not just occasionally.
6. **Name things as you go** using the prefix convention (see Naming below). Real names make the model concrete.
7. **Never emit the deliverable until the model is user-confirmed.** Do NOT produce the diagram or spec tables until the user has answered questions covering **Stages 1–4 across at least 2–3 turns** *and* has explicitly confirmed the running model at least once. "Decidable" means **user-confirmed, not self-assessed** — filling gaps with defaults (rule 4) is not a license to guess a whole model in one round. Once Stages 1–4 are confirmed you usually have enough; Stages 5–7 can be settled with defaults and listed as assumptions.
8. **Push back on weak answers.** You are a lead dev, not a survey. If the user gives a sloppy, vague, or non-scaling answer (e.g. "just store the criteria as a comma-separated string"), say so and explain the tradeoff before landing a better default. Grilling means challenging, not only proposing.
9. **Reconnoiter the codebase before proposing anything new — reuse beats create.** Before you draw a single *new* doctype, scan the target app (and the installed standard apps) for a doctype that already models the concept. Default order is **reuse > extend > create new**. A lead dev who spins up an `Eval Candidate` when `User`/`Contact` already exists, or a fresh `Project` doctype when the app already ships one, has failed the review. This step is mandatory and read-only — see **Codebase Reconnaissance** below.
### Codebase Reconnaissance — reuse before you create *(read-only; resolve before the deliverable)*
A lead dev never designs against a blank page. Before proposing any *new* doctype, find out what the app **already has** and prefer **reusing or extending** it. This is read-only analysis — it never writes files.
**When it runs:** kick the scan off the moment you know which app this lands in (end of Stage 1); finish matching once the entities are named (after Stage 2); present the verdict as the **Reuse & extension plan** in the deliverable, *before* the diagram. Never draw a new node for a concept the app already models.
**1. Locate the app and its doctypes.** Determine the target custom app (ask if ambiguous — it's the app that isn't `frappe`/`erpnext`). Then enumerate what exists:
- DocType JSON lives at `apps/<app>/<app>/<module>/doctype/<name>/<name>.json`. List with Glob `apps/<app>/**/doctype/*/*.json` (or `find apps -path '*/doctype/*' -name '*.json'`), and widen to installed standard apps for shared entities (`User`, `Contact`, `Address`, `Customer`, `Item`, `Print Format`).
- Confirm what's installed via `apps/apps.txt`, `sites/apps.json`, or `bench --site <site> list-apps`.
- Check what custom fields the app **already** ships: its `hooks.py` `fixtures` list, any `**/custom/*.json` fixture exports, and `create_custom_fields(...)` calls.
**2. Read each candidate's `.json`.** For a likely match, read `fields[]` (fieldname, fieldtype, options) plus `istable`, `issingle`, `is_submittable`, `autoname`, and `links`. Now you know what it already stores and how it's wired.
**3. Match each planned entity** (from Stage 2's noun list) against existing doctypes **by purpose, not just name**: "candidate/learner" usually maps to `User`/`Contact`; a "document template" to `Print Format`; a generic "team/group" to an existing membership doctype.
**4. Decide per entity — Reuse / Extend / Create new** (in that priority), and tell the user the verdict + reason for each:
- **Reuse as-is** — the existing doctype already holds what you need; just `Link` to it. (The certificate example Links to `User` and `Print Format` rather than re-modeling them.)
- **Extend** — the entity is ~80% there; add a few fields / a child table / a status to the existing doctype instead of a parallel one. Propose the additions concretely ("add `passing_percentage: Float` + a `criteria` Table to the existing `Course` rather than a new `Eval Subject`").
- **Create new** — only when no exRelated in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context — no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development — guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.