본문으로 건너뛰기
cccskills

firecrawl-build 검증 로그

과제별로 요청문과 채점 항목, 항목별 점수, 실행마다의 시간・토큰, Claude Code의 전체 로그, 만든 파일을 싣습니다. 배점을 바꿔도 다시 계산할 수 있도록 원본 데이터도 둡니다.

2026년 11월 2일 실행(실행: claude-sonnet-5-5 / 채점: claude-opus-5-5). 수치는 중앙값입니다. 과제는 AI가 SKILL.md를 바탕으로 만든 것이라 스킬에 유리한 상황으로 치우칠 수 있습니다.

원본 데이터 (JSON)과제, 실행별 측정값, 채점, 집계를 그대로 둡니다.

실행별 측정값

실행결과시간토큰비용턴스킬 사용로그
과제 1 1번째 스킬 없음완료30초111,478$0.0826-전체 로그
과제 1 1번째 스킬 있음완료38초149,781$0.0939사용전체 로그
과제 1 1번째 스킬 있음 (이름 지정 없음)완료37초128,026$0.0928사용전체 로그
과제 1 2번째 스킬 있음완료35초179,652$0.08811사용전체 로그
과제 1 2번째 스킬 없음완료41초151,795$0.0688-전체 로그
과제 1 2번째 스킬 있음 (이름 지정 없음)완료26초150,716$0.0799사용전체 로그
과제 2 1번째 스킬 없음완료33초70,692$0.0694-전체 로그
과제 2 1번째 스킬 있음완료28초79,378$0.0796사용전체 로그
과제 2 1번째 스킬 있음 (이름 지정 없음)완료22초79,220$0.0766사용전체 로그
과제 2 2번째 스킬 있음완료29초99,388$0.0667사용전체 로그
과제 2 2번째 스킬 없음완료26초70,547$0.0524-전체 로그
과제 2 2번째 스킬 있음 (이름 지정 없음)완료27초80,070$0.0666사용전체 로그

“스킬 있음 (이름 지정 없음)” 실행은 호출률만 측정하며 채점하지 않습니다.

과제 1: 기존 Node 앱에 Firecrawl로 페이지 본문 가져오기 구현

요청문

Our Node app (see src/) generates link previews and summaries for URLs that users paste. The fetchPageContent(url) function in src/services/pageContent.js is still a stub. Please implement it using Firecrawl so it returns the page as clean markdown plus title/description metadata. We can't add npm dependencies right now, so call the API directly over HTTP. Follow the existing conventions in the repo (config handling, the shared http helper, the error classes). The API key must come from the environment, and we sometimes run a self-hosted Firecrawl, so the base URL should be configurable. Add tests with node:test that mock the network (no real requests) covering success, a failed/non-2xx response, and a missing API key. Update .env.example and make sure npm test passes.

채점 기준

  1. fetchPageContent sends a POST to a Firecrawl scrape endpoint (e.g. /v1/scrape or /v2/scrape) with the target url and a markdown format request, and maps the response's markdown and metadata title/description into { url, title, description, markdown }
  2. The API key is read from an environment variable through src/config.js (not hardcoded) and sent as a Bearer Authorization header; the base URL is configurable via env with a sensible default to the hosted Firecrawl API
  3. Existing conventions are reused: the request goes through postJson in src/lib/http.js, a missing key raises ConfigError, and failed/unsuccessful responses surface as UpstreamError (including a success:false body)
  4. New node:test tests mock fetch (no real network) and cover success, failure, and missing-key cases; npm test passes
  5. No new npm dependencies were added, and .env.example documents the Firecrawl key and optional base URL variable

채점 항목별 점수 (1 = 충족・0.5 = 일부・0 = 미충족)

#1번째
스킬 없음 / 스킬 있음
2번째
스킬 없음 / 스킬 있음
11 / 11 / 1
21 / 11 / 1
31 / 11 / 1
41 / 11 / 1
51 / 11 / 1
초기 파일(8)

package.json

{
  "name": "link-preview",
  "version": "0.1.0",
  "type": "module",
  "private": true,
  "scripts": {
    "test": "node --test test/"
  }
}

src/config.js

// Central config. All env access goes through here.
export const getConfig = (env = process.env) => ({
  port: Number(env.PORT ?? 3000),
  requestTimeoutMs: Number(env.REQUEST_TIMEOUT_MS ?? 30000),
});

src/lib/errors.js

