graph TD
A[Start: Receive Chatbot Specification] --> B[Prepare Prompt Template]
B --> C[Generate Base Requirements]
B --> D[Generate UI Requirements]
B --> E[Generate Function Requirements]
C --> F[Define HTML Elements]
C --> G[Define Event Handlers]
D --> H[Chat Window Layout]
D --> I[Icon Toggle Logic]
E --> J[User Input Processing]
E --> K[AI Response Handling]
E --> L[Config Data Integration]
F & G & H & I & J & K & L --> M[Compile Full Prompt]
M --> N[Pass to Skill #223]
N --> O[Generate JavaScript Code]
O --> P[Error Check Generated Code]
P --> Q{Code Valid?}
Q -->|Yes| R[Output chatbot.js]
Q -->|No| N
R --> S[End: Return Final Code]