Agent skill

HTTP Response Handling

by HKUDS in HKUDS/OpenSpace

Handle websites requiring JavaScript by using curl with browser headers and validating file types.

MITAuto-check passed

Install HTTP Response Handling

skills CLI
$ npx skills add HKUDS/OpenSpace --skill http-response-handling -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install HKUDS/OpenSpace http-response-handling --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/HKUDS/OpenSpace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/benchmarks/gdpval/skills/http-response-handling .claude/skills/http-response-handling && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
http-response-handling
GitHub stars
7.7k
Token cost
~1k tokens
SKILL.md length
295 words
Files
2
Skills in repo
199
Repo updated
First seen
Licence
MIT

At a glance

Handle websites requiring JavaScript by using curl with browser headers and validating file types.

  • Works in 4 steps: Fetch Content with Browser-Like Headers → Detect Placeholder HTML Responses → Validate File Type Before Parsing → …
  • SKILL.md covers When to Use This Skill, Core Technique, Quick Reference Script and Common Pitfalls
  • Calls curl

What it does

HTTP Response Handling is an agent skill from HKUDS/OpenSpace. Handle websites requiring JavaScript by using curl with browser headers and validating file types.

Its SKILL.md is about 1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file.

It works with JavaScript. The repository describes itself as: "OpenSpace: The Skill Management Layer for AI Agents" -- https://open-space.cloud/. The licence is MIT.

Example prompts

  • “/http-response-handling”

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Fetch Content with Browser-Like Headers
  2. Detect Placeholder HTML Responses
  3. Validate File Type Before Parsing
  4. Handle Different Scenarios

What it can do on your machine

Read from SKILL.md and the folder at commit 3827781. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • curl

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use curl, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

HTTP Response Handling loads about 1k tokens when it runs. Until then it costs about 30 tokens; SKILL.md has 295 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~30
When it runs · the whole SKILL.md, loaded when a task matches
~1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from HKUDS/OpenSpace at commit 3827781, republished under its MIT licence (© HKUDS). 295 words, ~1,020 tokens.

Download SKILL.mdSave it as .claude/skills/http-response-handling/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
http-response-handling
description
Handle websites requiring JavaScript by using curl with browser headers and validating file types.

HTTP Response Handling for JavaScript-Dependent Sites

When to Use This Skill

Use this technique when you need to fetch content from websites that:

  • Render content dynamically with JavaScript
  • Return placeholder HTML when accessed by non-browser clients
  • Deliver different content based on User-Agent headers

Core Technique

Step 1: Fetch Content with Browser-Like Headers

Use curl with a realistic User-Agent header to mimic a real browser:

bash
curl -L -A "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" -o output.html "https://example.com"

Key flags:

  • -L — Follow redirects
  • -A — Set User-Agent header to mimic a real browser
  • -o — Save output to file for inspection
Step 2: Detect Placeholder HTML Responses

After fetching, check if you received a placeholder response instead of actual content:

bash
# Check file size (placeholder responses are often very small)
wc -c output.html

# Check for common placeholder indicators
grep -i "javascript" output.html | head -5
grep -i "loading" output.html | head -5
grep -i "noscript" output.html | head -5

Signs of a placeholder response:

  • File size is suspiciously small (<5KB for content pages)
  • Contains大量 JavaScript but minimal actual content
  • Has "loading", "spinner", or "noscript" tags
  • Missing expected text/data from the page
Step 3: Validate File Type Before Parsing

Before attempting format-specific parsing, validate the file type:

bash
# Check the file type
file output.html

# Check the actual content type (if you have the headers)
curl -I -A "Mozilla/5.0 ..." "https://example.com" | grep -i content-type

# Inspect first few lines
head -50 output.html

