Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

http-generate

БесплатноЗапускает вложенные скриптыНе проверен

Generates HTTP request examples for Spring Boot Web interfaces according to task specification and saves them as .http files in module-generate.md directories

spring-ai-alibabaот spring-ai-alibaba★ 2 940 звёзд на GitHub17 установок в других каталогах

Об этом скилле

HTTP Generator

This skill automatically analyzes Spring Boot Web controllers and generates HTTP request examples for all REST endpoints, saving them as .http files in their respective module directories according to the task specification.

When to Use

Use this skill when you need to:

  • Generate API documentation for testing
  • Create HTTP request examples for new modules
  • Document existing Spring Boot REST controllers
  • Provide ready-to-use request samples for developers
  • Automate API testing setup
  • Create interface specifications for team collaboration

How to Use

Generate HTTP Requests for a Single Module

Execute the HTTP generator script to create request examples for all controllers in a module:

python .claude/skills/http-generate/scripts/http_generator.py <module_path> [output_file]

Generate HTTP Requests for All Modules

Use the all parameter to automatically discover and generate HTTP files for all modules with controllers:

python .claude/skills/http-generate/scripts/http_generator.py all

Parameters:

  • module_path (required): Path to the Spring Boot module directory, or all to process all modules
  • output_file (optional): Custom output file path (default: {module_name}.http)

Examples:

# Generate for chat module-generate.md (creates basic/chat/chat.http)
python .claude/skills/http-generate/scripts/http_generator.py basic/chat

# Generate for all modules automatically
python .claude/skills/http-generate/scripts/http_generator.py all

# Generate for graph module-generate.md (creates graph/graph.http)
python .claude/skills/http-generate/scripts/http_generator.py graph/parallel

# Generate with custom output file
python .claude/skills/http-generate/scripts/http_generator.py basic/chat custom-api.http

# Generate for different modules
python .claude/skills/http-generate/scripts/http_generator.py basic/tool
python .claude/skills/http-generate/scripts/http_generator.py basic/image
python .claude/skills/http-generate/scripts/http_generator.py graph/stream

Supported Controller Patterns

The skill automatically detects and generates requests for:

HTTP Methods

  • GET @GetMapping - Query operations
  • POST @PostMapping - Create operations
  • PUT @PutMapping - Update operations
  • DELETE @DeleteMapping - Delete operations

Parameter Types

  • @RequestParam with default values
  • @RequestParam without default values
  • @PathVariable for path parameters
  • URL encoding for Chinese characters and special values

Controller Annotations

  • @RestController - JSON API endpoints
  • @Controller - MVC controllers
  • @RequestMapping - Base path mapping

Output Format (Task Specification)

The skill generates .http files according to the task specification format:

Basic Format

# {Controller类名}的{方法名}方法
{HTTP_METHOD} {完整URL路径}?{参数键值对}

###
# {Controller类名}的{方法名}方法
{HTTP_METHOD} {完整URL路径}?{参数键值对}

Generated Example

# ChatController类的callChat方法
GET http://localhost:8080/basic/chat/call?query=你好,很高兴认识你,能简单介绍一下自己吗?

###
# ChatController类的streamChat方法
GET http://localhost:8080/basic/chat/stream?query=你好,很高兴认识你,能简单介绍一下自己吗?

###
# ChatController类的callOption方法
GET http://localhost:8080/basic/chat/call/option?query=你好,很高兴认识你,能简单介绍一下自己吗?

Generated Request Features

Each generated HTTP request includes:

  • Method Documentation: Comment format # Controller类名的方法名方法
  • Complete URL: Full endpoint URL with base path
  • Default Parameters: All @RequestParam values with defaults
  • Proper Encoding: URL encoding for Chinese characters
  • Query String: Properly formatted parameter strings with ? and &
  • Separators: ### used to separate different interfaces
  • File Organization: Grouped by controller and module

Module Discovery

The skill automatically:

  1. Discovers Modules: Scans project directories for modules containing controllers
  2. Identifies Controllers: Files ending with Controller.java
  3. Analyzes Annotations: Extracts mapping annotations
  4. Extracts Parameters: Finds @RequestParam configurations
  5. Builds URLs: Constructs complete request URLs
  6. Generates Examples: Creates ready-to-use HTTP requests

Supported Spring Boot Patterns

Example 1: Simple GET Controller

@RestController
@RequestMapping("/basic/chat")
public class ChatController {

    @GetMapping("/call")
    public String callChat(
        @RequestParam(value = "query",
                    defaultValue = "你好,很高兴认识你,能简单介绍一下自己吗?",
                    required = false) String query) {
        return chatClient.prompt(query).call().content();
    }
}

Generated Request:

# ChatController类的callChat方法
GET http://localhost:8080/basic/chat/call?query=你好,很高兴认识你,能简单介绍一下自己吗?

Example 2: Complex Parameters

@GetMapping("/expand-translate")
public Map<String, Object> expandAndTran
Полный SKILL.md на GitHub

Установить http-generate в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

scripts/http_generator.py

FAQ

Что делает скилл http-generate?

Generates HTTP request examples for Spring Boot Web interfaces according to task specification and saves them as .http files in module-generate.md directories

Как установить скилл http-generate?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл http-generate запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить http-generate с