Siteminder DX Tunnel
Instructions
- user can ask in any format will hit this skill:
- "open tunnel to "
- "tunnel to "
- "tunnel "
- "connect to "
- asking user to provide the following details
- allways asking user to provider the , default value is 80.
- allways asking user to provider the , default value pick between 8000 to 8999, make sure the port is not in use in any other background process.
- required arguments: , ,
- while executing bash script, make sure make it as a background process, should not block claude code main process.
- 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.
- command for executing the script:
dx infrastructure tunnel --target_host <target_host> --target_port <target_port> --local_port <local_port>
- if error catched from stdout or stderr, then return the error message to the user.
- once user asking to stop the tunnel process, then stop the process and return the result to the user.
Examples
Example for first time open tunnel and no nickname.
- user request: "open tunnel to demand-manager-api.platform-dev"
- meaning:
- is demand-manager-api.platform-dev
- is not provided, default is 80
- is not provided, should be selected between 8000 to 8999, make sure the port is not in used in any other background process.
- command:
dx infrastructure tunnel --target_host demand-manager-api.platform-dev --target_port 80 --local_port 8080
Example for first time and second time open tunnel with nickname.
- user request: "open tunnel to demand-manager-api.platform-dev"
- meaning:
- is demand-manager-api.platform-dev, because nickname is pointing to this host.
- is not provided, default is 80
- is not provided, usinng this plugin default to select a port between 8000 to 8999, make sure the port is not in use.
- then command:
dx infrastructure tunnel --target_host demand-manager-api.platform-dev --target_port 80 --local_port 8080
Example for user who dosn't have dx installed in global
- user request: "open tunnel to demand-manager-api.platform-dev"
- meaning:
- is demand-manager-api.platform-dev
- is not provided, default is 80
- is not provided, usinng this plugin default to select a port between 8000 to 8999, make sure the port is not in use.
- before executing,because user doesn't have
dx installed in global, so this will fall back to use npx @siteminder/dx to execute the command instead of dx.
- then the command should be:
npx @siteminder/dx infrastructure tunnel --target_host demand-manager-api.platform-dev --target_port 80 --local_port 8080
Example for stop the tunnel process.
- user request: "stop demand-manager-api.platform-dev"
- then stop that background process and return the result to the user.
1---2name: dx-tunnel3description: use to open a tunnel to a remote host using the dx command4---5
6# Siteminder DX Tunnel
7
8## Instructions
9- user can ask in any format will hit this skill:
10 - "open tunnel to <target_host>"
11 - "tunnel to <target_host>"
12 - "tunnel <target_host>"
13 - "connect to <target_host>"
14- asking user to provide the following details
15 - allways asking user to provider the <target_port>, default value is 80.
16 - allways asking user to provider the <local_port>, default value pick between 8000 to 8999, make sure the port is not in use in any other background process.
17- required arguments: <target_host>, <target_port>, <local_port>
18- while executing bash script, make sure make it as a background process, should not block claude code main process.
19- dx command is available in the global node_modules folder, add it to the path before executing dx-tunnel.js.
20- if user dosn't have dx installed in global, use `npx @siteminder/dx` to execute the command instead of `dx`.
21- command for executing the script:
22```bash
23dx infrastructure tunnel --target_host <target_host> --target_port <target_port> --local_port <local_port>
24```
25- if error catched from stdout or stderr, then return the error message to the user.
26- once user asking to stop the tunnel process, then stop the process and return the result to the user.
27
28## Examples
29
30#### Example for first time open tunnel and no nickname.
31- user request: "open tunnel to demand-manager-api.platform-dev"
32- meaning:
33 - <target_host> is demand-manager-api.platform-dev
34 - <target_port> is not provided, default is 80
35 - <local_port> is not provided, should be selected between 8000 to 8999, make sure the port is not in used in any other background process.
36- command:
37```bash
38dx infrastructure tunnel --target_host demand-manager-api.platform-dev --target_port 80 --local_port 8080
39```
40
41#### Example for first time and second time open tunnel with nickname.
42- user request: "open tunnel to demand-manager-api.platform-dev"
43- meaning:
44 - <target_host> is demand-manager-api.platform-dev, because nickname is pointing to this host.
45 - <target_port> is not provided, default is 80
46 - <local_port> is not provided, usinng this plugin default to select a port between 8000 to 8999, make sure the port is not in use.
47- then command:
48```bash
49 dx infrastructure tunnel --target_host demand-manager-api.platform-dev --target_port 80 --local_port 8080
50```
51
52#### Example for user who dosn't have dx installed in global
53- user request: "open tunnel to demand-manager-api.platform-dev"
54- meaning:
55 - <target_host> is demand-manager-api.platform-dev
56 - <target_port> is not provided, default is 80
57 - <local_port> is not provided, usinng this plugin default to select a port between 8000 to 8999, make sure the port is not in use.
58- before executing,because user doesn't have `dx` installed in global, so this will fall back to use `npx @siteminder/dx` to execute the command instead of `dx`.
59- then the command should be:
60```bash
61npx @siteminder/dx infrastructure tunnel --target_host demand-manager-api.platform-dev --target_port 80 --local_port 8080
62```
63
64#### Example for stop the tunnel process.
65- user request: "stop demand-manager-api.platform-dev"
66- then stop that background process and return the result to the user.