Common checks:

  • HTML files: Should start with <!DOCTYPE or <html
  • JSON files: Should start with { or [
  • PDF files: Should start with %PDF
  • Empty/error pages: May contain error messages or generic HTML
Step 4: Handle Different Scenarios

If you got valid HTML content:

bash
# Proceed with HTML parsing or extraction
grep -oP '(?<=<title>).*?(?=</title>)' output.html

If you got a placeholder/JS-dependent response:

  • Option A: Use a headless browser (Playwright, Selenium)
  • Option B: Look for an API endpoint that returns JSON directly
  • Option C: Check if the site has a mobile/API version with simpler responses

If you got an unexpected file type:

bash
# Check what was actually returned
file output.html

# Adjust your approach based on actual content
case $(file -b --mime-type output.html) in
  "text/html")
    # Parse as HTML
    ;;
  "application/json")
    # Parse as JSON
    ;;
  "application/pdf")
    # Handle as PDF
    ;;
  *)
    echo "Unexpected file type: $(file -b --mime-type output.html)"
    ;;
esac

Quick Reference Script

bash
#!/bin/bash
# fetch-with-validation.sh

URL="$1"
OUTPUT="${2:-output.html}"

# Fetch with browser headers
curl -L -A "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" -o "$OUTPUT" "$URL"

# Get file info
SIZE=$(wc -c < "$OUTPUT")
TYPE=$(file -b --mime-type "$OUTPUT")

echo "Downloaded: $OUTPUT"
echo "Size: $SIZE bytes"
echo "Type: $TYPE"

# Warn about potential issues
if [ "$SIZE" -lt 1000 ]; then
    echo "WARNING: File is very small - may be a placeholder response"
fi

if [ "$TYPE" = "text/html" ]; then
    if grep -qi "javascript\|loading\|spinner" "$OUTPUT"; then
        echo "WARNING: Content may be JavaScript-dependent"
    fi
fi

Common Pitfalls

  1. Not checking file type: Assuming HTML when you got JSON or an error page
  2. Using default curl User-Agent: Many sites block or serve minimal content to bots
  3. Ignoring file size: Very small files are often error pages or placeholders
  4. Not following redirects: Some sites redirect based on User-Agent

© HKUDS, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in benchmarks/gdpval/skills/http-response-handling of HKUDS/OpenSpace.

  • SKILL.md
  • .skill_id

Open the folder on GitHubat commit 3827781

Compare with similar skills

HTTP Response Handling next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

HTTP Response Handling compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
HTTP Response Handling this skillHKUDS/OpenSpace7.7k—~1kAutomated safety check: PassMIT
Code Review ChecklistshareAI-lab/learn-claude-code78k5 repos~1.1kAutomated safety check: PassMIT
Tailwindcss Developmentanonaddy/anonaddy4.9k10 repos~865Automated safety check: PassMIT
Figma use_figma Plugin API Ruleswarpdotdev/warp65k4 repos~4.4kAutomated safety check: PassAGPL-3.0
GSAP Core Animationgreensock/gsap-skills16k4 repos~3.7kAutomated safety check: PassMIT
JavaScript Concept Fact Checkerleonardomso/33-js-concepts67k1 repos~5kAutomated safety check: PassMIT

Similar skills

  • Code Review Checklist

    shareAI-lab/learn-claude-code

    Reviews code against a five-part checklist covering security, correctness, performance, maintainability and testing, and reports findings in a fixed format.

    78k GitHub starsUsed in 5 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Tailwindcss Development

    anonaddy/anonaddy

    Always invoke when the user's message includes 'tailwind' in any form.

    4.9k GitHub starsUsed in 10 repos~865 tokens
    Frontend & DesignAuto-check passed
  • Required groundwork before any use_figma call: the rules and reference files for running JavaScript in a Figma file through the Plugin API without common failures.

    65k GitHub starsUsed in 4 repos~4.4k tokens
    Frontend & DesignAuto-check passed
  • GSAP Core Animation

    greensock/gsap-skills

    Covers the GSAP core API for tweens, easing, staggers, defaults and matchMedia, and when to choose GSAP over CSS animations or other JavaScript animation libraries.

    16k GitHub starsUsed in 4 repos~3.7k tokens
    Frontend & DesignAuto-check passed
  • JavaScript Concept Fact Checker

    leonardomso/33-js-concepts

    Verifies the technical accuracy of JavaScript concept pages by checking code examples, MDN and ECMAScript claims and external links through a five-phase method.

    67k GitHub starsUsed in 1 repo~5k tokens
    Writing & ContentAuto-check passed
  • Scroll World Landing Page

    oso95/scroll-world

    Builds a scroll-driven landing page where a pre-rendered camera flies through connected AI-generated scenes, using Higgsfield for stills and video clips.

    9.7k GitHub starsUsed in 1 repo~12k tokens
    Frontend & DesignAuto-check: notes