export class ConfigError extends Error {
  constructor(message) {
    super(message);
    this.name = 'ConfigError';
  }
}

export class UpstreamError extends Error {
  constructor(message, { status, service } = {}) {
    super(message);
    this.name = 'UpstreamError';
    this.status = status;
    this.service = service;
  }
}

src/lib/http.js

import { UpstreamError } from './errors.js';

// Shared JSON POST helper. Pass fetchImpl in tests to avoid real network.
export const postJson = async (url, body, { headers = {}, timeoutMs = 30000, service = 'upstream', fetchImpl = globalThis.fetch } = {}) => {
  const res = await fetchImpl(url, {
    method: 'POST',
    headers: { 'Content-Type': 'application/json', ...headers },
    body: JSON.stringify(body),
    signal: AbortSignal.timeout(timeoutMs),
  });
  const text = await res.text();
  let json;
  try { json = text ? JSON.parse(text) : {}; } catch { json = { raw: text }; }
  if (!res.ok) {
    throw new UpstreamError(`${service} responded ${res.status}`, { status: res.status, service });
  }
  return json;
};

src/services/pageContent.js

// Returns { url, title, description, markdown } for a public web page.
// Used by the summarizer and the link-preview card.
export const fetchPageContent = async (url, deps = {}) => {
  throw new Error('not implemented');
};

src/services/preview.js

import { fetchPageContent } from './pageContent.js';

export const buildPreview = async (url, deps) => {
  const page = await fetchPageContent(url, deps);
  return {
    url: page.url,
    title: page.title || url,
    description: page.description || page.markdown.slice(0, 200),
  };
};

test/config.test.js

import { test } from 'node:test';
import assert from 'node:assert/strict';
import { getConfig } from '../src/config.js';

test('defaults', () => {
  const c = getConfig({});
  assert.equal(c.port, 3000);
});

.env.example

PORT=3000
REQUEST_TIMEOUT_MS=30000

1번째: 무승부 (달성률 100% / 100%)

둘 다 postJson, ConfigError, UpstreamError, 설정 가능한 기본 URL, 모킹 테스트를 갖추어 실질적 차이가 없다.

스킬 없음100%

최종 메시지

fetchPageContent(url) now calls Firecrawl over plain HTTP and returns { url, title, description, markdown }. npm test passes: 6 tests, with the network mocked so no real requests are made.

  • Config (src/config.js): it now reads FIRECRAWL_API_KEY and FIRECRAWL_BASE_URL. The base URL defaults to https://api.firecrawl.dev, and a trailing slash is stripped, so a self-hosted instance only needs the variable set.
  • Implementation (src/services/pageContent.js):
    • It uses the shared postJson helper to POST to /v1/scrape with the key as a Bearer token, asking for main-content markdown.
    • It takes optional deps (env, fetchImpl) so tests can inject a fake environment and fetch.
    • The returned url is Firecrawl's sourceURL when present, otherwise the URL you passed in.
  • Errors:
    • A missing key throws ConfigError before any request is made.
    • A non-2xx response throws UpstreamError from the helper.
    • A 200 response with success: false or no data also throws UpstreamError.
  • Tests (test/pageContent.test.js): success, custom base URL, non-2xx, success: false, and missing key.
  • .env.example: both new variables are added.
  • Key required everywhere: I made the API key mandatory, including for self-hosted instances. Self-hosted Firecrawl often runs without auth, so if yours does, we may want to relax that.
  • package.json change you didn't ask for: npm test was failing on Node 22 with "Cannot find module '/work/test'", because node --test test/ treats the directory as a module path. I changed the script to node --test, which finds the test/ directory by itself.

만들거나 바꾼 파일

스킬 있음100%

최종 메시지

fetchPageContent(url) now calls Firecrawl over plain HTTP and returns { url, title, description, markdown }. npm test passes with 6 tests. The tests mock the network, so I haven't made a real Firecrawl request. I wrote the request and response shapes from memory of Firecrawl's v2 scrape API and didn't check them against the docs.

  • Request: it POSTs to <base>/v2/scrape with formats: ['markdown'] and onlyMainContent: true. The Authorization: Bearer <key> header carries the key, and the request goes through the shared postJson helper.
  • Missing key: it throws ConfigError before any network call.
  • Failed responses: a non-2xx status throws UpstreamError from the helper. A 200 response with success: false or no markdown also throws UpstreamError.
  • Config: src/config.js now reads FIRECRAWL_API_KEY and FIRECRAWL_API_URL. The URL defaults to https://api.firecrawl.dev and any trailing slash is stripped, which covers self-hosted instances.
  • Injection: the function takes { env, fetchImpl } as its second argument, so tests can override both.
  • Tests: test/pageContent.test.js covers success, a custom base URL, a 402 response, a success: false body, and the missing key.
  • .env.example: it now lists FIRECRAWL_API_KEY and a commented-out FIRECRAWL_API_URL.

