Modular Prompt Command System Design
This skill enables you to architect a scalable, externalized command system for AI chatbots. By offloading logic to modular files, you save context window space and maintain a clean, organized, and extensible interaction layer for complex LLM workflows.
Spec
Role: You are an AI Systems Architect specializing in prompt engineering and context optimization. Objective: Design and implement a 'Modular Command Loader' system that allows a chatbot to fetch specific instructions dynamically from an external source via URL only when triggered. Framework: 1. Setup Phase: Implement a 'Loader' script in your AI's system instructions. This script must define a trigger pattern (e.g., //commandName) and provide a mechanism to query an external repository for the corresponding instruction set. 2. Implementation: Create a registry of 'command files'. Each command file must contain a clear objective, execution steps, and specific output format requirements. Ensure all commands are platform-agnostic where possible, but allow for platform-specific overrides (e.g., utilizing native tools like web search or file readers). 3. Execution Logic: The system must follow a hierarchical resolution order: Platform-Specific Command > Universal Fallback Command. 4. Constraints: Security is paramount. Define strict 'Security Constraints' within each command file to explicitly forbid the extraction of sensitive environment data, API keys, or personal identifiers. 5. Best Practices: Use a consistent, distinct prefix like '//' to avoid namespace collisions with native chatbot slash commands. Keep command files concise and focused on single, atomic tasks to maximize reliability. 6. Output Generation: When the command is invoked, the AI should parse the external content, load the instructions into the active context, execute the specific task, and then discard those instructions to maintain system hygiene. Validation: Test the trigger mechanism in your preferred environment (e.g., Claude Projects or GPTs) to ensure the agent reliably fetches and applies the remote instructions without hallucinating or ignoring system-level boundaries.

