File contents Inbound to EchoSkillBot
sequenceDiagram
participant ConsumerController as Consumer's Controller
participant SkillClient as Consumer's Skill Client
Note over SkillClient: SimpleRootBot
participant EchoBotController as Echo BotController
participant Connector
participant Adapter
participant JwtTokenValidation
participant AppCredentials
participant AdalAuthenticator
participant TurnContext
participant Middleware
participant SkillActivityHandler as Skill Activity Handler
participant SkillMainBotLogic as Skill's Main Bot Logic
Note over SkillActivityHandler, SkillMainBotLogic: Skill Bot derives from ActivityHandler
Note left of SkillClient: Inbound HTTP POST
Note left of SkillClient: Message "skill"
SkillClient ->> EchoBotController: HTTP POST to ".../api/messages"
activate SkillClient
activate EchoBotController
EchoBotController ->> Adapter: ProcessAsync()
activate EchoBotController
activate Adapter
Note over Adapter: Deserialize Activity
Adapter ->> Adapter: ProcessActivity()
activate Adapter
Adapter ->> JwtTokenValidation: AuthenticateRequest()
activate Adapter
activate JwtTokenValidation
JwtTokenValidation ->> JwtTokenValidation: ValidateAuthHeader()
activate JwtTokenValidation
JwtTokenValidation ->> JwtTokenValidation: AuthenticateToken()
JwtTokenValidation ->> JwtTokenValidation: ValidateClaimsAsync()
JwtTokenValidation -->> JwtTokenValidation: return ClaimsIdentity
deactivate JwtTokenValidation
JwtTokenValidation ->> AppCredentials: TrustServiceUrl()
activate JwtTokenValidation
activate AppCredentials
AppCredentials -->> JwtTokenValidation: Host of ServiceUrl added to trusted hosts
deactivate AppCredentials
deactivate JwtTokenValidation
JwtTokenValidation -->> Adapter: return Claimsidentity
deactivate JwtTokenValidation
deactivate Adapter
Adapter ->> Adapter: ProcessActivityAsync()
activate Adapter
Note over Adapter: Create TurnContext
Adapter ->> TurnContext: Add BotIdentity (ClaimsIdentity) and BotCallbackHandler to TurnState
activate Adapter
activate TurnContext
TurnContext -->> Adapter:
deactivate TurnContext
deactivate Adapter
Adapter ->> Adapter: CreateConnectorClientAsync()
activate Adapter
Note over Adapter, JwtTokenValidation: Set botAppId to "aud" or "appId" claim
opt If botAppId isSkillClaim
Note over Adapter, JwtTokenValidation: Set scope to Consumer's AppId
Adapter ->> JwtTokenValidation: GetAppIdFromClaims()
activate Adapter
activate JwtTokenValidation
JwtTokenValidation -->> Adapter: return Consumer's AppId
deactivate JwtTokenValidation
deactivate Adapter
end
Adapter ->> Adapter: GetAppCredentialsAsync()
activate Adapter
Note over Adapter, AppCredentials: Get Credentials w/appId as Skill's AppId & Scope as Consumer's AppId
alt if cached credentials
Adapter -->> Adapter: return cached AppCredentials
else no cached credentials
Adapter ->> Adapter: BuildCredentialsAsync()
Adapter -->> Adapter: return AppCredentials
end
Adapter -->> Adapter: return AppCredentials
deactivate Adapter
Adapter ->> Adapter: CreateConnectorClient()
activate Adapter
deactivate Adapter
Adapter -->> Adapter: return ConnectorClient
deactivate Adapter
Adapter ->> TurnContext: Add ConnectorClient to TurnState
activate Adapter
activate TurnContext
TurnContext -->> Adapter:
deactivate TurnContext
deactivate Adapter
Adapter ->> Middleware: RunPipelineAsync()
activate Adapter
activate Middleware
loop Uncalled Middleware
activate Middleware
Middleware ->> Middleware: OnTurnAsync()
deactivate Middleware
end
Middleware ->> SkillActivityHandler: OnTurnAsync()
activate Middleware
activate SkillActivityHandler
SkillActivityHandler ->> SkillMainBotLogic: OnMessageActivityAsync()
activate SkillActivityHandler
activate SkillMainBotLogic
Note right of SkillMainBotLogic: Bot Message
Note right of SkillMainBotLogic: "Echo (dotnet): 'skill'"
SkillMainBotLogic ->> TurnContext: SendActivityAsync() into SendActivities()
activate SkillMainBotLogic
activate TurnContext
TurnContext ->> Activity: GetConversationReference()
activate TurnContext
activate Activity
Activity -->> TurnContext: conversation ref
deactivate Activity
deactivate TurnContext
alt no SendActivites callbacks registered
TurnContext ->> Adapter: SendActivitiesThroughAdapter calls SendActivitiesAsync()
activate TurnContext
activate Adapter
else Middleware registered
TurnContext ->> Middleware: SendActivitiesThroughCallbackPipeline()
activate Middleware
loop Uncalled Middleware
Middleware ->> Middleware: Call next callback in Send Activities List in TurnContext
activate Middleware
deactivate Middleware
end
Middleware ->> Adapter: SendActivitiesThroughAdapter()
end
Adapter ->> Adapter: SendActivities()
activate Adapter
alt has ReplyToId
Adapter ->> Connector: ReplyToActivityAsync()
activate Adapter
activate Connector
else no ReplyToId
Adapter ->> Connector: SendToConversationAsync()
end
Connector ->> Connector: ReplyToActivityWithHttpMessagesAsync()
activate Connector
Note over EchoBotController, Adapter: Construct HTTP transport object to make POST request to Skill Consumer
Note over EchoBotController, AppCredentials: RequestUri: "http://localhost:3978/api/skills/v3/conversations/{conversationId}/activities/{activityId}"
Note over EchoBotController, Adapter: Set Custom Headers
Note over EchoBotController, Adapter: Serialize Request using MS Rest
Connector ->> AppCredentials: ProcessHttpRequestAsync()
Note over Connector, AppCredentials: Add the Token to HTTP Request, using AppCredentials on ConnectorClient
activate Connector
activate AppCredentials
Note over AppCredentials, TurnContext: Verify that the request URL is to a trusted host
AppCredentials ->> AppCredentials: GetTokenAsync()
activate AppCredentials
AppCredentials ->> AdalAuthenticator: GetTokenAsync()
activate AppCredentials
activate AdalAuthenticator
AdalAuthenticator -->> AppCredentials: return AuthResults
deactivate AdalAuthenticator
deactivate AppCredentials
AppCredentials -->> AppCredentials: return Token from AuthResults
deactivate AppCredentials
Note over AppCredentials, AdalAuthenticator: Add Token to Authorization Header
AppCredentials -->> Connector: HTTP Request now has Token in Auth Header
deactivate Connector
deactivate AppCredentials
Connector ->> ConsumerController: HTTP POST
deactivate Connector
deactivate Connector
deactivate Adapter
deactivate Adapter
deactivate Middleware
deactivate Adapter
deactivate TurnContext
deactivate TurnContext
deactivate SkillMainBotLogic
deactivate SkillMainBotLogic
deactivate SkillActivityHandler
deactivate SkillActivityHandler
deactivate Middleware
deactivate Middleware
deactivate Adapter
deactivate Adapter
deactivate Adapter
deactivate Adapter
deactivate EchoBotController
deactivate EchoBotController
deactivate SkillClient
1 --- 2 name: magnifiedskillssequencediagrams 3 description: participant ConsumerController as Consumer's Controller 4 --- 5
6 # Inbound to EchoSkillBot
7
8 ```mermaid
9 sequenceDiagram
10 participant ConsumerController as Consumer's Controller
11 participant SkillClient as Consumer's Skill Client
12 Note over SkillClient: SimpleRootBot
13 participant EchoBotController as Echo BotController
14 participant Connector
15 participant Adapter
16 participant JwtTokenValidation
17 participant AppCredentials
18 participant AdalAuthenticator
19 participant TurnContext
20 participant Middleware
21 participant SkillActivityHandler as Skill Activity Handler
22 participant SkillMainBotLogic as Skill's Main Bot Logic
23
24 Note over SkillActivityHandler, SkillMainBotLogic: Skill Bot derives from ActivityHandler
25
26 Note left of SkillClient: Inbound HTTP POST
27 Note left of SkillClient: Message "skill"
28 SkillClient ->> EchoBotController: HTTP POST to ".../api/messages"
29 activate SkillClient
30 activate EchoBotController
31 EchoBotController ->> Adapter: ProcessAsync()
32 activate EchoBotController
33 activate Adapter
34 Note over Adapter: Deserialize Activity
35 Adapter ->> Adapter: ProcessActivity()
36 activate Adapter
37 Adapter ->> JwtTokenValidation: AuthenticateRequest()
38 activate Adapter
39 activate JwtTokenValidation
40 JwtTokenValidation ->> JwtTokenValidation: ValidateAuthHeader()
41 activate JwtTokenValidation
42 JwtTokenValidation ->> JwtTokenValidation: AuthenticateToken()
43 JwtTokenValidation ->> JwtTokenValidation: ValidateClaimsAsync()
44 JwtTokenValidation -->> JwtTokenValidation: return ClaimsIdentity
45 deactivate JwtTokenValidation
46
47 JwtTokenValidation ->> AppCredentials: TrustServiceUrl()
48 activate JwtTokenValidation
49 activate AppCredentials
50 AppCredentials -->> JwtTokenValidation: Host of ServiceUrl added to trusted hosts
51 deactivate AppCredentials
52 deactivate JwtTokenValidation
53
54 JwtTokenValidation -->> Adapter: return Claimsidentity
55 deactivate JwtTokenValidation
56 deactivate Adapter
57
58 Adapter ->> Adapter: ProcessActivityAsync()
59 activate Adapter
60 Note over Adapter: Create TurnContext
61
62 Adapter ->> TurnContext: Add BotIdentity (ClaimsIdentity) and BotCallbackHandler to TurnState
63 activate Adapter
64 activate TurnContext
65 TurnContext -->> Adapter:
66 deactivate TurnContext
67 deactivate Adapter
68
69 Adapter ->> Adapter: CreateConnectorClientAsync()
70 activate Adapter
71 Note over Adapter, JwtTokenValidation: Set botAppId to "aud" or "appId" claim
72
73 opt If botAppId isSkillClaim
74 Note over Adapter, JwtTokenValidation: Set scope to Consumer's AppId
75 Adapter ->> JwtTokenValidation: GetAppIdFromClaims()
76 activate Adapter
77 activate JwtTokenValidation
78 JwtTokenValidation -->> Adapter: return Consumer's AppId
79 deactivate JwtTokenValidation
80 deactivate Adapter
81 end
82
83 Adapter ->> Adapter: GetAppCredentialsAsync()
84 activate Adapter
85 Note over Adapter, AppCredentials: Get Credentials w/appId as Skill's AppId & Scope as Consumer's AppId
86
87 alt if cached credentials
88 Adapter -->> Adapter: return cached AppCredentials
89
90 else no cached credentials
91 Adapter ->> Adapter: BuildCredentialsAsync()
92
93 Adapter -->> Adapter: return AppCredentials
94 end
95 Adapter -->> Adapter: return AppCredentials
96 deactivate Adapter
97
98 Adapter ->> Adapter: CreateConnectorClient()
99 activate Adapter
100 deactivate Adapter
101
102 Adapter -->> Adapter: return ConnectorClient
103 deactivate Adapter
104
105 Adapter ->> TurnContext: Add ConnectorClient to TurnState
106 activate Adapter
107 activate TurnContext
108 TurnContext -->> Adapter:
109 deactivate TurnContext
110 deactivate Adapter
111
112 Adapter ->> Middleware: RunPipelineAsync()
113 activate Adapter
114 activate Middleware
115 loop Uncalled Middleware
116 activate Middleware
117 Middleware ->> Middleware: OnTurnAsync()
118 deactivate Middleware
119 end
120
121 Middleware ->> SkillActivityHandler: OnTurnAsync()
122 activate Middleware
123 activate SkillActivityHandler
124 SkillActivityHandler ->> SkillMainBotLogic: OnMessageActivityAsync()
125 activate SkillActivityHandler
126 activate SkillMainBotLogic
127 Note right of SkillMainBotLogic: Bot Message
128 Note right of SkillMainBotLogic: "Echo (dotnet): 'skill'"
129
130 SkillMainBotLogic ->> TurnContext: SendActivityAsync() into SendActivities()
131 activate SkillMainBotLogic
132 activate TurnContext
133 TurnContext ->> Activity: GetConversationReference()
134 activate TurnContext
135 activate Activity
136 Activity -->> TurnContext: conversation ref
137 deactivate Activity
138 deactivate TurnContext
139
140 alt no SendActivites callbacks registered
141 TurnContext ->> Adapter: SendActivitiesThroughAdapter calls SendActivitiesAsync()
142 activate TurnContext
143 activate Adapter
144
145 else Middleware registered
146 TurnContext ->> Middleware: SendActivitiesThroughCallbackPipeline()
147 activate Middleware
148
149 loop Uncalled Middleware
150 Middleware ->> Middleware: Call next callback in Send Activities List in TurnContext
151 activate Middleware
152 deactivate Middleware
153 end
154
155 Middleware ->> Adapter: SendActivitiesThroughAdapter()
156
157 end
158
159 Adapter ->> Adapter: SendActivities()
160 activate Adapter
161
162
163 alt has ReplyToId
164 Adapter ->> Connector: ReplyToActivityAsync()
165 activate Adapter
166 activate Connector
167 else no ReplyToId
168 Adapter ->> Connector: SendToConversationAsync()
169 end
170
171 Connector ->> Connector: ReplyToActivityWithHttpMessagesAsync()
172 activate Connector
173 Note over EchoBotController, Adapter: Construct HTTP transport object to make POST request to Skill Consumer
174 Note over EchoBotController, AppCredentials: RequestUri: "http://localhost:3978/api/skills/v3/conversations/{conversationId}/activities/{activityId}"
175 Note over EchoBotController, Adapter: Set Custom Headers
176 Note over EchoBotController, Adapter: Serialize Request using MS Rest
177
178 Connector ->> AppCredentials: ProcessHttpRequestAsync()
179 Note over Connector, AppCredentials: Add the Token to HTTP Request, using AppCredentials on ConnectorClient
180 activate Connector
181 activate AppCredentials
182 Note over AppCredentials, TurnContext: Verify that the request URL is to a trusted host
183
184 AppCredentials ->> AppCredentials: GetTokenAsync()
185 activate AppCredentials
186 AppCredentials ->> AdalAuthenticator: GetTokenAsync()
187 activate AppCredentials
188 activate AdalAuthenticator
189 AdalAuthenticator -->> AppCredentials: return AuthResults
190 deactivate AdalAuthenticator
191 deactivate AppCredentials
192
193 AppCredentials -->> AppCredentials: return Token from AuthResults
194 deactivate AppCredentials
195
196 Note over AppCredentials, AdalAuthenticator: Add Token to Authorization Header
197
198 AppCredentials -->> Connector: HTTP Request now has Token in Auth Header
199 deactivate Connector
200 deactivate AppCredentials
201
202 Connector ->> ConsumerController: HTTP POST
203 deactivate Connector
204
205 deactivate Connector
206 deactivate Adapter
207
208 deactivate Adapter
209
210 deactivate Middleware
211 deactivate Adapter
212 deactivate TurnContext
213 deactivate TurnContext
214 deactivate SkillMainBotLogic
215 deactivate SkillMainBotLogic
216 deactivate SkillActivityHandler
217 deactivate SkillActivityHandler
218 deactivate Middleware
219 deactivate Middleware
220 deactivate Adapter
221
222 deactivate Adapter
223 deactivate Adapter
224 deactivate Adapter
225 deactivate EchoBotController
226 deactivate EchoBotController
227 deactivate SkillClient
228
229 ```
majiayu000/claude-skill-registry-data/tree/main/devops/magnifiedskillssequencediagrams commit ec070059a7
Frequently asked questions How do I install the Magnifiedskillssequencediagrams skill? Run npx skillmds add majiayu000/magnifiedskillssequencediagrams in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
What does the Magnifiedskillssequencediagrams skill do? participant ConsumerController as Consumer's Controller It is listed under Coding & Dev Tools on SkillMD.
Is Magnifiedskillssequencediagrams safe to use? This skill has not completed SkillMD's automated safety review yet. Capability flags: makes network calls, reads secrets. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
Which AI agents work with Magnifiedskillssequencediagrams? This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Is Magnifiedskillssequencediagrams free to use? Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
Who published Magnifiedskillssequencediagrams? majiayu000 (@majiayu000) published this skill. Their other Agent Skills are listed on their SkillMD profile.