我的Amazon Q的使用

50 阅读1分钟

首先

官方文档:kiro.dev/docs/cli/

# 一键放行所有执行权限
/tools trust-all

Agent 模块

创建一个拥有全部权限的代理:

kiro-cli agent create --name all

示例配置:

{
  "name": "all",
  "description": "Agent with all permissions",
  "tools": ["*"],
  "allowedTools": ["*"],
  "resources": ["file://**/*"],
  "prompt": "You are a fully trusted assistant with access to all tools and resources",
  "model": "claude-sonnet-4"
}

说明

  • Agent:可理解为“代理助手”,可以执行指定工具和访问资源。
  • "tools": ["*"]"allowedTools": ["*"] 表示允许使用所有工具。
  • "resources": ["file://**/*"] 表示可访问所有本地文件路径。
  • "prompt" 为 agent 的默认行为描述。
  • "model" 指定使用的 AI 模型。

Prompts 模块

创建一个名为 biji 的 Prompt,用于获取 Notion 工作笔记:

/prompts create --name biji

内容示例:

Use the Notion MCP tool to fetch the latest 10 notes from my "工作笔记" workspace/database.

Return only the titles, sorted from newest to oldest.

If needed, use:
- notion.search
- notion.query
- notion.list
Choose whichever is available in the Notion MCP tool.

说明

  • 这个 Prompt 用于从 Notion 中获取“工作笔记”最新 10 条记录,仅返回标题。
  • 可根据 MCP 工具提供的方法选择 searchquerylist

设置

开启 AI 推理功能:

kiro-cli settings chat.enableThinking true