news 2026/5/9 10:18:05

Agent Client Protocol 全景解析猩

作者头像

张小明

前端开发工程师

1.2k 24
文章封面图
Agent Client Protocol 全景解析猩

1. 核心概念

在 Antigravity 中,技能系统分为两层:

Skills (全局库):实际的代码、脚本和指南,存储在系统级目录(如 ~/.gemini/antigravity/skills)。它们是“能力”的本体。

Workflows (项目级):存储在项目根目录的 .agent/workflows 中。它们是“遥控器”,定义了如何在当前项目中调用全局的 Skills。

这种分离设计确保了你的项目代码库保持轻量,同时又能复用强大的全局能力。

2. 全局安装 Skills

2.1 准备目录

首先,确保全局 Skills 目录存在。Antigravity 通常使用以下路径:

mkdir -p ~/.gemini/antigravity/skills

cd ~/.gemini/antigravity/skills

2.2 安装 Anthropic 官方 Skills

这是基础技能库,包含前端设计、文档编写、测试等通用能力。

git clone https://github.com/anthropics/skills.git

# 此时目录结构应为 ~/.gemini/antigravity/skills/skills/...

2.3 安装 UI-UX-Pro-Max

这是进阶的前端设计技能,包含智能配色、排版和反模式检查。

git clone https://github.com/nextlevelbuilder/ui-ux-pro-max-skill.git

# 此时目录结构应为 ~/.gemini/antigravity/skills/ui-ux-pro-max-skill/...

全部安装完成后,目录如下:

image

3. 项目级配置 (Workflows)

要在某个项目中使用这些技能,你需要创建 Workflow 文件。建议将 .agent/ 添加到 .gitignore 中,以免污染代码库。

3.1 配置 UI-UX-Pro-Max

在项目根目录下创建 .agent/workflows/ui-ux-pro-max.md:

---

description: Generate a professional design system using UI UX Pro Max skill.

---

# UI UX Pro Max Workflow

This workflow uses the globally installed `ui-ux-pro-max-skill` to generate a comprehensive design system and implementation guidelines.

## 1. Identify Requirements

- **Query**: What is the user trying to build? (e.g., "SaaS landing page", "Crypto dashboard").

- **Stack**: What is the tech stack? (Default: `vue` or `html-tailwind` based on project).

## 2. Generate Design System

- Run the search script to generate the design system.

- **Command**:

```bash

python3 /Users/weiz/.gemini/antigravity/skills/ui-ux-pro-max-skill/src/ui-ux-pro-max/scripts/search.py "[User Query]" --design-system --format markdown --stack vue

```

_(Replace `[User Query]` with the actual request)_

## 3. Apply Design

- Read the output from the script.

- Use the generated colors, typography, and patterns to implement the user's request.

- **Critical**: Follow the "Anti-patterns" section to avoid generic AI mistakes.

3.2 配置通用 Skills (如 Frontend Design)

创建 .agent/workflows/frontend-design.md:

---

description: Apply the frontend-design skill to create distinctive interfaces.

---

# Frontend Design Workflow

This workflow guides the creation of distinctive, production-grade frontend interfaces, avoiding generic "AI aesthetics".

## 1. Analyze Requirements

- **Context**: Understand the user's request (component, page, app).

- **Goal**: Identify the problem to solve and the target audience.

## 2. Adopt Design Persona

- **Tone**: Choose a bold aesthetic (e.g., Brutalist, Glassmorphism, Neobrutalism, Minimalist Luxury).

- **Differentiation**: What makes this design unforgettable?

- **Constraint**: Respect technical constraints (Vue/VitePress in this project).

## 3. Aesthetic Guidelines (The "Pro Max" Standard)

- **Typography**: Use distinctive font weights and tracking. Avoid generic system font stacks if possible, or style them uniquely.

- **Color**: Use cohesive, bold palettes. High contrast or subtle sophisticated gradients.

- **Motion**:

- Use `transition-all duration-xxx` for smooth state changes.

- Add entrance animations (e.g., `animate-fade-in`).

- Micro-interactions on hover/active states.

- **Composition**:

- Use generous negative space.

- Break the grid where appropriate.

- Use depth (shadows, layers, blur).

- **Details**:

- Add texture (noise, gradients).

- Custom cursors or scrollbars if appropriate.

- Glassmorphism (`backdrop-blur`, `bg-opacity`).

## 4. Implementation Steps

1. **Scaffold**: Create the file structure.

2. **Style**: Apply Tailwind classes for the chosen aesthetic.

3. **Interact**: Add Vue logic for state and animations.

4. **Refine**: Review against the "Generic AI" trap. Is it too boring? Add more "juice".

## 5. Review Checklist

- [ ] Is the typography distinct?

- [ ] Are there micro-interactions?

- [ ] Is the layout responsive?

- [ ] Does it feel "Premium"?

3.3 配置技能列表查询

