From dev-assistant
/etendo:context — Detect and manage development context
npx claudepluginhub etendosoftware/etendo_claude_marketplace --plugin dev-assistantThis skill uses the workspace's default tool permissions.
**Arguments:** `$ARGUMENTS` (optional: `set module=com.x.y`, `reset`, blank = show)
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Guides agent creation for Claude Code plugins with file templates, frontmatter specs (name, description, model), triggering examples, system prompts, and best practices.
Arguments: $ARGUMENTS (optional: set module=com.x.y, reset, blank = show)
First, read skills/etendo-_guidelines/SKILL.md and skills/etendo-_context/SKILL.md to understand how context resolution works.
For infrastructure modes (Source vs JAR, Docker flags, DB connection), read references/infrastructure-modes.md.
Then perform the following steps:
.etendo/context.json and load it if it existsgradle.properties -- extract: bbdd.user, bbdd.password, bbdd.sid, bbdd.port, context.name, and all docker_* propertiesbuild.gradle -- determine Source mode vs JAR modemodules/com.x.y.z/ path -- if so, extract the module packageset module=com.x.y.z -> resolve the module's dbPrefix from DB (see below), update .etendo/context.json, display confirmationreset -> delete .etendo/context.json, display "Context cleared"set module=...)To resolve dbPrefix when setting a module:
docker exec -i etendo-db-1 psql -U {bbdd.user} -d {bbdd.sid} -t -c \
"SELECT p.name FROM ad_module_dbprefix p JOIN ad_module m ON m.ad_module_id = p.ad_module_id WHERE m.javapackage = '{module}';"
(Adjust for local DB if docker_com.etendoerp.docker_db is not true)
Present a clear, structured summary:
===========================================
Etendo Dev Context
===========================================
Core mode: [Source | JAR]
Core version: [from build.gradle]
Infrastructure:
Database: [Docker (etendo-db-1) | Local]
Tomcat: [Docker (etendo-tomcat-1) | Local]
EtendoRX: [Docker | Not configured]
Copilot: [Docker | Not configured]
DB connection:
User: {bbdd.user}
Database: {bbdd.sid}
Port: {bbdd.port}
Etendo URL: http://localhost:8080/{context.name}
Active module: [com.x.y.z | ! Not set]
DB prefix: [PREFIX | -]
Module path: [modules/com.x.y.z | -]
Context source: [.etendo/context.json | CWD auto-detect | Not set]
===========================================
/etendo:context set module=com.mycompany.mymodule to set the active module"/etendo:* commands know which module to target"docker ps shows the container is not running: "! DB container is not running. Run ./gradlew resources.up or docker start etendo-db-1"