跳到主要内容
知仓学习社ZHICANG

auth

Set and save the CarsXE API key. Use this when the user provides a CarsXE API key, asks to configure the plugin, or when the session starts without …

不碰外部(只输出文字)无严重或高危命中hashgraph-online/awesome-codex-plugins

它会碰到什么

扫了多少1 个文本文件,2 KB
它会碰到什么不碰外部(只输出文字)
命中总数1 处
命中统计严重 0 · 高 0 · 中 0 · 低 0

这一栏是扫描器报的事实,不是结论。命中多不等于有毒(安全工具、规则库、示例脚本本来就会包含危险写法),命中少也不等于干净。它和你手上的凭据、文件、网络有什么关系,需要你自己看。

技能内容

When the user provides a CarsXE API key or asks to configure the plugin:

  1. Validate the key against the CarsXE API:
   GET https://api.carsxe.com/v1/auth/validate?key=<USER_PROVIDED_KEY>&source=codex_plugin
  • If valid: proceed to step 2.
  • If invalid: tell the user "That API key is invalid. Please check your key at https://api.carsxe.com/dashboard/developer" and stop.
  1. Persist the validated key for future sessions by writing it to the plugin config file using Node.js:
   node -e "
     const fs = require('fs');
     const os = require('os');
     const path = require('path');
     const dir = process.env.PLUGIN_DATA || process.env.CLAUDE_PLUGIN_DATA || path.join(os.homedir(), '.carsxe');
     fs.mkdirSync(dir, { recursive: true });
     fs.writeFileSync(path.join(dir, 'config.json'), JSON.stringify({ api_key: process.env.CARSXE_KEY_INPUT }));
     console.log('Saved to ' + path.join(dir, 'config.json'));
   " --env CARSXE_KEY_INPUT=<USER_PROVIDED_KEY>

This uses an environment variable to pass the key to the script, avoiding inline credential exposure.

  1. Set CARSXE_API_KEY for the current session so all skills work immediately without restarting:
  • Run the appropriate shell command for the user's platform to export CARSXE_API_KEY with the validated value.
  1. Confirm:

> "CarsXE API key validated and saved. Future sessions will load it automatically."

Verify only: If the user asks to verify their current key without changing it, call the validate endpoint with the existing CARSXE_API_KEY value and report the result.

想直接用这个技能?

本站把开放许可(MIT / Apache 等)的技能按仓库打包整理到网盘,点一下转存到你自己的网盘,不用一个个从 GitHub 拉。许可未声明的技能只给原始仓库链接,不打包。