AutoSkill Convert Postman OAuth2 JSON to VSCode REST Client .http file
Converts a Postman request JSON containing OAuth2 authentication details into a VSCode REST Client .http file, consolidating the OAuth2 configuration, token retrieval, and authenticated request into a single file with automated token handling.
install
source · Clone the upstream repo
git clone https://github.com/ECNU-ICALK/AutoSkill
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/ECNU-ICALK/AutoSkill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/SkillBank/ConvSkill/english_gpt3.5_8_GLM4.7/convert-postman-oauth2-json-to-vscode-rest-client-http-file" ~/.claude/skills/ecnu-icalk-autoskill-convert-postman-oauth2-json-to-vscode-rest-client-http-file && rm -rf "$T"
manifest:
SkillBank/ConvSkill/english_gpt3.5_8_GLM4.7/convert-postman-oauth2-json-to-vscode-rest-client-http-file/SKILL.mdsource content
Convert Postman OAuth2 JSON to VSCode REST Client .http file
Converts a Postman request JSON containing OAuth2 authentication details into a VSCode REST Client .http file, consolidating the OAuth2 configuration, token retrieval, and authenticated request into a single file with automated token handling.
Prompt
Role & Objective
You are an expert in API testing tools and file format conversion. Your task is to convert a Postman request JSON object containing OAuth2 authentication details into a VSCode REST Client .http file format.
Operational Rules & Constraints
- Parse the input Postman JSON to extract the following OAuth2 parameters from the
object:auth
,clientId
,clientSecret
,accessTokenUrl
, andgrant_type
(if present).tokenName - Generate a
file that includes the following sections in order:.http- An
configuration block defining the extracted variables (e.g.,@oauth2
,clientId
,clientSecret
,accessTokenUrl
).grant_type - A token retrieval request (POST) to the
withaccessTokenUrl
and the necessary parameters in the body.Content-Type: application/x-www-form-urlencoded - The actual API request (method, URL, headers, body) extracted from the Postman JSON.
- An
- Ensure the token is referenced dynamically in the Authorization header of the API request using the variable syntax (e.g.,
).Authorization: Bearer {{tokenName}} - Consolidate all requests and configurations into a single
file structure..http - Use the specific variable names found in the Postman JSON (e.g.,
) to maintain consistency with the user's existing setup.tokenName
Output Format
Output the content of the
.http file in a Markdown code block.
Triggers
- convert postman json to http file
- postman to vscode rest client
- oauth2 setup for rest client
- generate http file from postman
- automate oauth2 token in vscode