More from HKUDS/OpenSpace

All 199 skills in this repo
  • Walks through producing a master audio track plus stems in Python, from checking a reference file and timing sections by BPM to effects, a zip archive and final verification.

    7.7k GitHub stars~2.9k tokensUpdated 1 mo ago
    Auto-check passed
  • Handle cascading data retrieval tool failures by falling back to embedded knowledge generation

    7.7k GitHub stars~765 tokensUpdated 1 mo ago
    Auto-check passed
  • Gives an agent a workaround when its code-execution sandbox keeps failing: save the Python script to a file and run it through the shell instead.

    7.7k GitHub stars~588 tokensUpdated 1 mo ago
    Auto-check passed
  • A recovery routine for agents whose sandboxed code runner keeps failing: save the Python script to disk, then run it through the shell and read the output.

    7.7k GitHub stars~652 tokensUpdated 1 mo ago
    Auto-check passed
  • Fallback ladder for failed sandboxed code runs, plus the habit of fixing the working directory first so generated files land in the right place.

    7.7k GitHub stars~1.1k tokensUpdated 1 mo ago
    Auto-check passed
  • Fallback workflow for executing Python code when executecodesandbox fails repeatedly

    7.7k GitHub stars~1.1k tokensUpdated 1 mo ago
    Auto-check passed

Works with

Questions about HTTP Response Handling

What does HTTP Response Handling do?

Handle websites requiring JavaScript by using curl with browser headers and validating file types. HTTP Response Handling is an agent skill from HKUDS/OpenSpace. Handle websites requiring JavaScript by using curl with browser headers and validating file types.

How do I install HTTP Response Handling in Claude Code?

Run `npx skills add HKUDS/OpenSpace --skill http-response-handling -a claude-code`. Or copy the skill folder (benchmarks/gdpval/skills/http-response-handling in HKUDS/OpenSpace) into .claude/skills/http-response-handling in your project. Claude Code loads it when a task matches its description.

How do I install HTTP Response Handling in Codex?

Run `npx skills add HKUDS/OpenSpace --skill http-response-handling -a codex`. Or copy the skill folder (benchmarks/gdpval/skills/http-response-handling in HKUDS/OpenSpace) into .agents/skills/http-response-handling in your project. Codex loads it when a task matches its description.

Can I use HTTP Response Handling in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add HKUDS/OpenSpace --skill http-response-handling -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/http-response-handling, .gemini/skills/http-response-handling, .github/skills/http-response-handling and .opencode/skills/http-response-handling in your project.

What does HTTP Response Handling need to run?

Going by SKILL.md and its folder, HTTP Response Handling needs the command-line tools its instructions call (curl).

Does HTTP Response Handling access the network?

SKILL.md contains no URLs. Its commands use curl, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is HTTP Response Handling safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does HTTP Response Handling use?

HTTP Response Handling is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does HTTP Response Handling use?

About 1k tokens (SKILL.md is roughly 4.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to HTTP Response Handling?

Skills that share tags, products or a category with HTTP Response Handling: Code Review Checklist (shareAI-lab/learn-claude-code, 78k stars), Tailwindcss Development (anonaddy/anonaddy, 4.9k stars), Figma use_figma Plugin API Rules (warpdotdev/warp, 65k stars) and GSAP Core Animation (greensock/gsap-skills, 16k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains HTTP Response Handling?

HKUDS (a GitHub organization) maintains it in HKUDS/OpenSpace, which has 7,743 GitHub stars. The repository holds 199 skills in this directory. The repository was last updated on August 12, 2026.

Source: HKUDS/OpenSpace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.