I also had to change package.json. node --test test/ fails on this machine's Node 22 with "Cannot find module '/work/test'". The test script now uses the glob node --test "test/**/*.test.js".

만들거나 바꾼 파일

2번째: 무승부 (달성률 100% / 100%)

두 결과 모두 관례를 따른 구현, 모의 테스트, .env.example 수정이 거의 같아 실질적 차이가 없다.

스킬 없음100%

최종 메시지

fetchPageContent now calls Firecrawl over plain HTTP, and npm test passes: 6 tests, 0 failures. The tests mock the network, so I haven't run it against a real Firecrawl.

  • Request: it POSTs to {FIRECRAWL_BASE_URL}/v1/scrape with {url, formats: ['markdown'], onlyMainContent: true} and a Bearer token. It uses the shared postJson helper and the existing requestTimeoutMs.
  • Return value: { url, title, description, markdown }. url comes from Firecrawl's sourceURL when present, and title and description default to ''.
  • Config: src/config.js now exposes firecrawlApiKey and firecrawlBaseUrl. The base URL defaults to https://api.firecrawl.dev and trailing slashes are stripped. .env.example has FIRECRAWL_API_KEY and FIRECRAWL_BASE_URL.
  • Errors: a missing key throws ConfigError before any request is made. A non-2xx response throws UpstreamError from the helper, with service: 'firecrawl' and the status. A 200 with success: false or no markdown also throws UpstreamError.
  • Tests: test/pageContent.test.js mocks fetch and covers success, the default base URL, non-2xx, success: false, and a missing key.

Key required for self-hosted too: a self-hosted Firecrawl that doesn't use auth would still need a dummy FIRECRAWL_API_KEY, because I made the key mandatory as you asked. If you want it optional when a custom base URL is set, that's a small change.

npm test script change: the original node --test test/ fails on this machine's Node 22 with "Cannot find module '/work/test'". I changed the script to node --test test/*.test.js, which is the only edit outside the feature. It only picks up test files directly in test/, not in subfolders.

만들거나 바꾼 파일

스킬 있음100%

최종 메시지

