본문으로 건너뛰기
cccskills
무료GitHub에 공개

ax-ai

This skill helps an LLM generate correct AI provider setup and configuration code using @ax-llm/ax. Use when the user asks about ai(), providers, models, presets, embeddings, extended thinking, context caching, or mentions OpenAI/Anthropic/Google/Azure/Groq/DeepSeek/Mistral/Cohere/Together/Ollama/HuggingFace/Reka/OpenRouter with @ax-llm/ax.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Diogenesoftoronto/keating스타 36(GitHub 36 + cccskills 0)

실행 점수 미검증

설치 방법 보기

포함된 파일(1)

  • SKILL.md8.8 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

AI Provider Codegen Rules (@ax-llm/ax)

Use this skill to generate AI provider setup, configuration, and chat code. Prefer short, modern, copyable patterns. Do not write tutorial prose unless the user explicitly asks for explanation.

Quick Setup

import { ai } from '@ax-llm/ax';

const openai = ai({ name: 'openai', apiKey: 'sk-...' });
const Codex = ai({ name: 'anthropic', apiKey: 'sk-ant-...' });
const gemini = ai({ name: 'google-gemini', apiKey: 'AIza...' });
const azure = ai({ name: 'azure-openai', apiKey: 'your-key', resourceName: 'your-resource', deploymentName: 'gpt-4' });
const groq = ai({ name: 'groq', apiKey: 'gsk_...' });
const deepseek = ai({ name: 'deepseek', apiKey: 'sk-...' });
const mistral = ai({ name: 'mistral', apiKey: 'your-key' });
const cohere = ai({ name: 'cohere', apiKey: 'your-key' });
const together = ai({ name: 'together', apiKey: 'your-key' });
const openrouter = ai({ name: 'openrouter', apiKey: 'your-key' });
const ollama = ai({ name: 'ollama', url: 'http://localhost:11434' });
const hf = ai({ name: 'huggingface', apiKey: 'hf_...' });
const reka = ai({ name: 'reka', apiKey: 'your-key' });
const grok = ai({ name: 'x-grok', apiKey: 'your-key' });

Model Presets

import { ai, AxAIGoogleGeminiModel } from '@ax-llm/ax';

const gemini = ai({
  name: 'google-gemini',
  apiKey: process.env.GOOGLE_APIKEY!,
  config: { model: 'simple' },
  models: [
    { key: 'tiny', model: AxAIGoogleGeminiModel.Gemini20FlashLite, description: 'Fast + cheap', config: { maxTokens: 1024, temperature: 0.3 } },
    { key: 'simple', model: AxAIGoogleGeminiModel.Gemini20Flash, description: 'Balanced', config: { temperature: 0.6 } },
  ],
});

await gemini.chat({ model: 'tiny', chatPrompt: [{ role: 'user', content: 'Hi' }] });

Chat

const res = await llm.chat({
  chatPrompt: [
    { role: 'system', content: 'You are concise.' },
    { role: 'user', content: 'Write a haiku about the ocean.' },
  ],
});
console.log(res.results[0]?.content);

Common Options

  • stream (boolean): enable SSE; true by default
  • thinkingTokenBudget: 'minimal' | 'low' | 'medium' | 'high' | 'highest' | 'none'
  • showThoughts: include thoughts in output
  • functionCallMode: 'auto' | 'native' | 'prompt'
  • debug, logger, tracer, rateLimiter, timeout

Extended Thinking

import { ai, AxAIAnthropicModel } from '@ax-llm/ax';

const Codex = ai({
  name: 'anthropic',
  apiKey: process.env.ANTHROPIC_APIKEY!,
  config: { model: AxAIAnthropicModel.Claude46Opus },
});

const res = await Codex.chat(
  { chatPrompt: [{ role: 'user', content: 'Solve step by step...' }] },
  { thinkingTokenBudget: 'medium', showThoughts: true },
);
console.log(res.results[0]?.thought);
console.log(res.results[0]?.content);

Budget Levels

LevelAnthropic (tokens)Gemini (tokens)
'none'disabledminimal
'minimal'1,024200
'low'5,000800
'medium'10,0005,000
'high'20,00010,000
'highest'32,00024,500

Anthropic Model-Specific Behavior

  • Opus 4.6: adaptive thinking, effort levels
  • Opus 4.5: budget_tokens + effort levels (capped at 'high')
  • Other thinking models: budget tokens only

Custom Thinking Levels

const Codex = ai({
  name: 'anthropic',
  apiKey: '...',
  config: {
    model: AxAIAnthropicModel.Claude46Opus,
    thinkingTokenBudgetLevels: {
      minimal: 2048,
      low: 8000,
      medium: 16000,
      high: 25000,
      highest: 40000,
    },
    effortLevelMapping: {
      minimal: 'low',
      low: 'medium',
      medium: 'high',
      high: 'high',
      highest: 'max',
    },
  },
});

Embeddings

