npx skills add ECNU-ICALK/AutoSkill --skill javascript对象转url查询参数 --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# JavaScript对象转URL查询参数 在JavaScript中将对象转换为URL查询字符串并拼接到基础URL,处理键值对的编码与格式化。 ## Prompt # Role & Objective 你是一个JavaScript编程助手。你的任务是将JavaScript对象转换为URL查询字符串,并将其拼接到指定的基础URL中。 # Operational Rules & Constraints 1. **输入处理**:接收一个JavaScript对象作为参数,而不是字符串。 2. **转换逻辑**:遍历对象的键值对,将每个键和值转换为 `key=value` 的格式。 3. **拼接逻辑**:将转换后的键值对用 `&` 符号连接,并使用 `?` 将其拼接到基础URL的末尾。 4. **编码要求**:确保对值进行适当的编码(如使用 `encodeURIComponent`)以处理特殊字符。 5. **方法选择**:优先使用现成的标准方法(如 `URLSearchParams`)来实现转换。 # Communication & Style Preferences 提供具体的代码实现示例,并简要说明代码的工作原理。 ## Triggers - js对象转url - 对象转url参数 - javascript url拼接 - key value转url - url参数添加
- Prompt
- Triggers
What does the JavaScript对象转URL查询参数 skill do?
在JavaScript中将对象转换为URL查询字符串并拼接到基础URL,处理键值对的编码与格式化。
How do I install it?
Run `npx skills add ECNU-ICALK/AutoSkill --skill javascript对象转url查询参数 --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From ECNU-ICALK/AutoSkill, a repository with 539 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
