Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add rules/airweave-ai/airweave/connect-widgetgit clone --depth 1 https://github.com/airweave-ai/airweaveWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/rules/airweave-ai/airweave/connect-widget)<a href="https://agentmods.dev/rules/airweave-ai/airweave/connect-widget"><img src="https://agentmods.dev/badge/rules/airweave-ai/airweave/connect-widget.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.02604 |
| Opus 5 | $0.00000 | $0.01302 |
| Sonnet 5 | $0.00000 | $0.00521 |
| Haiku 4.5 | $0.00000 | $0.00260 |
Grade A, and why
connect-widget scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 317 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Airweave Connect Widget Architecture
What is Connect?
The Connect widget is an embeddable component that allows end users to manage their source connections within third-party applications. It runs inside an iframe and communicates with parent applications via postMessage.
Tech Stack & Core Technologies
- React 19 with TypeScript for type-safe component development
- Vite for fast development builds and HMR
- TailwindCSS v4 for styling with CSS-first configuration
- Base UI (
@base-ui/react) for accessible, unstyled primitives - Lucide icons for consistent iconography
- TanStack Router for file-based routing with type safety
- TanStack Query for server state and data fetching
- marked for Markdown rendering in form field descriptions (with XSS-safe link renderer)
- No authentication - relies on session tokens passed from parent
Project Structure
connect/src/
├── components/ # UI components
│ ├── ActionErrorBanner.tsx # Dismissible inline error banner for action failures
│ ├── ConnectionItem.tsx # Single connection display (supports reconnect loading state)
│ ├── ConnectionsErrorView.tsx
│ ├── DynamicFormField.tsx # Dynamic form fields with markdown support
│ ├── EmptyState.tsx # Dual-layout empty state (rich hero when showConnect=true, simple manage view otherwise)
│ ├── ErrorScreen.tsx # Full-screen error display
│ ├── FolderSelectionView.tsx # Folder picker wrapper (optional feature)
│ ├── FolderTree.tsx # Hierarchical folder checkbox tree
│ ├── LoadingScreen.tsx # Loading spinner (legacy, prefer contextual skeletons)
│ ├── PoweredByAirweave.tsx # Footer branding
│ ├── SessionProvider.tsx # Session context provider
│ ├── Skeleton.tsx # Contextual skeleton loaders (ConnectionItemSkeleton, SourceItemSkeleton, SourceConfigSkeleton)
│ ├── SourceItem.tsx # Single source in picker
│ ├── SourcesList.tsx # Source selection grid
│ └── SuccessScreen.tsx # Main connected state
├── hooks/
│ └── useParentMessaging.ts # iframe ↔ parent communication
├── lib/
│ ├── api.ts # API client with session auth
│ ├── connection-utils.ts # Connection status helpers
│ ├── env.ts # Environment configuration
│ ├── icons.ts # Icon registry and helpers
│ ├── oauth.ts # OAuth popup and message handling
│ ├── theme-defaults.ts # Default theme configuration
│ ├── theme.tsx # Theme context and CSS variables
│ ├── types.ts # TypeScript type definitions
│ └── useOAuthFlow.ts # OAuth flow state management hook
├── routes/
│ ├── __root.tsx # Root layout
│ ├── index.tsx # Main entry route
│ └── oauth-callback.tsx # OAuth callback handler
├── router.tsx # TanStack Router setup
├── routeTree.gen.ts # Auto-generated route tree
└── styles.css # Global styles and Tailwind imports
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 5d ago First seen · 317 lines · 2,604 tokens per session scan A 36242e973554
connect-widget is a cursor rule published in the GitHub repository airweave-ai/airweave (6,566 stars, last pushed 3mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,604 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other cursor rules, from other repositories
development-phase
开发阶段:以新代码清晰合理为先,兼容仅在零代价时顺带.
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.
dev-standard
Apache Superset development standards and guidelines for Cursor IDE.
cli-error-handling
CLI command error handling patterns.
prefer-assertions-over-defensive-checks
Prefer assertions over defensive checks when data is guaranteed to be valid.
prefer-direct-imports-over-module-mocks
Prefer extracting a testable core over vi.mock / vi.resetModules when unit tests need to reach production logic entangled with config, env, or singletons.