Component Refactoring
langflow-ai/langflow
Refactor high-complexity React components in Langflow frontend.
Provides architecture overview with state machines, SSE event flow, and file mappings.
$ npx skills add microsoft-foundry/foundry-agent-webapp --skill understanding-architecture -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install microsoft-foundry/foundry-agent-webapp understanding-architecture --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/microsoft-foundry/foundry-agent-webapp.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/skills/understanding-architecture .claude/skills/understanding-architecture && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "understanding-architecture" agent skill from https://github.com/microsoft-foundry/foundry-agent-webapp/tree/main/.github/skills/understanding-architecture into .claude/skills/understanding-architecture/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "understanding-architecture", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/microsoft-foundry/foundry-agent-webapp/tree/main/.github/skills/understanding-architectureType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add microsoft-foundry/foundry-agent-webapp --skill understanding-architecture -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install microsoft-foundry/foundry-agent-webapp understanding-architecture --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/microsoft-foundry/foundry-agent-webapp.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.github/skills/understanding-architecture .agents/skills/understanding-architecture && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "understanding-architecture" agent skill from https://github.com/microsoft-foundry/foundry-agent-webapp/tree/main/.github/skills/understanding-architecture into .agents/skills/understanding-architecture/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "understanding-architecture", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add microsoft-foundry/foundry-agent-webapp --skill understanding-architecture -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install microsoft-foundry/foundry-agent-webapp understanding-architecture --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/microsoft-foundry/foundry-agent-webapp.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.github/skills/understanding-architecture .cursor/skills/understanding-architecture && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "understanding-architecture" agent skill from https://github.com/microsoft-foundry/foundry-agent-webapp/tree/main/.github/skills/understanding-architecture into .cursor/skills/understanding-architecture/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "understanding-architecture", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/microsoft-foundry/foundry-agent-webapp.git --path .github/skills/understanding-architecture--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add microsoft-foundry/foundry-agent-webapp --skill understanding-architecture -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install microsoft-foundry/foundry-agent-webapp understanding-architecture --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/microsoft-foundry/foundry-agent-webapp.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.github/skills/understanding-architecture .gemini/skills/understanding-architecture && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "understanding-architecture" agent skill from https://github.com/microsoft-foundry/foundry-agent-webapp/tree/main/.github/skills/understanding-architecture into .gemini/skills/understanding-architecture/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "understanding-architecture", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install microsoft-foundry/foundry-agent-webapp understanding-architectureInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add microsoft-foundry/foundry-agent-webapp --skill understanding-architecture -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/microsoft-foundry/foundry-agent-webapp.git skills-src && mkdir -p .github/skills && cp -r skills-src/.github/skills/understanding-architecture .github/skills/understanding-architecture && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "understanding-architecture" agent skill from https://github.com/microsoft-foundry/foundry-agent-webapp/tree/main/.github/skills/understanding-architecture into .github/skills/understanding-architecture/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "understanding-architecture", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add microsoft-foundry/foundry-agent-webapp --skill understanding-architecture -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install microsoft-foundry/foundry-agent-webapp understanding-architecture --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/microsoft-foundry/foundry-agent-webapp.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.github/skills/understanding-architecture .opencode/skills/understanding-architecture && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "understanding-architecture" agent skill from https://github.com/microsoft-foundry/foundry-agent-webapp/tree/main/.github/skills/understanding-architecture into .opencode/skills/understanding-architecture/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "understanding-architecture", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
understanding-architectureProvides architecture overview with state machines, SSE event flow, and file mappings.
Understanding Architecture is an agent skill from microsoft-foundry/foundry-agent-webapp. Provides architecture overview with state machines, SSE event flow, and file mappings. Use when understanding system design, debugging state issues, or maintaining ARCHITECTURE-FLOW.md.
Its SKILL.md is about 2.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Development. The repository describes itself as: GitHub Copilot enabled repo for building and deploying a web application with Entra ID authentication and integrated with Azure AI Foundry Agents. The licence is MIT.
3 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit f6cb362. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are powershell).
From the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
deepwiki.comFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Understanding Architecture loads about 2.1k tokens when it runs. Until then it costs about 53 tokens; SKILL.md has 559 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from microsoft-foundry/foundry-agent-webapp at commit f6cb362, republished under its MIT licence (© microsoft-foundry). 559 words, ~2,127 tokens.
.claude/skills/understanding-architecture/SKILL.md (or your agent's skills folder).Load this skill when: Understanding system design, debugging state transitions, tracing SSE events, or updating architecture documentation.
| Layer | Tech | Port | Entry Point |
|---|---|---|---|
| Frontend | React 19 + Vite | 5173 | frontend/src/App.tsx |
| Backend | ASP.NET Core 9 | 8080 | backend/WebApp.Api/Program.cs |
| Auth | MSAL.js → JWT Bearer | — | frontend/src/config/authConfig.ts |
| AI SDK | Azure.AI.Projects (GA) + Azure.AI.Extensions.OpenAI | — | backend/.../AgentFrameworkService.cs |
User → ChatInput → CHAT_SEND_MESSAGE → ChatService.sendMessage()
→ POST /api/chat/stream (JWT) → AgentFrameworkService.StreamMessageAsync()
→ AI Foundry → SSE chunks → parseSseLine() → Reducer actions → UI updateidle ──CHAT_SEND_MESSAGE──► sending ──CHAT_START_STREAM──► streaming
▲ │ │
│ ▼ ▼
└──CHAT_CLEAR_ERROR─── error ◄──CHAT_ERROR──────────────────┤
│ │
└──CHAT_STREAM_COMPLETE / CHAT_CANCEL_STREAM / CHAT_MCP_APPROVAL_REQUEST| State | Input Enabled | streamingMessageId |
|---|---|---|
idle | ✅ Yes | undefined |
sending | ❌ No | undefined |
streaming | ❌ No | Message ID |
error | If recoverable | undefined |
initializing ──AUTH_INITIALIZED──► authenticated ──AUTH_TOKEN_EXPIRED──► unauthenticated
│ │
└───────────AUTH_INITIALIZED──────────┘| SSE Event | Backend Method | Frontend Action | Reducer Effect |
|---|---|---|---|
conversationId | WriteConversationIdEvent | CHAT_START_STREAM | Set conversationId |
chunk | WriteChunkEvent | CHAT_STREAM_CHUNK | Append content |
annotations | WriteAnnotationsEvent | CHAT_STREAM_ANNOTATIONS | Add citations |
mcpApprovalRequest | WriteMcpApprovalRequestEvent | CHAT_MCP_APPROVAL_REQUEST | Show approval UI |
usage | WriteUsageEvent | CHAT_STREAM_COMPLETE | Add token counts |
done | WriteDoneEvent | CHAT_STREAM_COMPLETE | Finalize |
error | WriteErrorEvent | CHAT_ERROR | Set error state |
1. conversationId (always first)
2. chunk (0-N times)
3. annotations (0-N times, after item complete)
4. mcpApprovalRequest (0-1 times, pauses stream)
5. usage (always before done)
6. done (always last)| File | Purpose |
|---|---|
frontend/src/types/appState.ts | State & action type definitions |
frontend/src/reducers/appReducer.ts | All state transitions |
frontend/src/contexts/AppContext.tsx | Provider + dev logging |
| File | Purpose |
|---|---|
backend/WebApp.Api/Program.cs | SSE endpoints + Write*Event helpers |
frontend/src/services/chatService.ts | SSE client + action dispatch |
frontend/src/utils/sseParser.ts | Line parsing + event types |
| File | Purpose |
|---|---|
backend/.../AgentFrameworkService.cs | Agent loading + streaming |
backend/.../Models/StreamChunk.cs | Chunk types (text, annotations, MCP) |
backend/.../Models/ChatRequest.cs | Request payload structure |
For complete diagrams and detailed flows, see:
Update the architecture document when:
| Change Type | What to Update |
|---|---|
| New SSE event type | Section 1.5 (Backend SSE Event Types), Section 2.8 (SSE → Action Mapping) |
| New reducer action | Section 2.7 (Action Reference), state machine diagrams |
| New API endpoint | Section 1.1 (Request Pipeline flowchart) |
| New auth state | Section 2.1 (Authentication State Machine) |
| New chat state | Section 2.2 (Chat State Machine) |
| File moved/renamed | Part 6 (File Reference tables) |
| Validation rules changed | Section 5.1 (Attachment Validation) |
Before committing architecture doc changes:
□ Mermaid Diagrams
□ All states match code (appState.ts types)
□ All transitions match reducer (appReducer.ts cases)
□ Diagram syntax renders without errors
□ Tables
□ SSE events match Program.cs Write*Event methods
□ Actions match AppAction type union
□ File paths are lowercase (case-sensitive filesystems)
□ Code Snippets
□ Patterns match actual code
□ Variable names correct
□ Examples would compile/run
□ File Links
□ All referenced files exist
□ Paths use correct case (chatService.ts not ChatService.ts)| Document Section | Source Code |
|---|---|
| Request Pipeline (1.1) | Program.cs middleware + endpoints |
| Credential Resolution (1.2) | AgentFrameworkService.cs constructor |
| Agent Loading (1.3) | AgentFrameworkService.GetAgentAsync() |
| SSE Events (1.5) | Program.cs static Write*Event methods |
| Auth States (2.1) | appState.ts auth.status type |
| Chat States (2.2) | appState.ts chat.status type |
| Action Reference (2.7) | appState.ts AppAction type |
| SSE → Action (2.8) | chatService.ts processStream switch |
| Attachment Limits (5.1) | AgentFrameworkService.cs Max* constants |
# Find all SSE event types in backend
Select-String -Path "backend/WebApp.Api/Program.cs" -Pattern "type.*="
# Find all reducer actions
Select-String -Path "frontend/src/types/appState.ts" -Pattern "type:"
# Find SSE parsing
Select-String -Path "frontend/src/services/chatService.ts" -Pattern "case '"
# Verify file links exist
Get-ChildItem -Recurse -Include "chatService.ts","appReducer.ts","appState.ts"DeepWiki (https://deepwiki.com/microsoft-foundry/foundry-agent-webapp) indexes the repo automatically. After major architecture changes:
See ARCHITECTURE-FLOW.md#2.3 - End-to-End Message Flow sequence diagram.
ChatService.cancelStream() sets streamCancelled = true and calls abort()CHAT_CANCEL_STREAM action dispatchedstatus: idle, clears streamingMessageId, enables inputStreamChunk.McpApproval when McpToolCallApprovalRequestItem receivedCHAT_MCP_APPROVAL_REQUEST with approval detailsidle (but input stays disabled)ChatService.sendMcpApproval() resumes with approval responseProgram.cs → AddMicrosoftIdentityWebApi() + RequireAuthorization(ScopePolicyName) on each endpoint.
ChainedTokenCredential(AzureCliCredential, AzureDeveloperCliCredential)ManagedIdentityCredential(miClientId) (user-assigned MI with MANAGED_IDENTITY_CLIENT_ID)© microsoft-foundry, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .github/skills/understanding-architecture of microsoft-foundry/foundry-agent-webapp.
Open the folder on GitHubat commit f6cb362
Understanding Architecture next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Understanding Architecture this skillmicrosoft-foundry/foundry-agent-webapp | 127 | — | ~2.1k | Automated safety check: Pass | MIT | |
| Component Refactoringlangflow-ai/langflow | 156k | — | ~3.5k | Automated safety check: Pass | MIT | |
| @pierre/diffs Code Renderingpierrecomputer/pierre | 6.2k | 2 repos | ~803 | Automated safety check: Pass | Apache-2.0 | |
| Frontend Code Reviewlanggenius/dify | 158k | — | ~938 | Automated safety check: Pass | Custom licence | |
| Electron DevTools Trace Analysiskeybase/client | 9.3k | — | ~809 | Automated safety check: Pass | BSD-3-Clause | |
| Zodjasonjgardner/blockbench-mcp-plugin | 491 | 3 repos | ~1.4k | Automated safety check: Pass | GPL-3.0 |
langflow-ai/langflow
Refactor high-complexity React components in Langflow frontend.
pierrecomputer/pierre
Guides an agent through using @pierre/diffs to render syntax-highlighted files and diffs, and to build editing and review surfaces in React or plain JavaScript.
langgenius/dify
Reviews frontend changes under `web/` or `packages/dify-ui/` for concrete defects and broken project contracts, using routed rule packs and a severity scale for findings.
keybase/client
Analyzes Chrome or Electron DevTools Performance trace exports with Python scripts to find where render time actually goes, without opening DevTools.
jasonjgardner/blockbench-mcp-plugin
Zod schema validation best practices for type safety, parsing, and error handling.
moonbitlang/moonbit-docs
A skill your agent uses when maintaining the moonbitlang/moonbit-docs repository, including Sphinx docs under next/, MoonBit examples under next/sources/, error-code documentation, gettext…
microsoft-foundry/foundry-agent-webapp
Provides commit message format and workflow for this repository.
microsoft-foundry/foundry-agent-webapp
Provides SSE streaming patterns for the chat API and frontend.
microsoft-foundry/foundry-agent-webapp
Provides structured plan template for feature implementation.
microsoft-foundry/foundry-agent-webapp
Provides research patterns for Foundry Agent Service SDK. An agent skill from microsoft-foundry/foundry-agent-webapp.
microsoft-foundry/foundry-agent-webapp
Provides deployment commands and troubleshooting for Azure Container Apps.
microsoft-foundry/foundry-agent-webapp
Synchronize MCP server configuration between VS Code (.vscode/mcp.json) and Copilot CLI (~/.copilot/mcp-config.json).
Provides architecture overview with state machines, SSE event flow, and file mappings. Understanding Architecture is an agent skill from microsoft-foundry/foundry-agent-webapp. Provides architecture overview with state machines, SSE event flow, and file mappings.
Understanding Architecture fits situations like: understanding system design; debugging state issues; maintaining ARCHITECTURE-FLOW.md.
Run `npx skills add microsoft-foundry/foundry-agent-webapp --skill understanding-architecture -a claude-code`. Or copy the skill folder (.github/skills/understanding-architecture in microsoft-foundry/foundry-agent-webapp) into .claude/skills/understanding-architecture in your project. Claude Code loads it when a task matches its description.
Run `npx skills add microsoft-foundry/foundry-agent-webapp --skill understanding-architecture -a codex`. Or copy the skill folder (.github/skills/understanding-architecture in microsoft-foundry/foundry-agent-webapp) into .agents/skills/understanding-architecture in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add microsoft-foundry/foundry-agent-webapp --skill understanding-architecture -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/understanding-architecture, .gemini/skills/understanding-architecture, .github/skills/understanding-architecture and .opencode/skills/understanding-architecture in your project.
SKILL.md names no scripts, command-line tools or credentials: Understanding Architecture is instructions for the agent only.
SKILL.md names 1 domain. As links in the text: deepwiki.com. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Understanding Architecture is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.1k tokens (SKILL.md is roughly 8.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Understanding Architecture: Component Refactoring (langflow-ai/langflow, 156k stars), @pierre/diffs Code Rendering (pierrecomputer/pierre, 6.2k stars), Frontend Code Review (langgenius/dify, 158k stars) and Electron DevTools Trace Analysis (keybase/client, 9.3k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
microsoft-foundry (a GitHub organization) maintains it in microsoft-foundry/foundry-agent-webapp, which has 127 GitHub stars. The repository holds 19 skills in this directory. The repository was last updated on April 21, 2026.
Source: microsoft-foundry/foundry-agent-webapp on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.