fetchPageContent(url) now calls Firecrawl over plain HTTP and returns { url, title, description, markdown }. npm test passes with 6 tests. I didn't check the request or response shape against the Firecrawl docs, and no real request was made. I wrote the code from my own knowledge of the /v1/scrape API, so run one real scrape before you rely on it.

  • Config: src/config.js now reads FIRECRAWL_API_KEY and FIRECRAWL_API_URL. The URL defaults to https://api.firecrawl.dev, and trailing slashes are stripped so a self-hosted instance works.
  • Request: src/services/pageContent.js sends a POST to /v1/scrape through the shared postJson helper, with a Bearer auth header. It asks for markdown only, restricted to the main page content.
  • Errors:
    • A missing API key throws ConfigError before any request is made.
    • A non-2xx response throws UpstreamError, with status and service: 'firecrawl', because postJson already does that.
    • A 200 response with success: false or no markdown also throws UpstreamError.
  • Missing metadata: if Firecrawl returns no title or description, they come back as empty strings. buildPreview already falls back to the URL and the first 200 characters of the markdown.
  • Tests: test/pageContent.test.js injects env and fetchImpl through deps, so nothing touches the network. It covers success, a custom base URL, a 402 response, success: false, and a missing key (which also checks that no request was sent).
  • .env.example: it now lists FIRECRAWL_API_KEY and a commented-out FIRECRAWL_API_URL.
  • package.json: I changed the test script from node --test test/ to node --test test/*.test.js. On this Node version (22) the old form tried to load test as a module and failed, even for the existing config test.

만들거나 바꾼 파일

과제 2: Python 에이전트에 Firecrawl 기반 웹 검색 도구 추가

요청문

I'm building a small research agent in Python (see agent/). The agent has a tool registry in agent/tools.py, and I need a new tool called web_search that takes a query string (and an optional limit, default 5) and returns live web search results the LLM can cite: a list of dicts with title, url, a short snippet, and the page markdown content when available. Please implement it with Firecrawl. Only the Python standard library is available (no pip installs), so use urllib. Read the API key from the environment and raise a clear error if it's missing; allow an optional self-hosted base URL. Register the tool the same way the existing tools are registered, and add unittest tests under tests/ that mock the HTTP call (no network) for a normal result, an empty result, and an HTTP error. Make sure python3 -m unittest discover -s tests passes.

채점 기준

  1. web_search is registered via the existing @tool decorator in the TOOLS registry and returns a list of dicts with title, url, snippet, and markdown (markdown may be empty/None when absent)
  2. The implementation calls a Firecrawl search endpoint (e.g. /v1/search or /v2/search) with the query and limit, requests page content as markdown, and correctly parses the response results list
  3. The API key comes from the environment via agent/settings.py and is sent as a Bearer token; a missing key raises a clear error (e.g. ToolError) before any request; the base URL is optionally overridable
  4. HTTP errors and unsuccessful responses are converted into a clear ToolError rather than leaking raw exceptions, and an empty result returns an empty list
  5. Tests mock urllib (no real network), cover normal, empty, and HTTP-error cases, and python3 -m unittest discover -s tests passes using only the standard library

채점 항목별 점수 (1 = 충족・0.5 = 일부・0 = 미충족)

#1번째
스킬 없음 / 스킬 있음
2번째
스킬 없음 / 스킬 있음
11 / 0.51 / 1
21 / 11 / 1
31 / 11 / 1
41 / 11 / 0.5
51 / 11 / 1
초기 파일(6)

agent/__init__.py

agent/tools.py

"""Tool registry for the research agent.

Each tool is a plain function registered with @tool. The agent passes the
returned JSON-serialisable value back to the model.
"""
import datetime

TOOLS = {}


class ToolError(Exception):
    """Raised by tools for errors that should be reported to the model."""


def tool(name, description):
    def wrap(fn):
        TOOLS[name] = {"fn": fn, "description": description}
        return fn
    return wrap


@tool("current_date", "Return today's date in ISO format.")
def current_date():
    return datetime.date.today().isoformat()

agent/settings.py

import os


def get_setting(name, default=None):
    """All environment access goes through here."""
    value = os.environ.get(name, default)
    if isinstance(value, str):
        value = value.strip()
    return value or default

tests/__init__.py

tests/test_tools.py

import unittest

from agent.tools import TOOLS, current_date


class CurrentDateTest(unittest.TestCase):
    def test_registered(self):
        self.assertIn("current_date", TOOLS)
        self.assertEqual(len(current_date()), 10)


if __name__ == "__main__":
    unittest.main()

.env.example

# Agent settings
MODEL_NAME=example-model

1번째: 스킬 없음 (달성률 100% / 90%)

B는 결과 키를 요구된 markdown 대신 content로 사용해 사양과 달라 A가 우세하다.

스킬 없음100%

최종 메시지

I added web_search to agent/tools.py. python3 -m unittest discover -s tests passes, all 7 tests. Nothing was run against the real Firecrawl API, so the request and response format is untested live.

  • Call: web_search(query, limit=5) sends a POST to {base}/v1/search using urllib, with the API key as a Bearer token. It requests markdown for each result.
  • Result: it returns a list of {title, url, snippet, markdown} dicts. markdown is None when the page content is unavailable. If a result has no description, the snippet is the first 300 characters of the markdown.
  • Response shape: it reads both data: [...] and data: {"web": [...]}, because I wasn't sure which shape your Firecrawl version returns. It reads title, url and description from the result's metadata when they aren't top-level.
  • Config: the key comes from FIRECRAWL_API_KEY, read through your existing get_setting. The optional FIRECRAWL_BASE_URL points it at a self-hosted instance; the default is https://api.firecrawl.dev.
  • Errors: a missing key, an empty query, a bad limit, an HTTP error, a network error and an API-reported failure all raise ToolError with a clear message. A missing key fails before any request is made.
  • Registration: it uses the same @tool decorator as current_date.
  • Tests: tests/test_web_search.py mocks urlopen, so no network is used. It covers a normal result (including the request URL, auth header and body), an empty result, an HTTP 401, a missing key, a custom base URL, and registration.

I used the /v1/search endpoint because I believe self-hosted Firecrawl supports it. If you only target the hosted API, switching to /v2/search is a one-line change in _firecrawl_search.

만들거나 바꾼 파일

스킬 있음90%

최종 메시지

I added web_search(query, limit=5) to agent/tools.py, registered with @tool like current_date. python3 -m unittest discover -s tests passes (7 tests). I haven't called the real Firecrawl API, so the request and response shapes come from my memory of the Firecrawl v2 docs. The firecrawl-build-search skill file wasn't in the repo for me to check against.

  • Request: it sends a POST to {base}/v2/search using urllib, asking for markdown content. The key is sent as a Bearer token.
  • Configuration: it reads FIRECRAWL_API_KEY through agent/settings.py. It raises ToolError if the key is missing, before any network call. Set FIRECRAWL_API_URL to use a self-hosted instance; otherwise it uses https://api.firecrawl.dev.
  • Results: each result is {title, url, snippet, content}. snippet is the search description, or the first 300 characters of the markdown if there's no description. content is the page markdown, or None if Firecrawl didn't return any. It accepts both the v2 response shape (data.web) and a bare list in data, in case a self-hosted version returns the older shape.
  • Errors: an empty query or a limit below 1 raises ToolError. HTTP errors, network errors and success: false responses also raise ToolError, with the status code or message included.
  • Tests: tests/test_web_search.py mocks urlopen, so nothing touches the network. It covers a normal result, an empty result, an HTTP 429 error, and the missing-key case. It also checks the registration and the self-hosted URL.

To check the response shape against the real API, run web_search("test") once with a live key.

만들거나 바꾼 파일

2번째: 스킬 없음 (달성률 100% / 90%)

B는 success:false와 잘못된 JSON도 ToolError로 변환하지만 A는 실패 응답을 처리하지 않는다.

스킬 없음100%

최종 메시지

I added the web_search tool to agent/tools.py, and python3 -m unittest discover -s tests passes (7 tests, no network). I haven't called the real Firecrawl API, so the request and response format comes from my memory of their /v1/search docs.

  • Behavior: web_search(query, limit=5) POSTs to Firecrawl's /v1/search and asks for markdown. It returns a list of {title, url, snippet, markdown} dicts. The snippet is Firecrawl's description, or the first 300 characters of the markdown if there's no description. markdown is None when Firecrawl didn't return page content.
  • Config: it reads FIRECRAWL_API_KEY through your existing get_setting. It raises ToolError with a clear message if the key is missing, before making any request. FIRECRAWL_BASE_URL is optional for a self-hosted instance and defaults to https://api.firecrawl.dev. I added both to .env.example.
  • Errors: an empty or non-string query, a bad limit, an HTTP error, a network error, invalid JSON, or success: false all raise ToolError.
  • Response shape: it also accepts the newer {"data": {"web": [...]}} response shape.
  • Registration: it uses the same @tool decorator as current_date.
  • Tests: tests/test_web_search.py mocks urllib.request.urlopen. It covers a normal result, an empty result and an HTTP 429, plus registration, a custom base URL and a missing key.

I'd run one real query against your Firecrawl account or instance to confirm the response shape before relying on it.

만들거나 바꾼 파일

스킬 있음90%

최종 메시지

I added web_search(query, limit=5) to agent/tools.py, registered with the same @tool decorator as current_date. python3 -m unittest discover -s tests passes (7 tests), but nothing has been run against the real Firecrawl API.

  • Request: it posts to Firecrawl's /v2/search with urllib and asks for markdown of each result page.
  • Response parsing: it returns a list of {title, url, snippet, markdown}. The snippet is the result's description, cut to 300 characters. markdown is None when Firecrawl doesn't return page content.
  • Config: the key comes from FIRECRAWL_API_KEY, read through get_setting in agent/settings.py. A missing key raises ToolError. FIRECRAWL_API_URL optionally points it at a self-hosted instance and defaults to https://api.firecrawl.dev.
  • Errors: an empty query, a limit below 1, an HTTP error or a network failure also raise ToolError. The HTTP error message includes the status code and the start of the response body.
  • Tests: in tests/test_tools.py they mock urlopen, so there's no network. They cover a normal result, an empty result and an HTTP 401. I also added tests for a custom base URL, a missing key and registration.

I wrote the request and response shape from memory, because the skill's search page and the Firecrawl docs weren't available here. Run one real query with your key to confirm the endpoint path and response fields. The parser also accepts the older list-style data.

만들거나 바꾼 파일