npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

ai-jue-adapter-gemini

v1.2.0

Published

Adapter for generating Gemini AI configurations.

Readme

ai-jue-adapter-gemini

Gemini CLI 适配器:将 ai-jue 配置转换为 Gemini 原生格式

NPM version License

English | 简体中文

属于 ai-jue Monorepo 的适配器模块。


功能概述

该适配器将 ai-jue 规范能力转换为 Gemini CLI (gemini) 原生配置格式。

能力映射矩阵

开发者注意:下表中的“Gemini 原生特性”一列包含了指向该特性官方文档的 精确且已验证 的 Markdown 链接。

| 优先级 | ai-jue 能力 | Gemini 原生特性 (必须包含文档链接) | 支持状态 | 用户配置说明 | 实现策略 | |:---|:---|:---|:---|:---|:---| | ⭐⭐⭐⭐⭐ | AGENTS.md | GEMINI.md | 🟢 Native | 根目录放置 AGENTS.md | 生成 AGENTS.md 并在 GEMINI.md 头部引用 | | ⭐⭐⭐⭐⭐ | Rules | 无 | ❌ Unsupported | 不支持路径特定规则 | 逻辑降级:目前将规则作为 Markdown 块写入 GEMINI.md | | ⭐⭐⭐ | Commands | Custom Commands | 🟢 Native | 使用 /command-name 调用 | 转换为 .gemini/commands/**/*.toml 格式 | | ⭐⭐⭐ | Skills | Agent Skills | 🟢 Native | 自动识别并激活相关技能 | 转换为包含 SKILL.md 的标准技能目录 | | ⭐⭐⭐ | MCP | MCP Servers | 🟢 Native | 配置文件中的 mcpServers | 将 MCP 配置注入 .gemini/settings.json | | ⭐⭐⭐ | Hooks | Hooks | 🟢 Native | 在特定事件(如 Shell 执行前后)触发 | 将钩子脚本注入 .gemini/settings.json | | ⭐⭐ | Agents | Sub-Agents | 🟢 Native | 使用不同角色的独立提示词 | 映射至 .gemini/settings.jsonagents 字段 | | ⭐⭐ | Configuration | Settings | 🟢 Native | 配置模型参数、权限等 | 合并配置并生成 .gemini/settings.json |

详细实现说明

1. AGENTS.md(全局上下文)

  • 兼容性:Fully Compatible
  • 映射策略:生成物理 AGENTS.md 文件,并在 GEMINI.md 头部通过 @AGENTS.md 语法引用。
  • 用户操作:运行 jue apply 后,Gemini 会在每次会话开始时加载此上下文。
  • 技术细节:遵循 Gemini 原生文件引用规范。

2. Rules(路径特定规则 / Project Rules)

  • 兼容性:Incompatible (Degraded)
  • 映射策略
    • globs → ❌ 不支持
    • alwaysApply → 🟢 默认全部写入 GEMINI.md
  • 文件输出:所有规则合并写入 GEMINI.md## Rules (Degraded) 章节。

3. Commands(自定义命令)

  • 兼容性:Fully Compatible
  • 映射策略:将 commands/ 下的 Markdown 指令转换为 .gemini/commands/ 目录下的 .toml 文件。
  • 使用方式:用户在 CLI 中直接键入 /command-name 即可触发。

4. Skills(可复用技能)

  • 兼容性:Fully Compatible
  • 映射策略:生成符合 Agent Skills 规范的目录结构,包含 SKILL.md(含 YAML frontmatter)。

5. MCP(外部工具集成)

  • 兼容性:Fully Compatible
  • 配置格式:将 mcp.servers 配置直接映射至 .gemini/settings.json

6. Hooks(生命周期钩子)

  • 兼容性:Fully Compatible
  • 支持的事件:支持 PreToolUsePostToolUse 等原生 Hook。

7. Agents(子代理)

  • 兼容性:Fully Compatible
  • 映射策略:映射至 settings.jsonagents 字段。

8. Configuration(全局配置)

  • 兼容性:Fully Compatible
  • 映射策略:合并 tools.gemini 配置项至 .gemini/settings.json

限制与降级策略

关键限制

  1. Gemini CLI 目前不支持针对特定文件通配符 (globs) 的动态触发规则。

降级处理

| ai-jue 能力 | 降级方式 | 用户影响 | |:---|:---|:---| | Rules | 写入 GEMINI.md | 规则变为全局生效,无法针对特定路径自动切换。 |

安装

npm install ai-jue-adapter-gemini

使用

module.exports = {
  preset: 'base',
  adapters: ['gemini']
};

相关链接

License

MIT