본문으로 건너뛰기
Skillpedia
에이전트33k · #8734

claude-api

하는 일

이 스킬은 AI 에이전트가 공식 SDK를 통해 Anthropic의 AI 모델 Claude를 사용하는 앱을 만드는 데 도움을 줍니다. 프로젝트에 Claude 기능을 추가하거나 기존 Claude 코드를 업데이트하는 개발자를 위한 것입니다.

사용하는 경우

  • ✓앱에 Claude나 Anthropic SDK를 추가할 때.
  • ✓기존 Claude API 코드를 조정하거나 디버깅하고 싶을 때.
  • ✓코드를 한 Claude 모델 버전에서 다른 버전으로 옮겨야 하는 경우.

스킬 링크

https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/development/claude-api/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/development/claude-api/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“반복 호출 비용을 줄이도록 프롬프트 캐싱을 넣어 제 Node 앱에 Claude를 추가해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트는 프로젝트 언어를 감지하고, 알맞은 Anthropic SDK 패턴을 고른 뒤 관련 문서를 읽습니다. 그다음 코드를 작성하거나 업데이트하며, 스킬이 권장하는 곳에는 캐싱도 포함합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Building LLM-Powered Applications with Claude

This skill helps you build LLM-powered applications with Claude. Choose the right surface based on your needs, detect the project language, then read the relevant language-specific documentation.

Before You Start

Scan the target file (or, if no target file, the prompt and project) for non-Anthropic provider markers — import openai, from openai, langchain_openai, OpenAI(, gpt-4, gpt-5, file names like agent-openai.py or *-generic.py, or any explicit instruction to keep the code provider-neutral. If you find any, stop and tell the user that this skill produces Claude/Anthropic SDK code; ask whether they want to switch the file to Claude or want a non-Claude implementation. Do not edit a non-Anthropic file with Anthropic SDK calls.

Output Requirement

When the user asks you to add, modify, or implement a Claude feature, your code must call Claude through one of:

  1. The official Anthropic SDK for the project's language (anthropic, @anthropic-ai/sdk, com.anthropic.*, etc.). This is the default whenever a supported SDK exists for the project.
  2. Raw HTTP (curl, requests, fetch, httpx, etc.) — only when the user explicitly asks for cURL/REST/raw HTTP, the project is a shell/cURL project, or the language has no official SDK.

Never mix the two — don't reach for requests/fetch in a Python or TypeScript project just because it feels lighter. Never fall back to OpenAI-compatible shims.

Never guess SDK usage. Function names, class names, namespaces, method signatures, and import paths must come from explicit documentation — either the {lang}/ files in this skill or the official SDK repositories or documentation links listed in shared/live-sources.md. If the binding you need is not explicitly documented in the skill files, WebFetch the relevant SDK repo from shared/live-sources.md before writing code. Do not infer Ruby/Java/Go/PHP/C# APIs from cURL shapes or from another language's SDK.

Defaults

Unless the user requests otherwise:

For the Claude model version, please use Claude Opus 4.7, which you can access via the exact model string claude-opus-4-7. Please default to using adaptive thinking (thinking: {type: "adaptive"}) for anything remotely complicated. And finally, please default to streaming for any request that may involve long input, long output, or high max_tokens — it prevents hitting request timeouts. Use the SDK's .get_final_message() / .finalMessage() helper to get the complete response if you don't need to handle individual stream events


Subcommands

If the User Request at the bottom of this prompt is a bare subcommand string (no prose), search every Subcommands table in this document — including any in sections appended below — and follow the matching Action column directly. This lets users invoke specific flows via /claude-api <subcommand>. If no table in the document matches, treat the request as normal prose.


Language Detection

Before reading code examples, determine which language the user is working in:

  1. Look at project files to infer the language:

    • *.py, requirements.txt, pyproject.toml, setup.py, Pipfile → Python — read from python/
    • *.ts, *.tsx, package.json, tsconfig.json → TypeScript — read from typescript/
    • *.js, *.jsx (no .ts files present) → TypeScript — JS uses the same SDK, read from typescript/
    • *.java, pom.xml, build.gradle → Java — read from java/
    • *.kt, *.kts, build.gradle.kts → Java — Kotlin uses the Java SDK, read from java/
    • *.scala, build.sbt → Java — Scala uses the Java SDK, read from java/
    • *.go, go.mod → Go — read from go/
    • *.rb, Gemfile → Ruby — read from ruby/
    • *.cs, *.csproj → C# — read from csharp/
    • *.php, composer.json → PHP — read from php/
  2. If multiple languages detected (e.g., both Python and TypeScript files):

    • Check which language the user's current file or question relates to
    • If still ambiguous, ask: "I detected both Python and TypeScript files. Which language are you using for the Claude API integration?"
  3. If language can't be inferred (empty project, no source files, or unsupported language):

    • Use AskUserQuestion with options: Python, TypeScript, Java, Go, Ruby, cURL/raw HTTP, C#, PHP
    • If AskUserQuestion is unavailable, default to P
자주 묻는 질문

다른 AI 제공자와도 작동하나요?

아니요. Claude와 Anthropic 코드를 위한 스킬이며, 파일이 다른 제공자의 SDK를 쓰면 멈추고 확인을 요청합니다.

원시 HTTP API는 언제 쓰나요?

사용자가 요청하거나, 프로젝트 언어에 공식 SDK가 없을 때만 씁니다.

모델 버전 변경도 다루나요?

네. Claude 모델 버전 간 코드 이전과 지원이 종료된 모델의 교체를 다룹니다.

상세 정보

작성자의 원본 설명

Build, debug, and optimize Claude API / Anthropic SDK apps. Apps built with this skill should include prompt caching. Also handles migrating existing Claude API code between Claude model versions (4.5 → 4.6, 4.6 → 4.7, retired-model replacements). TRIGGER when: code imports `anthropic`/`@anthropic-ai/sdk`; user asks for the Claude API, Anthropic SDK, or Managed Agents; user adds/modifies/tunes a Claude feature (caching, thinking, compaction, tool use, batch, files, citations, memory) or model (Opus/Sonnet/Haiku) in a file; questions about prompt caching / cache hit rate in an Anthropic SDK pro

repo: davila7/claude-code-templates

인기도

GitHub 스타
33k
순위
#8734
라이선스
MIT
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