Currently, the LLM reads the contents of bash scripts from SKILL.md entirely into context, and executes them remotely using generic commands. This breaks down if a skill involves complex file directories (like 1000 lines of python configuration, custom shell scripts, etc.). Since Cortex utilizes a powerful bi-directional gRPC file synchronizer that maps a specific server-side Session directory (/tmp/cortex-sync/{session_id}/) directly down to the Client Node Workers, we can dynamically expose tools directly to the Node's active filesystem by symlinking the Skill's folder.
When a session is active, dynamically mount any active File-System Skills (e.g. weather_api) straight into the session workspace directory (.skills/). Because of the background mesh_file_explorer file syncing loop, any symlinked .skills folder on the Server will automatically be evaluated and populated down to the running Node Worker. This allows the AI to execute bash .skills/weather_api/run.sh natively without loading any code into its context!
The AI Server initializes the file sync workspace folder whenever a session starts or connects:
app/ai-hub/app/core/services/session.py or wherever session folders are mapped (/tmp/cortex-sync/{session_id}).DATA_DIR/skills/ directory holds all physical skills./tmp/cortex-sync/{session_id}/..skills.ToolService.get_available_tools(...) for the given User/Session.DATA_DIR/skills/{feature}/{skill_id} to /tmp/cortex-sync/{session_id}/.skills/{skill_id}..skills in Git/History tracking (Optional).skills/ BACK up to the original physical folder if the AI ruins them. This is critical for security.os.symlink) point to the read-only or original folder. If the Node modifies it, it modifies the original tool!os.walk will follow symlinks and sync the physical files down to the remote Node.file_sync daemon will write the changes back to the symlink, modifying the global tool!.skills/ into the ignored_paths constant within app/core/grpc/shared_core/ignore.py ON THE UPSTREAM route (Node -> Server) so that changes aren't persisted backward..skills/ Execution Logic into the System PromptSummary: ... or the | Parameters |.tool.py so that instead of saying "Call read_skill_artifact to see instructions", the system prompt explicitly tells the AI:
This skill is natively mapped to your workspace.
You can execute it directly on the node via: `bash .skills/{skill_id}/{executable}`.Since the .skills/ directory is bi-directionally synced between the true File System and the Node Workspace:
mesh_file_explorer to read any script located inside .skills/./app/data/skills/ folder seamlessly. The AI becomes capable of hot-fixing its own execution scripts permanently for all future sessions!run.sh or main.py directly alongside SKILL.md in the VSCode IDE UI.mesh_terminal_control.By symlinking DATA_DIR/skills/ -> /tmp/cortex-sync/{session_id}/.skills/, the gRPC network will sync the scripts as raw text files across the internet directly into the Client Node's OS container. The Agent gets zero context bloat, executing vast tools effortlessly, and gains the absolute power to spontaneously view, trace, and self-improve its own capabilities across sessions!