con un clic
ai-api-integration
Integrating AI APIs (OpenAI, Claude, Gemini) in mobile apps.
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Menú
Integrating AI APIs (OpenAI, Claude, Gemini) in mobile apps.
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Basado en la clasificación ocupacional SOC
End-to-end orchestrated execution. Takes a feature description and drives the entire pipeline — plan, plan review (3 fresh reviewers), WU decomposition, 4-phase execution loop per WU, final review, COMMIT-READY emit. Honors user's git policy (no auto-commit).
`--default-domain` comes from the project-detect framework signal (orchestrator Step 5b / project-context); it only decides how UI files with no strong path marker are classified. `--risk-tier` is the WU's `risk_tier` fi
**Capture the WU baseline ONCE per WU, before attempt 1 (NOT on retries).** This is what makes file-scope checks correct across a multi-WU run where the user has not yet committed prior WUs (per the `ben yapacagim` git p
This gate has **two interchangeable execution paths that MUST emit the identical aggregated verdict object** (Step 3). The prose path below is the canonical fallback and the single source of truth for reviewer prompts an
A baton-based system for building mobile features across multiple Claude Code sessions with persistent progress tracking and simulator verification between steps.
Set up end-to-end testing framework with CI integration
| name | ai-api-integration |
| description | Integrating AI APIs (OpenAI, Claude, Gemini) in mobile apps. |
| source_type | skill |
| source_file | skills/ai-api-integration.md |
Migrated from skills/ai-api-integration.md.
references/... or workflow/..., are packaged beside this SKILL.md.agents/..., commands/..., scripts/..., resources/..., rules/..., hooks/..., or templates/..., are packaged at this plugin root.skills/orchestration/...) is packaged under source/skills/orchestration/... for exact-reference lookups; all other Telar skills exist here only as the generated adapters under the plugin-root skills/ directory.../.. when reading support files or running packaged scripts.Integrating AI APIs (OpenAI, Claude, Gemini) in mobile apps.
import OpenAI from 'openai'
const openai = new OpenAI({
apiKey: process.env.OPENAI_API_KEY,
})
async function chat(messages: Message[]) {
const completion = await openai.chat.completions.create({
model: 'gpt-4o',
messages,
max_tokens: 1000,
})
return completion.choices[0].message.content
}
// React Native with streaming
async function streamChat(messages: Message[], onChunk: (text: string) => void) {
const response = await fetch('https://api.openai.com/v1/chat/completions', {
method: 'POST',
headers: {
'Authorization': `Bearer ${apiKey}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
model: 'gpt-4o',
messages,
stream: true,
}),
})
const reader = response.body?.getReader()
const decoder = new TextDecoder()
while (true) {
const { done, value } = await reader!.read()
if (done) break
const chunk = decoder.decode(value)
const lines = chunk.split('\n').filter(line => line.startsWith('data:'))
for (const line of lines) {
const data = line.replace('data: ', '')
if (data === '[DONE]') return
const parsed = JSON.parse(data)
const content = parsed.choices[0]?.delta?.content
if (content) onChunk(content)
}
}
}
import Anthropic from '@anthropic-ai/sdk'
const anthropic = new Anthropic({
apiKey: process.env.CLAUDE_API_KEY,
})
async function claudeChat(messages: Message[]) {
const response = await anthropic.messages.create({
model: 'claude-sonnet-4-20250514',
max_tokens: 1024,
messages,
})
return response.content[0].text
}
// supabase/functions/chat/index.ts
import { serve } from 'https://deno.land/std@0.168.0/http/server.ts'
import OpenAI from 'https://esm.sh/openai@4'
serve(async (req) => {
const { messages } = await req.json()
const openai = new OpenAI({
apiKey: Deno.env.get('OPENAI_API_KEY'),
})
const completion = await openai.chat.completions.create({
model: 'gpt-4o',
messages,
})
return new Response(JSON.stringify({
message: completion.choices[0].message.content,
}))
})
// Client usage (API key stays secure)
const { data } = await supabase.functions.invoke('chat', {
body: { messages },
})
function ChatScreen() {
const [messages, setMessages] = useState<Message[]>([])
const [input, setInput] = useState('')
const [streaming, setStreaming] = useState('')
async function sendMessage() {
const userMessage = { role: 'user', content: input }
setMessages(prev => [...prev, userMessage])
setInput('')
await streamChat([...messages, userMessage], (chunk) => {
setStreaming(prev => prev + chunk)
})
setMessages(prev => [...prev, { role: 'assistant', content: streaming }])
setStreaming('')
}
}