创建 .agent/workflows/list-skills.md:

---

description: List all available agent skills installed in the global workspace.

---

# List Available Skills (Global)

1. **Check Global Skills Directory**:

- List directories in `/Users/weiz/.gemini/antigravity/skills/skills/skills`.

2. **Display Skills**:

- Show the list of available skills to the user.

- Provide a brief description if possible (by reading `SKILL.md`).

// turbo 3. **Run Command**:

`bash ls /Users/weiz/.gemini/antigravity/skills/skills/skills`

4. 如何在项目中使用

配置完成后,你可以通过 Slash Commands 或 自然语言 来调用这些能力。

场景 A:设计一个高大上的落地页

指令:

/ui-ux-pro-max 为我的 SaaS 产品设计一个落地页,风格要科技感强

Agent 行为:

Agent 会自动运行全局的 Python 脚本。

脚本分析需求,生成一套包含配色(如深空蓝+霓虹绿)、排版(如 Inter + JetBrains Mono)和布局建议的设计系统。

Agent 读取这些建议,并直接编写 Vue/React 代码实现页面。

场景 B:查看有哪些能力可用

指令:

/list-skills

Agent 行为:

列出所有已安装的全局技能包。

场景 C:日常开发辅助

指令:

使用 frontend-design skill 帮我优化这个按钮的交互

Agent 行为:

Agent 会参考 frontend-design 工作流中的“反平庸”指南。

它不会只写一个简单的 :hover,而是可能会添加 transform: scale(1.05)、光影流光效果或磁吸效果,确保符合“Pro Max”标准。

5. 总结

通过这种 全局存储 + 本地引用 的方式,你可以:

节省空间:不需要在每个项目中重复下载几百 MB 的技能文件。

保持整洁:项目代码库中只有轻量级的 Workflow 配置文件。

能力复用:一次安装,所有项目受益。驶士氯俨

版权声明: 本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!
网站建设 2026/4/13 22:21:49

Bootstrap中的Collapse折叠组件失效的常见原因分析

Bootstrap 5中折叠功能失效的主因是数据属性前缀未更新为data-bs-toggle和data-bs-target,navbar-toggler图标不显示因缺少.navbar父容器,且必须引入bootstrap.bundle.min.js。data-bs-toggle 和 data-bs-target 写错或没改前缀Bootstrap 5 起&#xff0…

作者头像 李华
网站建设 2026/4/12 7:57:09

阿普斯特长期扩展研究显示52周持续疗效,无需实验室监测要求

银屑病关节炎(PsA)作为一种慢性疾病,需要长期有效的治疗来控制病情进展,提高患者的生活质量。阿普斯特作为一种口服磷酸二酯酶4(PDE4)抑制剂,在治疗PsA方面不仅在短期疗效上表现出色&#xff0c…

作者头像 李华
网站建设 2026/4/12 8:57:13

30岁,我放弃写了7年的Java,成功转型AI应用开发

爆肝转型!30Java程序员如何用AI编程实现300%效率提升,收藏这篇就够了 方可乐分享从Java程序员到AI应用开发工程师的转型经历。工作内容从写CRUD转变为研究大模型能力边界和设计AI业务流程。开发方式也从直接编码转变为通过AI工具如Cursor进行人机协作&am…

作者头像 李华
网站建设 2026/4/12 6:46:35

多肽合成丨司美格鲁肽/Semaglutide CAS号:197922-42-2

中文名称:司美格鲁肽/索马鲁肽英文名称:SemaglutideCAS号:197922-42-2序列:H-His-Aib-Glu-Gly-Thr-Phe-Thr-Ser-Asp-Val-Ser-Ser-Tyr-Leu-Glu-Gly-GIn-Ala-Ala-Lys(AEEAc-AEEAc-y-Glu-17-carboxyheptadecanoyl)-Glu-Phe-lle-Ala-T…

作者头像 李华
网站建设 2026/4/17 13:02:03

紧急!生产环境支付订单状态卡在“processing”超4小时?立即执行这4步金融级断点诊断:含Redis分布式锁穿透检测指令

第一章:金融级PHP支付系统故障的紧急响应原则金融级PHP支付系统承载着高并发、强一致性与零容忍资金差错的核心诉求。一旦发生故障,响应不是“尽快修复”,而是“以资金安全为绝对优先级的精准干预”。所有操作必须可追溯、可回滚、可审计&…

作者头像 李华
网站建设 2026/4/13 12:10:25

AnimateDiff惊艳效果:闭眼→睁眼→微笑全过程自然过渡视频展示

AnimateDiff惊艳效果:闭眼→睁眼→微笑全过程自然过渡视频展示 1. 引言:当静态文字“活”成动态视频 想象一下,你脑海中有一个生动的画面:一个女孩在微风中,先是闭着眼睛,然后缓缓睁开双眼,最…

作者头像 李华