Agent Skillsqingchencloud/cj2api › update-page

update-page

GitHub

用于修改和维护内置测试页面(src/page.ts),涵盖头部、接口卡片及多语言示例Tab,支持动态域名替换与统计展示。

.agents/skills/update-page/SKILL.md qingchencloud/cj2api

触发场景

用户要求更新或修改测试页面内容 需要调整page.ts中的UI结构或交互逻辑 修复测试页面的TS编译错误或样式问题

安装

npx skills add qingchencloud/cj2api --skill update-page -g -y
更多选项

非标准路径

npx skills add https://github.com/qingchencloud/cj2api/tree/main/.agents/skills/update-page -g -y

不安装直接使用

npx skills use qingchencloud/cj2api@update-page

指定 Agent (Claude Code)

npx skills add qingchencloud/cj2api --skill update-page -a claude-code -g -y

安装 repo 全部 skill

npx skills add qingchencloud/cj2api --all -g -y

预览 repo 内 skill

npx skills add qingchencloud/cj2api --list

SKILL.md

Frontmatter
{
    "name": "update-page",
    "license": "MIT",
    "metadata": {
        "tags": [
            "frontend",
            "page",
            "ui"
        ],
        "author": "QingChen Cloud",
        "version": "1.0.0"
    },
    "description": "维护内置测试页面(page.ts)"
}

更新测试页面 Update Page

修改内置测试页面(src/page.ts)。

页面结构

  • 头部:标题 + 版本徽章 + ChatJimmy 链接 + API Key 提示
  • 接口端点卡片:POST /v1/chat/completions、GET /v1/models
  • 四个 Tab:测试面板、cURL 示例、Python 示例、Node.js 示例
  • 响应结果区 + 统计栏(耗时、Token 数、输出速度)

注意事项

  • 代码示例中的域名通过 JS 自动替换为 window.location.origin,无需硬编码
  • 页面为纯 HTML/CSS/JS 内联在 TypeScript 模板字符串中
  • CSS 使用暗色主题,极简风格
  • 修改后需确保 TypeScript 编译通过:模板字符串中的 ${ 需要是合法的 TS 插值

版本历史

  • c831e14 当前 2026-07-19 09:01

同 Skill 集合

.agents/skills/deploy/SKILL.md
.agents/skills/release/SKILL.md
.claude/skills/deploy/SKILL.md
.claude/skills/release/SKILL.md
.claude/skills/update-page/SKILL.md

元信息

文件数
0
版本
c831e14
Hash
5a954704
收录时间
2026-07-19 09:01

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-07-21 22:44
浙ICP备14020137号-1 $访客地图$