diff --git a/.agents/skills/ai-chat/SKILL.md b/.agents/skills/ai-chat/SKILL.md index 4a8f596..180f661 100644 --- a/.agents/skills/ai-chat/SKILL.md +++ b/.agents/skills/ai-chat/SKILL.md @@ -5,6 +5,28 @@ description: Build AI-powered chat interfaces, implement streaming responses, or # AI Integration with Shakespeare API +This skill provides the `useShakespeare` hook for AI chat completions with Nostr authentication against the Shakespeare AI API. The API dynamically provides available models, so you should query them at runtime rather than hardcoding model names. + +**The Shakespeare integration is not included in the project by default.** When the user wants AI chat functionality, follow the setup instructions below to install the hook. + +## Files Provided by This Skill + +| Skill file | Copy to | +|---|---| +| `files/hooks/useShakespeare.ts` | `src/hooks/useShakespeare.ts` | + +## Setup Instructions + +### 1. Dependencies + +No extra npm packages are required — the hook uses only packages already present in the template (`react`, `@nostrify/react/login` via the existing `useCurrentUser` hook). + +### 2. Copy the Skill File Into `src/` + +Copy `.agents/skills/ai-chat/files/hooks/useShakespeare.ts` into `src/hooks/useShakespeare.ts`. The hook uses `@/hooks/useCurrentUser` and `@nostrify/react/login` types — both already present in the template — so no further wiring is required. + +## Usage + Use the `useShakespeare` hook for AI chat completions with Nostr authentication. The API dynamically provides available models, so you should query them at runtime rather than hardcoding model names. ```tsx diff --git a/src/hooks/useShakespeare.ts b/.agents/skills/ai-chat/files/hooks/useShakespeare.ts similarity index 100% rename from src/hooks/useShakespeare.ts rename to .agents/skills/ai-chat/files/hooks/useShakespeare.ts diff --git a/AGENTS.md b/AGENTS.md index 212805c..3580096 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -31,7 +31,6 @@ This project is a Nostr client application built with React 19.x, TailwindCSS 3. - `useLoggedInAccounts`: Manage multiple accounts - `useLoginActions`: Authentication actions - `useIsMobile`: Responsive design helper - - `useShakespeare`: AI chat completions with Shakespeare AI API - `/src/pages/`: Page components used by React Router (Index, NotFound) - `/src/lib/`: Utility functions and shared logic - `/src/contexts/`: React context providers (AppContext)