ai-reasoning
Extended thinking display with collapsible UI. Adds a reasoning toggle that switches to Claude for chain-of-thought, rendered as a collapsible accordion. Use this skill when the user says "add reasoning", "extended thinking", "chain of thought", or "thinking mode".
What this skill does
# AI Reasoning Skill
Enables extended thinking (chain-of-thought) display with a collapsible accordion UI. When reasoning is toggled on, the model switches to `anthropic/claude-sonnet-4` with thinking enabled, and the reasoning trace renders as a collapsed "Thinking..." block above the response.
## Prerequisites
- `ai-chat` skill applied (provides `route.ts` with comment slots, `message.tsx` with part switch, `chat.tsx` with input area)
- `ai-core` skill applied (provides `getModel()`)
## Installation
No additional packages required. Uses `providerOptions` from the `ai` package (already installed by `ai-core`).
## What Gets Created
```
src/
└── components/
└── ai/
└── reasoning.tsx # Collapsible reasoning accordion component
```
Plus modifications to:
```
src/app/api/ai/chat/route.ts # MODIFIED — add providerOptions for thinking
src/components/ai/message.tsx # MODIFIED — add reasoning case
src/components/ai/chat.tsx # MODIFIED — add reasoning toggle + pass flag
```
## Comment Slots
- **route.ts**: `// [ai-reasoning]: add anthropic.thinking config here` — injects `providerOptions` for extended thinking
- **message.tsx**: `// [ai-reasoning]: add case "reasoning" here` — adds `ReasoningBlock` rendering in the part switch
## Setup Steps
### Step 1: Create `src/components/ai/reasoning.tsx`
```typescript
"use client";
import { memo, useState } from "react";
import { CaretDown, CaretRight, Brain } from "@phosphor-icons/react";
interface ReasoningBlockProps {
reasoning: string;
}
export const ReasoningBlock = memo(function ReasoningBlock({ reasoning }: ReasoningBlockProps) {
const [isExpanded, setIsExpanded] = useState(false);
const tokenEstimate = Math.ceil(reasoning.length / 4);
return (
<div className="my-2 rounded-lg border border-amber-200 bg-amber-50 text-sm dark:border-amber-900 dark:bg-amber-950/30">
<button
type="button"
onClick={() => setIsExpanded((prev) => !prev)}
className="flex w-full items-center gap-2 px-3 py-2 text-left hover:bg-amber-100/80 dark:hover:bg-amber-950/50 transition-colors"
>
<Brain className="h-4 w-4 text-amber-600 dark:text-amber-400" />
<span className="font-medium text-amber-800 dark:text-amber-300">Thinking...</span>
<span className="ml-auto rounded-full bg-amber-200 px-2 py-0.5 text-xs font-medium text-amber-700 dark:bg-amber-900 dark:text-amber-300">
~{tokenEstimate.toLocaleString()} tokens
</span>
{isExpanded ? (
<CaretDown className="h-4 w-4 text-amber-600 dark:text-amber-400" />
) : (
<CaretRight className="h-4 w-4 text-amber-600 dark:text-amber-400" />
)}
</button>
{isExpanded && (
<div className="border-t border-amber-200 px-3 py-2 dark:border-amber-900">
<pre className="whitespace-pre-wrap text-xs text-amber-900 dark:text-amber-200 leading-relaxed">
{reasoning}
</pre>
</div>
)}
</div>
);
});
```
### Step 2: Modify `src/app/api/ai/chat/route.ts`
Add the reasoning toggle logic at the `// [ai-reasoning]` comment slot.
First, update the request body destructuring.
Find this in `src/app/api/ai/chat/route.ts`:
```typescript
const {
messages,
sessionId,
}: { messages: UIMessage[]; sessionId?: string } = await request.json();
```
Replace with:
```typescript
const {
messages,
sessionId,
reasoning,
}: { messages: UIMessage[]; sessionId?: string; reasoning?: boolean } = await request.json();
```
Then add the provider options configuration.
Find this in `src/app/api/ai/chat/route.ts`:
```typescript
let providerOptions: Record<string, Record<string, JSONValue>> | undefined;
// [ai-reasoning]: add anthropic.thinking config here
```
Replace with:
```typescript
let providerOptions: Record<string, Record<string, JSONValue>> | undefined;
// [ai-reasoning]: add anthropic.thinking config here
if (reasoning) {
providerOptions = {
anthropic: {
thinking: { type: "enabled", budgetTokens: 5000 },
},
};
}
```
Then update the `streamText` call to use the reasoning model when reasoning is enabled.
Find this in `src/app/api/ai/chat/route.ts`:
```typescript
const result = streamText({
model: getModel(),
```
Replace with:
```typescript
const result = streamText({
model: reasoning ? getModel("anthropic/claude-sonnet-4") : getModel(),
```
### Step 3: Modify `src/components/ai/message.tsx`
Add the reasoning case to the part renderer.
Find this in `src/components/ai/message.tsx`:
```typescript
// [ai-reasoning]: add case "reasoning" here
// [ai-tools]: add cases "tool-invocation" and "tool-result" here
```
Replace with:
```typescript
// [ai-reasoning]: add case "reasoning" here
case "reasoning":
return (
<ReasoningBlock
key={key}
reasoning={part.text}
/>
);
// [ai-tools]: add cases "tool-invocation" and "tool-result" here
```
Then add the import for the `ReasoningBlock` component.
Find this in `src/components/ai/message.tsx` (after existing imports):
```typescript
import { Markdown } from "@/components/ai/markdown";
```
Replace with:
```typescript
import { Markdown } from "@/components/ai/markdown";
import { ReasoningBlock } from "@/components/ai/reasoning";
```
### Step 4: Modify `src/components/ai/chat.tsx`
Add a reasoning toggle button to the chat input area. The toggle sends a `reasoning` flag with each message.
Add the `Brain` icon import. Find this in `src/components/ai/chat.tsx`:
```typescript
import { ChatContainer } from "@/components/ai/chat-container";
```
Replace with:
```typescript
import { Brain } from "@phosphor-icons/react";
import { ChatContainer } from "@/components/ai/chat-container";
```
Add state for the reasoning toggle. Find this in `src/components/ai/chat.tsx`:
```typescript
const [input, setInput] = useState("");
const [isLoadingHistory, setIsLoadingHistory] = useState(false);
```
Replace with:
```typescript
const [input, setInput] = useState("");
const [reasoningEnabled, setReasoningEnabled] = useState(false);
const [isLoadingHistory, setIsLoadingHistory] = useState(false);
```
Include reasoning in the transport body. Find this in `src/components/ai/chat.tsx`:
```typescript
const transport = useMemo(
() =>
new DefaultChatTransport({
api: "/api/ai/chat",
body: { sessionId },
}),
[sessionId]
);
```
Replace with:
```typescript
const transport = useMemo(
() =>
new DefaultChatTransport({
api: "/api/ai/chat",
body: { sessionId, reasoning: reasoningEnabled },
}),
[sessionId, reasoningEnabled]
);
```
Add the reasoning toggle button in the input area, next to the send button.
Find this in `src/components/ai/chat.tsx`:
```typescript
<PromptInput
```
Replace with:
```typescript
<div className="flex items-center gap-2 mb-2">
<button
type="button"
onClick={() => setReasoningEnabled((prev) => !prev)}
className={`flex items-center gap-1.5 rounded-full px-3 py-1 text-xs font-medium transition-colors ${
reasoningEnabled
? "bg-amber-100 text-amber-700 dark:bg-amber-900 dark:text-amber-300"
: "bg-muted text-muted-foreground hover:bg-muted/80"
}`}
>
<Brain className="h-3.5 w-3.5" />
{reasoningEnabled ? "Reasoning on" : "Reasoning off"}
</button>
</div>
<PromptInput
```
## Usage
### Toggling Reasoning
Click the "Reasoning off" button above the chat input to enable extended thinking. The button turns amber when active. When reasoning is enabled:
1. The model switches from the default (Gemini FlasRelated in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context — no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development — guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.