Loading...
    • 개발자 가이드
    • API 참고자료
    • MCP
    • 리소스
    • 릴리스 노트
    Search...
    ⌘K

    리소스

    overview용어집시스템 프롬프트

    사용 사례

    개요티켓 라우팅고객 지원 에이전트콘텐츠 조정법률 문서 요약

    프롬프트 라이브러리

    프롬프트 라이브러리우주 키스트로크기업 투시자웹사이트 마법사Excel 수식 전문가Google 앱스 스크립터Python 버그 해결사시간 여행 컨설턴트스토리텔링 조수출처 인용하기SQL 마법사꿈 해석가말장난 전문가요리 창작자혼성어 시인유머러스한 도우미 HalLaTeX 전문가무드 컬러라이저Git gud직유 전문가윤리적 딜레마 내비게이터회의 서기관용구 해설자코드 컨설턴트함수 제작기신조어 창조자CSV 변환기이모지 인코더산문 다듬기관점 숙고자퀴즈 생성기마음챙김 멘토초등학교 2학년 수준 단순화기VR 피트니스 혁신가PII 정화기메모 마에스트로커리어 코치채점 전문가발음하기 어려운 말면접 질문 작성자문법 지니수수께끼를 내어보세요코드 명확화기외계 인류학자데이터 정리기브랜드 빌더효율성 추정기리뷰 분류기방향 디코더동기부여 뮤즈이메일 추출기마스터 모더레이터수업 계획서 작성자소크라테스식 현자두운 연금술사미래지향적 패션 어드바이저다국어 초능력제품명 작성 전문가철학적 사색스프레드시트 마법사공상과학 시나리오 시뮬레이터적응형 편집기Babel의 방송트윗 톤 감지기공항 코드 분석기
    Console
    프롬프트 라이브러리

    우주 키스트로크

    사이드 스크롤링 게임플레이와 Tailwind CSS 스타일링을 특징으로 하는 인터랙티브 속도 타이핑 게임을 단일 HTML 파일로 생성합니다.

    이 프롬프트를 우리 개발자 Console에 복사하여 직접 시도해보세요!

    내용
    User완전한 웹 앱을 단일 HTML 파일로 작성해주세요. 이 앱은 WASD를 사용하여 이동하는 간단한 사이드 스크롤링 게임을 포함해야 합니다. 세계를 돌아다니다 보면 가끔 캐릭터/스프라이트가 단어를 만나게 됩니다. 단어를 만나면 플레이어는 가능한 한 빠르게 단어를 정확히 타이핑해야 합니다. 단어를 성공적으로 타이핑할수록 더 많은 점수를 얻습니다. 점수를 추적하기 위해 오른쪽 상단에 카운터가 있어야 합니다. 게임을 흥미롭게 유지하기 위해 단어는 무작위이고 매우 다양해야 합니다.

    웹사이트를 매우 미적으로 만들고 Tailwind를 사용해야 합니다.

    예시 출력

    <!DOCTYPE html>
    <html>
      <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <script src="https://cdn.tailwindcss.com"></script>
        <title>Side-Scrolling Typing Game</title>
      </head>
      <body class="bg-gray-900 text-white">
        <div class="fixed top-4 right-4 text-2xl">
          Score: <span id="score">0</span>
        </div>
        <div id="game" class="h-screen w-screen overflow-hidden relative">
          <div
            id="player"
            class="absolute bottom-10 left-10 w-8 h-8 bg-blue-500"
          ></div>
        </div>
        <div
          id="word-input"
          class="fixed top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 bg-white text-black p-4 rounded hidden"
        >
          <input
            type="text"
            id="typed-word"
            class="border border-gray-300 rounded px-2 py-1 mb-2 w-full"
          />
          <button id="submit-word" class="bg-blue-500 text-white px-4 py-2 rounded">
            Submit
          </button>
        </div>
        <script>
          const words = [
            'ability',
            'able',
            'about',
            'above',
            'accept',
            'according',
            'account',
            'across',
            'action',
            'activity',
            'actually',
            'address',
            'administration',
            'admit',
            'adult',
            'affect',
            'after',
            'again',
            'against',
            'agency',
            'agent',
            'ago',
            'agree',
            'agreement',
            'ahead',
            'air',
            'all',
            'allow',
            'almost',
            'alone',
            'along',
            'already',
            'also',
            'although',
            'always',
            'American',
            'among',
            'amount',
            'analysis',
            'and',
            'animal',
            'another',
            'answer',
            'any',
            'anyone',
            'anything',
            'appear',
            'apply',
            'approach',
            'area',
            'argue',
            'arm',
            'around',
            'arrive',
            'art',
            'article',
            'artist',
            'as',
            'ask',
            'assume',
            'at',
            'attack',
            'attention',
            'attorney',
            'audience',
            'author',
            'authority',
            'available',
            'avoid',
            'away',
            'baby',
            'back',
            'bad',
            'bag',
            'ball',
            'bank',
            'bar',
            'base',
            'be',
            'beat',
            'beautiful',
            'because',
            'become',
            'bed',
            'before',
            'begin',
            'behavior',
            'behind',
            'believe',
            'benefit',
            'best',
            'better',
            'between',
            'beyond',
            'big',
            'bill',
            'billion',
            'bit',
            'black',
            'blood',
            'blue',
            'board',
            'body',
            'book',
            'born',
            'both',
            'box',
            'boy',
            'break',
            'bring',
            'brother',
            'budget',
            'build',
            'building',
            'business',
            'but',
            'buy',
            'by',
            'call',
            'camera',
            'campaign',
          ];
    
          let score = 0;
          let currentWord;
          let startTime;
    
          const game = document.getElementById('game');
          const player = document.getElementById('player');
          const wordInput = document.getElementById('word-input');
          const typedWord = document.getElementById('typed-word');
          const submitWord = document.getElementById('submit-word');
          const scoreDisplay = document.getElementById('score');
    
          let playerX = 10;
          let playerY = game.offsetHeight - 50;
          const speed = 5;
    
          function placeWord() {
            const word = document.createElement('div');
            word.textContent = words[Math.floor(Math.random() * words.length)];
            word.className = 'absolute text-2xl';
            word.style.left = `${game.offsetWidth + 10}px`;
            word.style.top = `${Math.random() * (game.offsetHeight - 50)}px`;
            game.appendChild(word);
            return word;
          }
    
          function checkCollision(word) {
            const playerRect = player.getBoundingClientRect();
            const wordRect = word.getBoundingClientRect();
            return !(
              playerRect.right < wordRect.left ||
              playerRect.left > wordRect.right ||
              playerRect.bottom < wordRect.top ||
              playerRect.top > wordRect.bottom
            );
          }
    
          function startInput(word) {
            currentWord = word.textContent;
            wordInput.style.display = 'block';
            typedWord.value = '';
            typedWord.focus();
            startTime = Date.now();
          }
    
          function endInput() {
            wordInput.style.display = 'none';
            const endTime = Date.now();
            const elapsedTime = endTime - startTime;
            const timeBonus = Math.max(2000 - elapsedTime, 0);
            score += Math.round(1000 + timeBonus);
            scoreDisplay.textContent = score;
          }
    
          function checkInput() {
            if (typedWord.value === currentWord) {
              endInput();
            }
          }
    
          function gameLoop() {
            playerY = Math.max(
              0,
              Math.min(playerY, game.offsetHeight - player.offsetHeight)
            );
            playerX = Math.max(
              0,
              Math.min(playerX, game.offsetWidth - player.offsetWidth)
            );
            player.style.top = `${playerY}px`;
            player.style.left = `${playerX}px`;
    
            const words = Array.from(
              document.querySelectorAll('#game > div:not(#player)')
            );
            words.forEach((word) => {
              const currentLeft = parseInt(word.style.left);
              word.style.left = `${currentLeft - speed}px`;
              if (checkCollision(word)) {
                startInput(word);
              }
              if (currentLeft < -word.offsetWidth) {
                word.remove();
              }
            });
    
            if (Math.random() < 0.01) {
              placeWord();
            }
    
            requestAnimationFrame(gameLoop);
          }
    
          document.addEventListener('keydown', (e) => {
            if (e.key === 'w') playerY -= speed;
            if (e.key === 'a') playerX -= speed;
            if (e.key === 's') playerY += speed;
            if (e.key === 'd') playerX += speed;
          });
    
          typedWord.addEventListener('input', checkInput);
          submitWord.addEventListener('click', checkInput);
    
          gameLoop();
        </script>
      </body>
    </html>

    API 요청

    import anthropic
    
    client = anthropic.Anthropic(
        # defaults to os.environ.get("ANTHROPIC_API_KEY")
        api_key="my_api_key",
    )
    message = client.messages.create(
        model="claude-sonnet-4-5",
        max_tokens=2000,
        temperature=0,
        messages=[
            {
                "role": "user",
                "content": [
                    {
                        "type": "text",
                        "text": "Write me a fully complete web app as a single HTML file. The app should contain a simple side-scrolling game where I use WASD to move around.  When moving around the world, occasionally the character/sprite will encounter words. When a word is encountered, the player must correctly type the word as fast as possible.The faster the word is successfully typed, the more point the player gets. We should have a counter in the top-right to keep track of points. Words should be random and highly variable to keep the game interesting.  \n  \nYou should make the website very aesthetic and use Tailwind."
                    }
                ]
            }
        ]
    )
    print(message.content)
    • API 요청
    © 2025 ANTHROPIC PBC

    Products

    • Claude
    • Claude Code
    • Max plan
    • Team plan
    • Enterprise plan
    • Download app
    • Pricing
    • Log in

    Features

    • Claude and Slack
    • Claude in Excel

    Models

    • Opus
    • Sonnet
    • Haiku

    Solutions

    • AI agents
    • Code modernization
    • Coding
    • Customer support
    • Education
    • Financial services
    • Government
    • Life sciences

    Claude Developer Platform

    • Overview
    • Developer docs
    • Pricing
    • Amazon Bedrock
    • Google Cloud’s Vertex AI
    • Console login

    Learn

    • Blog
    • Catalog
    • Courses
    • Use cases
    • Connectors
    • Customer stories
    • Engineering at Anthropic
    • Events
    • Powered by Claude
    • Service partners
    • Startups program

    Company

    • Anthropic
    • Careers
    • Economic Futures
    • Research
    • News
    • Responsible Scaling Policy
    • Security and compliance
    • Transparency

    Help and security

    • Availability
    • Status
    • Support center

    Terms and policies

    • Privacy policy
    • Responsible disclosure policy
    • Terms of service: Commercial
    • Terms of service: Consumer
    • Usage policy

    Products

    • Claude
    • Claude Code
    • Max plan
    • Team plan
    • Enterprise plan
    • Download app
    • Pricing
    • Log in

    Features

    • Claude and Slack
    • Claude in Excel

    Models

    • Opus
    • Sonnet
    • Haiku

    Solutions

    • AI agents
    • Code modernization
    • Coding
    • Customer support
    • Education
    • Financial services
    • Government
    • Life sciences

    Claude Developer Platform

    • Overview
    • Developer docs
    • Pricing
    • Amazon Bedrock
    • Google Cloud’s Vertex AI
    • Console login

    Learn

    • Blog
    • Catalog
    • Courses
    • Use cases
    • Connectors
    • Customer stories
    • Engineering at Anthropic
    • Events
    • Powered by Claude
    • Service partners
    • Startups program

    Company

    • Anthropic
    • Careers
    • Economic Futures
    • Research
    • News
    • Responsible Scaling Policy
    • Security and compliance
    • Transparency

    Help and security

    • Availability
    • Status
    • Support center

    Terms and policies

    • Privacy policy
    • Responsible disclosure policy
    • Terms of service: Commercial
    • Terms of service: Consumer
    • Usage policy
    © 2025 ANTHROPIC PBC