$npx -y skills add lubusIN/frappe-skills --skill frappe-project-triageDetect Frappe project type, installed apps, version, and tooling. Use as the first step when working on any Frappe/ERPNext codebase to understand the project structure before making changes.
| 1 | # Frappe Project Triage |
| 2 | |
| 3 | Quickly analyze a Frappe project to determine its type, installed apps, version, and available tooling. |
| 4 | |
| 5 | ## When to use |
| 6 | |
| 7 | - First step when opening a new Frappe project |
| 8 | - Before making any code changes to understand the codebase |
| 9 | - When debugging to determine which apps/versions are involved |
| 10 | - To identify the development environment (Bench vs Frappe Manager) |
| 11 | |
| 12 | ## Inputs required |
| 13 | |
| 14 | - Project root path (where `apps/`, `sites/`, or app code lives) |
| 15 | - Access to run shell commands (for version checks) |
| 16 | |
| 17 | ## Procedure |
| 18 | |
| 19 | ### 0) Identify project structure |
| 20 | |
| 21 | Check for these patterns: |
| 22 | |
| 23 | | Pattern | Project Type | |
| 24 | |---------|--------------| |
| 25 | | `apps/` + `sites/` directories | Bench installation | |
| 26 | | `docker-compose.yml` with frappe | Frappe Manager site | |
| 27 | | `pyproject.toml` or `setup.py` with frappe | Standalone app | |
| 28 | | `doctype/` directory | Inside an app module | |
| 29 | |
| 30 | ### 1) Detect installed apps |
| 31 | |
| 32 | ```bash |
| 33 | # Inside Bench/FM shell |
| 34 | bench --site <site> list-apps |
| 35 | |
| 36 | # Or check apps directory |
| 37 | ls apps/ |
| 38 | ``` |
| 39 | |
| 40 | ### 2) Check Frappe version |
| 41 | |
| 42 | ```bash |
| 43 | # Inside Bench/FM shell |
| 44 | bench version |
| 45 | |
| 46 | # Or check from Python |
| 47 | bench --site <site> console |
| 48 | >>> frappe.__version__ |
| 49 | ``` |
| 50 | |
| 51 | ### 3) Identify tooling |
| 52 | |
| 53 | | File/Directory | Tooling | |
| 54 | |----------------|---------| |
| 55 | | `Procfile` | Standard bench | |
| 56 | | `docker-compose.yml` | Docker/FM | |
| 57 | | `cypress/` | UI testing available | |
| 58 | | `.github/workflows/` | CI configured | |
| 59 | | `package.json` with `@frappe/*` | JS build tooling | |
| 60 | |
| 61 | ### 4) Check development mode |
| 62 | |
| 63 | ```bash |
| 64 | # Check site config |
| 65 | bench --site <site> console |
| 66 | >>> frappe.conf.developer_mode |
| 67 | ``` |
| 68 | |
| 69 | ## Verification |
| 70 | |
| 71 | - [ ] Project type identified (bench/FM/standalone app) |
| 72 | - [ ] Installed apps listed |
| 73 | - [ ] Frappe version known |
| 74 | - [ ] Development mode status confirmed |
| 75 | - [ ] Available tooling documented |
| 76 | |
| 77 | ## Failure modes / debugging |
| 78 | |
| 79 | - **No site found**: May be inside an app directory, navigate to bench root |
| 80 | - **bench command not found**: Not in bench environment, use `fm shell` or activate venv |
| 81 | - **Permission errors**: Check if running as correct user |
| 82 | |
| 83 | ## Escalation |
| 84 | |
| 85 | If project structure is unclear: |
| 86 | 1. Look for `hooks.py` to identify app root |
| 87 | 2. Look for `sites/common_site_config.json` for bench root |
| 88 | 3. Check git remote for app repository identification |
| 89 | |
| 90 | ## Output format |
| 91 | |
| 92 | After triage, document: |
| 93 | ``` |
| 94 | Project Type: [bench|frappe-manager|standalone-app] |
| 95 | Frappe Version: X.Y.Z |
| 96 | Installed Apps: [list] |
| 97 | Developer Mode: [yes|no] |
| 98 | Tooling: [list] |
| 99 | Site Name: <site> |
| 100 | ``` |
| 101 | |
| 102 | Use this output to route to the appropriate skill: |
| 103 | - DocType work → `frappe-doctype-development` |
| 104 | - API work → `frappe-api-development` |
| 105 | - Testing → `frappe-testing` |
| 106 | - Enterprise patterns → `frappe-enterprise-patterns` |
| 107 | |
| 108 | ## Guardrails |
| 109 | |
| 110 | - **Never modify code** before completing triage - understand the project first |
| 111 | - **Check for custom apps** that may override standard behavior |
| 112 | - **Verify site exists** before running site-specific commands |
| 113 | - **Check developer_mode** before making schema changes (required for DocType modifications) |
| 114 | - **Note Node.js version** - frontend builds require compatible Node (typically 18+ for v15) |
| 115 | |
| 116 | ## Common Mistakes |
| 117 | |
| 118 | | Mistake | Why It Fails | Fix | |
| 119 | |---------|--------------|-----| |
| 120 | | Running `bench migrate` without site | Affects wrong/default site | Always use `--site sitename` | |
| 121 | | Assuming ERPNext is installed | Import errors, missing DocTypes | Check `list-apps` output first | |
| 122 | | Missing FM shell context | bench commands not found | Use `fm shell sitename` first | |
| 123 | | Wrong directory level | Commands fail silently | Navigate to bench root (where `apps/` exists) | |
| 124 | | Ignoring custom app overrides | Unexpected behavior | Check hooks.py for overrides | |
| 125 | | Not checking Python version | Syntax/compatibility errors | Verify Python >= 3.10 for v15+ | |