--- name: dx mysql pipe description: when user asking mysql pipe to remote host, or pipe to a remote host, then use dx command to open a tunnel. --- # Siteminder DX MySQL Pipe ## Instructions - user can ask in any format will hit this skill: - "open db pipe to " - "mysql pipe to " - "pipe to " - "pipe to " - asking user to confirm the following details: - if no port is provided, provide a default port between 7000 to 7999, make sure the port is not in use in any other background process. - must asking user to choose a . - remember which is user choosed, next time when giving options, mention this port was chosen by user. - asking user to provide a for the and remember it in cache and for future use. - if has a nickname already, then don't need ask user to provide . - can provide a short nickname for user to choose in options. - once user provide a to current , save it to cache and in future use. - dx command is available in the global node_modules folder, add it to the path before executing dx-tunnel.js. - if user dosn't have dx installed in global, use `npx @siteminder/dx` to execute the command instead of `dx`. - with dx command installed in global: ```bash dx infrastructure mysql-pipe -h -p ``` - with npx @siteminder/dx installed in global: ```bash npx @siteminder/dx infrastructure mysql-pipe -h -p ``` - show the command will be executed to the user for approval. - execute the command as a background process, should not block claude code main process. - User can terminate the pipe process by asking to stop the process. ## Examples user request without nickname: - "open db pipe to platform-dev-ppay-infrastructure.cluster-cfni24qvajia.us-west-2.rds.amazonaws.com" - "mysql pipe to platform-dev-ppay-infrastructure.cluster-cfni24qvajia.us-west-2.rds.amazonaws.com" - "pipe to platform-dev-ppay-infrastructure.cluster-cfni24qvajia.us-west-2.rds.amazonaws.com" - above examples all mean the same thing: - is platform-dev-ppay-infrastructure.cluster-cfni24qvajia.us-west-2.rds.amazonaws.com - is not provided, then ask user to pick a port between 7000 to 7999, make sure the port is not in use in any other background process. ```bash dx infrastructure mysql-pipe -h platform-dev-ppay-infrastructure.cluster-cfni24qvajia.us-west-2.rds.amazonaws.com -p 7111 ``` user request with nickname: - "open db pipe to platform-dev-ppay" - "mysql pipe to platform-dev-ppay" - "pipe to platform-dev-ppay" - above examples all mean the same thing: - is platform-dev-ppay, and should use this nickname to get the real from cache. - example: platform-dev-ppay is pointing to platform-dev-ppay-infrastructure.cluster-cfni24qvajia.us-west-2.rds.amazonaws.com - is not provided, ask user to pick a port between 7000 to 7999, make sure the port is not in use in any other background process. ```bash dx infrastructure mysql-pipe -h platform-dev-ppay-infrastructure.cluster-cfni24qvajia.us-west-2.rds.amazonaws.com -p 7111 ```