/SKILL.md
Build desktop-distributed AI agent applications with a Python FastAPI backend, React TypeScript frontend, and PyInstaller executable packaging. Use this skill whenever the user wants to create a desktop app powered by an AI agent, build a chatbot with a local GUI, package a Python+React app as a standalone .exe, integrate AWS Bedrock or other LLM providers into a desktop tool, create an SSE-streaming chat interface, or bundle a full-stack web app into a shareable executable. Also use when the user mentions PyInstaller, Strands SDK agents, desktop AI tools, or distributable agent applications.
npx skillsauth add suman73/tigeragentskill desktop-agent-builderInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
A comprehensive skill for building production-ready desktop AI agent applications that combine a Python backend with a React frontend, packaged as a standalone executable.
The pattern is a local client-server architecture bundled into a single distributable package:
project/
├── backend/ # Python FastAPI server + AI agent
│ ├── main.py # FastAPI app, API routes, SSE streaming
│ ├── run.py # Entry point (dev + frozen exe)
│ ├── build_exe.py # Build script (uv + PyInstaller)
│ ├── requirements.txt # Python dependencies
│ └── app/
│ ├── agent_factory.py # Agent creation, tools, system prompt
│ ├── sessions.py # Session management, credential validation
│ ├── models.py # Pydantic request/response models
│ ├── config.py # App configuration dataclass
│ ├── profiles.py # AWS profile discovery
│ └── ... # Additional modules as needed
├── frontend/ # React + TypeScript + Vite SPA
│ ├── src/
│ │ ├── App.tsx # Root component, routing, state
│ │ ├── api.ts # API client + SSE streaming helper
│ │ ├── types.ts # Shared TypeScript types
│ │ └── components/ # UI components
│ └── vite.config.ts
└── infra/ # Optional: CDK/CloudFormation for cloud resources
.exe — it starts a local FastAPI server on localhost:8000frontend_dist/http://localhost:8000Read references/architecture.md for detailed rationale on each decision. The highlights:
uv resolves and installs Python packages 10-50x faster than pip. The build script creates a clean venv with uv venv, installs deps with uv pip install, then runs PyInstaller from that venv.--onedir produces a folder with the exe + dependencies. Startup is instant. --onefile extracts to a temp dir on every launch — slow and triggers antivirus.Create the FastAPI server with these core components:
run.py — Entry point that works both in dev (uvicorn with reload) and frozen (PyInstaller) modemain.py — FastAPI app with CORS, API routes, SSE streaming, and static file servingapp/agent_factory.py — Agent creation with configurable tools and system promptapp/sessions.py — Session lifecycle (create, get, destroy)app/models.py — Pydantic models for all API request/response schemasSee references/backend-patterns.md for code patterns for each component.
Create the React SPA with Vite:
api.ts — API client with SSE streaming helper that parses data: linesApp.tsx — Root component managing session state and view routingcomponents/ChatWindow.tsx — Chat UI with message bubbles, tool call display, streaming indicatorcomponents/ProfileSelector.tsx — Login/connect page (pre-auth)components/Sidebar.tsx — Navigation sidebar (post-auth)See references/frontend-patterns.md for the SSE streaming pattern and component structure.
The critical integration point. The pattern:
Frontend (EventSource) ←SSE→ Backend (StreamingResponse) ←Queue→ Agent Thread
ThreadPoolExecutor threadToolStreamingHook pushes events (tool_call, tool_result, content) to a Queuedata: {json}\n\n linesdata: [DONE]\n\n signals stream endThe build script (build_exe.py) does:
uv venv .build_venv — Create clean venvuv pip install --python .build_venv/Scripts/python.exe <packages> — Install deps fastnpm run build — Build frontendfrontend/dist → backend/frontend_dist--onedir, --add-data for frontend + app modules, --hidden-import and --collect-submodules for dynamic imports, --exclude-module for unused heavy packagesSee references/pyinstaller-guide.md for the full list of hidden imports and exclusions needed for common packages (FastAPI, uvicorn, boto3, strands, etc.).
dist/ folderlocalhost:8000Common issues and fixes are in references/troubleshooting.md.
Define tools using the @tool decorator pattern:
from strands import tool
@tool
def my_custom_tool(param: str) -> str:
"""Description of what this tool does."""
# Implementation
return result
Add to the agent's tool list in agent_factory.py.
Add a GET /api/system-check endpoint that verifies the user's machine has required software (AWS CLI, etc.). Display results on the login page so first-time users know what to install.
For data-heavy features, generate HTML reports server-side and serve them via a download endpoint with Content-Disposition: attachment header. Avoid blob URLs — they're blocked by some corporate browser policies.
Fetch config from AWS SSM Parameter Store in a single batch get_parameters call. This lets you update config (model IDs, prompts, feature flags) without rebuilding the exe.
--onefile for PyInstaller — it's slow to start and triggers antiviruswebbrowser.open() for SSO auth — corporate environments block it. Show the URL in the UI instead.npm run dev in the exe — build the frontend and serve static filestools
Use when work should span one or more detached tasks but still behave like one job with a single owner context. TaskFlow is the durable flow substrate under authoring layers like Lobster, ACPX, plugins, or plain code. Keep conditional logic in the caller; use TaskFlow for flow identity, child-task linkage, waiting state, revision-checked mutations, and user-facing emergence.
tools
# Lobster Lobster executes multi-step workflows with approval checkpoints. Use it when: - User wants a repeatable automation (triage, monitor, sync) - Actions need human approval before executing (send, post, delete) - Multiple tool calls should run as one deterministic operation ## When to use Lobster | User intent | Use Lobster? | | ------------------------------------------------------ | --------------------------
tools
# Lobster Lobster executes multi-step workflows with approval checkpoints. Use it when: - User wants a repeatable automation (triage, monitor, sync) - Actions need human approval before executing (send, post, delete) - Multiple tool calls should run as one deterministic operation ## When to use Lobster | User intent | Use Lobster? | | ------------------------------------------------------ | --------------------------
tools
A CLI tool for making authenticated requests to the X (Twitter) API. Use this skill when you need to post tweets, reply, quote, search, read posts, manage followers, send DMs, upload media, or interact with any X API v2 endpoint.