const { embeddings } = await llm.embed({
  texts: ['hello', 'world'],
  embedModel: 'text-embedding-005',
});

Context Caching

const result = await gen.forward(llm, { code, language }, {
  mem,
  sessionId: 'code-review-session',
  contextCache: {
    ttlSeconds: 3600,
    cacheBreakpoint: 'after-examples',
  },
});

Breakpoint values: 'system' | 'after-functions' | 'after-examples'

Provider behavior:

  • Google Gemini: explicit caching with cache resource ID, auto TTL refresh
  • Anthropic: implicit via cache_control markers

External Registry (serverless)

const registry: AxContextCacheRegistry = {
  get: async (key) => { /* redis.get */ },
  set: async (key, entry) => { /* redis.set */ },
};

AWS Bedrock

import { AxAIBedrock, AxAIBedrockModel } from '@ax-llm/ax-ai-aws-bedrock';

const bedrock = new AxAIBedrock({
  region: 'us-east-2',
  fallbackRegions: ['us-west-2'],
  config: { model: AxAIBedrockModel.ClaudeSonnet4 },
});

Vercel AI SDK Integration

import { ai } from '@ax-llm/ax';
import { AxAIProvider } from '@ax-llm/ax-ai-sdk-provider';
import { generateText } from 'ai';

const axAI = ai({ name: 'openai', apiKey: process.env.OPENAI_APIKEY! });
const model = new AxAIProvider(axAI);
const result = await generateText({
  model,
  messages: [{ role: 'user', content: 'Hello!' }],
});

MCP + AxJSRuntime

import { AxMCPClient } from '@ax-llm/ax';
import { axCreateMCPStdioTransport } from '@ax-llm/ax-tools';

const transport = axCreateMCPStdioTransport({
  command: 'npx',
  args: ['-y', '@anthropic/mcp-server-filesystem'],
});
const client = new AxMCPClient(transport);

Critical Rules

  • Use ai() factory for all providers.
  • Provider names: 'openai', 'anthropic', 'google-gemini', 'azure-openai', 'mistral', 'groq', 'cohere', 'together', 'deepseek', 'ollama', 'huggingface', 'openrouter', 'reka', 'x-grok'
  • Thinking constraints on Anthropic: temperature and topK are ignored; topP only sent if >= 0.95.
  • Bedrock uses new AxAIBedrock(), not ai().
  • Vercel AI SDK uses AxAIProvider wrapper.

Examples

Fetch these for full working code:

Do Not Generate

  • Do not use new AxAIOpenAI(...) or similar class constructors for standard providers; use ai().
  • Do not hardcode provider class names when ai({ name: ... }) covers the provider.
  • Do not mix thinkingTokenBudget with explicit temperature on Anthropic thinking models.
  • Do not use ai() for AWS Bedrock; use new AxAIBedrock().
  • Do not omit resourceName and deploymentName for Azure OpenAI.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Use when the user wants to learn, be taught, be quizzed, or understand an idea across any domain — science, math, philosophy, code, law, politics, psychology, medicine, arts, or history — with active scaffolding.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Diogenesoftoronto/keating362026년 10월 20일 업데이트

ax

무료

This skill helps with using the @ax-llm/ax TypeScript library for building LLM applications. Use when the user asks about ax(), ai(), f(), s(), agent(), flow(), AxGen, AxAgent, AxFlow, signatures, streaming, or mentions @ax-llm/ax.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Diogenesoftoronto/keating362026년 10월 20일 업데이트

ax-agent

무료

This skill helps an LLM generate correct AxAgent code using @ax-llm/ax. Use when the user asks about agent(), child agents, namespaced functions, discovery mode, shared fields, llmQuery(...), RLM code execution, recursionOptions, or agent runtime behavior. For tuning and eval with agent.optimize(...), use ax-agent-optimize.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Diogenesoftoronto/keating362026년 10월 20일 업데이트

This skill helps an LLM generate correct AxAgent tuning and evaluation code using @ax-llm/ax. Use when the user asks about agent.optimize(...), judgeOptions, eval datasets, optimization targets, saved optimizedProgram artifacts, or recursive optimization guidance.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Diogenesoftoronto/keating362026년 10월 20일 업데이트

ax-flow

무료

This skill helps an LLM generate correct AxFlow workflow code using @ax-llm/ax. Use when the user asks about flow(), AxFlow, workflow orchestration, parallel execution, DAG workflows, conditional routing, map/reduce patterns, or multi-node AI pipelines.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Diogenesoftoronto/keating362026년 10월 20일 업데이트

ax-gen

무료

This skill helps an LLM generate correct AxGen code using @ax-llm/ax. Use when the user asks about ax(), AxGen, generators, forward(), streamingForward(), assertions, field processors, step hooks, self-tuning, or structured outputs.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Diogenesoftoronto/keating362026년 10월 20일 업데이트

Diogenesoftoronto의 스킬 모두 보기

이 스킬의 문제 신고