← 返回 Skills 市场
arthbhalodiya

Jules API

作者 arthbhalodiya · GitHub ↗ · v1.0.0
cross-platform ⚠ suspicious
802
总下载
0
收藏
2
当前安装
1
版本数
在 OpenClaw 中安装
/install jules-api
功能描述
Create and manage Google Jules AI coding sessions to automate tasks like code writing, bug fixing, testing, and PR creation on GitHub repos using the Jules API.
使用说明 (SKILL.md)

\r \r

Jules API Skill\r

\r Interact with the Google Jules AI coding agent via its REST API. Jules can autonomously execute coding tasks on your GitHub repositories — writing code, fixing bugs, adding tests, and creating pull requests.\r \r Base URL: https://jules.googleapis.com/v1alpha\r Auth: Pass your API key via the x-goog-api-key header. Get one at jules.google.com/settings.\r \r ---\r \r

List Sources (Connected Repositories)\r

\r Discover which GitHub repos are connected to your Jules account:\r \r

curl -s -H "x-goog-api-key: $JULES_API_KEY" \\r
  "https://jules.googleapis.com/v1alpha/sources?pageSize=30"\r
```\r
\r
With pagination:\r
\r
```bash\r
curl -s -H "x-goog-api-key: $JULES_API_KEY" \\r
  "https://jules.googleapis.com/v1alpha/sources?pageSize=10&pageToken=PAGE_TOKEN"\r
```\r
\r
Filter specific sources:\r
\r
```bash\r
curl -s -H "x-goog-api-key: $JULES_API_KEY" \\r
  "https://jules.googleapis.com/v1alpha/sources?filter=name%3Dsources%2Fgithub-owner-repo"\r
```\r
\r
## Get a Source\r
\r
Get details and branches for a specific repo:\r
\r
```bash\r
curl -s -H "x-goog-api-key: $JULES_API_KEY" \\r
  "https://jules.googleapis.com/v1alpha/sources/SOURCE_ID"\r
```\r
\r
Example: `sources/github-myorg-myrepo` — replace with your actual source ID from List Sources.\r
\r
---\r
\r
## Create a Session (Start a Coding Task)\r
\r
Create a new Jules session to execute a coding task on a repo:\r
\r
```bash\r
curl -s -X POST \\r
  -H "x-goog-api-key: $JULES_API_KEY" \\r
  -H "Content-Type: application/json" \\r
  -d '{\r
    "prompt": "TASK_DESCRIPTION",\r
    "title": "OPTIONAL_TITLE",\r
    "sourceContext": {\r
      "source": "sources/github-OWNER-REPO",\r
      "githubRepoContext": {\r
        "startingBranch": "main"\r
      }\r
    },\r
    "requirePlanApproval": true\r
  }' \\r
  "https://jules.googleapis.com/v1alpha/sessions"\r
```\r
\r
### Parameters\r
\r
| Parameter | Required | Description |\r
|---|---|---|\r
| `prompt` | Yes | The task description for Jules to execute |\r
| `title` | No | Optional title (auto-generated if omitted) |\r
| `sourceContext.source` | Yes | Source resource name (e.g. `sources/github-owner-repo`) |\r
| `sourceContext.githubRepoContext.startingBranch` | Yes | Branch to start from (e.g. `main`, `develop`) |\r
| `requirePlanApproval` | No | If `true`, plans need explicit approval before execution |\r
| `automationMode` | No | Set to `AUTO_CREATE_PR` to auto-create PRs when done |\r
\r
### Auto-approve + Auto-PR example\r
\r
```bash\r
curl -s -X POST \\r
  -H "x-goog-api-key: $JULES_API_KEY" \\r
  -H "Content-Type: application/json" \\r
  -d '{\r
    "prompt": "Add comprehensive unit tests for the auth module",\r
    "sourceContext": {\r
      "source": "sources/github-myorg-myrepo",\r
      "githubRepoContext": { "startingBranch": "main" }\r
    },\r
    "automationMode": "AUTO_CREATE_PR"\r
  }' \\r
  "https://jules.googleapis.com/v1alpha/sessions"\r
```\r
\r
---\r
\r
## List Sessions\r
\r
List all your Jules sessions:\r
\r
```bash\r
curl -s -H "x-goog-api-key: $JULES_API_KEY" \\r
  "https://jules.googleapis.com/v1alpha/sessions?pageSize=10"\r
```\r
\r
Paginate with `pageToken`:\r
\r
```bash\r
curl -s -H "x-goog-api-key: $JULES_API_KEY" \\r
  "https://jules.googleapis.com/v1alpha/sessions?pageSize=10&pageToken=NEXT_PAGE_TOKEN"\r
```\r
\r
## Get a Session\r
\r
Retrieve a single session by ID (includes outputs like PRs if completed):\r
\r
```bash\r
curl -s -H "x-goog-api-key: $JULES_API_KEY" \\r
  "https://jules.googleapis.com/v1alpha/sessions/SESSION_ID"\r
```\r
\r
### Session States\r
\r
| State | Meaning |\r
|---|---|\r
| `QUEUED` | Waiting to be processed |\r
| `PLANNING` | Jules is analyzing and creating a plan |\r
| `AWAITING_PLAN_APPROVAL` | Plan ready, waiting for user approval |\r
| `AWAITING_USER_FEEDBACK` | Jules needs additional input |\r
| `IN_PROGRESS` | Jules is actively working |\r
| `PAUSED` | Session is paused |\r
| `COMPLETED` | Task completed successfully |\r
| `FAILED` | Task failed to complete |\r
\r
---\r
\r
## Approve a Plan\r
\r
When a session is in `AWAITING_PLAN_APPROVAL` state, approve the plan:\r
\r
```bash\r
curl -s -X POST \\r
  -H "x-goog-api-key: $JULES_API_KEY" \\r
  -H "Content-Type: application/json" \\r
  -d '{}' \\r
  "https://jules.googleapis.com/v1alpha/sessions/SESSION_ID:approvePlan"\r
```\r
\r
## Send a Message\r
\r
Send feedback, answer questions, or give additional instructions to an active session:\r
\r
```bash\r
curl -s -X POST \\r
  -H "x-goog-api-key: $JULES_API_KEY" \\r
  -H "Content-Type: application/json" \\r
  -d '{\r
    "prompt": "YOUR_MESSAGE_HERE"\r
  }' \\r
  "https://jules.googleapis.com/v1alpha/sessions/SESSION_ID:sendMessage"\r
```\r
\r
Use this when session state is `AWAITING_USER_FEEDBACK` or to provide additional guidance during `IN_PROGRESS`.\r
\r
---\r
\r
## List Activities (Monitor Progress)\r
\r
Get all events/progress for a session:\r
\r
```bash\r
curl -s -H "x-goog-api-key: $JULES_API_KEY" \\r
  "https://jules.googleapis.com/v1alpha/sessions/SESSION_ID/activities?pageSize=50"\r
```\r
\r
Get activities after a specific timestamp (for polling):\r
\r
```bash\r
curl -s -H "x-goog-api-key: $JULES_API_KEY" \\r
  "https://jules.googleapis.com/v1alpha/sessions/SESSION_ID/activities?createTime=2026-01-17T00:03:53Z"\r
```\r
\r
### Activity Types\r
\r
Activities will contain exactly one of these event fields:\r
\r
| Event | Description |\r
|---|---|\r
| `planGenerated` | Jules created a plan (contains `plan.steps[]`) |\r
| `planApproved` | A plan was approved |\r
| `userMessaged` | User sent a message |\r
| `agentMessaged` | Jules sent a message |\r
| `progressUpdated` | Status update during execution |\r
| `sessionCompleted` | Session finished successfully |\r
| `sessionFailed` | Session encountered an error (contains `reason`) |\r
\r
### Artifacts\r
\r
Activities may include artifacts:\r
\r
- **ChangeSet**: Code changes with `gitPatch` (unified diff, base commit, suggested commit message)\r
- **BashOutput**: Command output with `command`, `output`, `exitCode`\r
- **Media**: Binary output with `mimeType` and base64 `data`\r
\r
## Get a Single Activity\r
\r
```bash\r
curl -s -H "x-goog-api-key: $JULES_API_KEY" \\r
  "https://jules.googleapis.com/v1alpha/sessions/SESSION_ID/activities/ACTIVITY_ID"\r
```\r
\r
---\r
\r
## Delete a Session\r
\r
```bash\r
curl -s -X DELETE \\r
  -H "x-goog-api-key: $JULES_API_KEY" \\r
  "https://jules.googleapis.com/v1alpha/sessions/SESSION_ID"\r
```\r
\r
---\r
\r
## Typical Workflow\r
\r
1. **List sources** to find the repo resource name\r
2. **Create a session** with a prompt describing the task\r
3. **Poll the session** (Get Session) to track state changes\r
4. **List activities** to monitor progress and read Jules' messages\r
5. If `requirePlanApproval` was set, **approve the plan** when state is `AWAITING_PLAN_APPROVAL`\r
6. If state is `AWAITING_USER_FEEDBACK`, **send a message** with your response\r
7. When `COMPLETED`, **get the session** to find the output PR URL\r
\r
## Error Handling\r
\r
| Code | Meaning |\r
|---|---|\r
| 200 | Success |\r
| 400 | Bad request (invalid parameters) |\r
| 401 | Unauthorized (invalid/missing API key) |\r
| 403 | Forbidden (insufficient permissions) |\r
| 404 | Not found |\r
| 429 | Rate limited |\r
| 500 | Server error |\r
\r
Error responses return:\r
\r
```json\r
{\r
  "error": {\r
    "code": 400,\r
    "message": "Invalid session ID format",\r
    "status": "INVALID_ARGUMENT"\r
  }\r
}\r
```\r
\r
## Notes\r
\r
- Get your API key from [jules.google.com/settings](https://jules.google.com/settings)\r
- Store it as the `JULES_API_KEY` environment variable\r
- Sources (repos) are connected via the Jules web UI at [jules.google](https://jules.google) — the API is read-only for sources\r
- Session resource names follow the pattern `sessions/{sessionId}`\r
- Activity resource names follow `sessions/{sessionId}/activities/{activityId}`\r
- All list endpoints support `pageSize` (1-100) and `pageToken` for pagination\r
安全使用建议
This skill appears to be a genuine Jules REST API helper, but review these points before installing or running it: - The included script (scripts/jules.sh) uses jq to construct and parse JSON, but the skill metadata only lists curl as required. If you run the script without jq installed it will likely fail (set -euo will cause early exit). Install jq or update the script/metadata before use. - The skill requires your JULES_API_KEY. That key gives Jules access to repositories that are connected to your Jules account and can be used to auto-create pull requests (automationMode AUTO_CREATE_PR). Only use with an API key you trust and consider limiting scope or using an account with minimal privileges. - There are no hidden network endpoints or download steps in the package, but the helper script will perform network calls to jules.googleapis.com — inspect the script and test in a controlled environment first. - If you intend to allow autonomous agent actions, be cautious about auto-approve/auto-PR flows; prefer requirePlanApproval unless you trust the automation. If you want to proceed: either install jq on the host or edit the script to avoid jq (or update skill metadata to declare jq in required binaries). If you are unsure about giving Jules account access to important repos, create a low-privilege Jules/GitHub integration for testing and rotate the API key after use.
功能分析
Type: OpenClaw Skill Name: jules-api Version: 1.0.0 The OpenClaw AgentSkills skill bundle for the Google Jules API is benign. It provides a legitimate interface to the Jules REST API, allowing users to manage coding sessions. All network requests are directed to the official `jules.googleapis.com` endpoint, and the `JULES_API_KEY` is handled appropriately as an authentication header. The `SKILL.md` documentation and the `scripts/jules.sh` helper script contain no evidence of data exfiltration, unauthorized command execution, persistence mechanisms, or prompt injection attempts against the OpenClaw agent. User inputs for JSON payloads are properly escaped using `jq -Rs .` in `jules.sh`, mitigating potential injection risks.
能力评估
Purpose & Capability
Name/description, declared env var (JULES_API_KEY), and curl usage align with a Jules REST API client. However, the included scripts/jules.sh relies on jq for building and parsing JSON (unconditionally in places) while the skill metadata only lists curl as a required binary. That mismatch means the skill as packaged may fail at runtime unless jq is present, and the metadata underreports the actual runtime footprint.
Instruction Scope
SKILL.md instructs only against Jules endpoints (sessions, sources, activities) and sending the API key via the x-goog-api-key header. There is no instruction to read unrelated files, other environment variables, or exfiltrate data to third parties. Note: the skill supports automation modes (AUTO_CREATE_PR) that will cause Jules to create PRs on connected GitHub repos — this is expected but impactful behavior.
Install Mechanism
No install spec (instruction-only) which reduces supply-chain risk. However, a helper script is included in the bundle (scripts/jules.sh) that will be executed if the user runs it; it writes/executes nothing on install but will run curl and jq at runtime. No external downloads or archive extraction are present.
Credentials
Only JULES_API_KEY is required and is appropriate for the documented API interactions. Users should be aware that the API key grants Jules access to repositories connected to the Jules account (including ability to create PRs when automationMode is used), so key scope and trust in the Jules integration matter.
Persistence & Privilege
Skill does not request always:true and makes no persistent system changes in its files. It does not modify other skills or system-wide agent settings. Autonomous invocation is allowed (platform default) but is not combined with other high-privilege requests.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install jules-api
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /jules-api 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of the Jules API skill: - Create and manage Google Jules AI coding sessions via the Jules REST API. - Start coding tasks, monitor session progress, and retrieve session activities and artifacts. - Approve plans, send messages to sessions, and interactively guide coding tasks. - List, query, and fetch details for connected GitHub sources (repositories). - Comprehensive documentation for all endpoints, required parameters, and usage examples.
元数据
Slug jules-api
版本 1.0.0
许可证
累计安装 2
当前安装数 2
历史版本数 1
常见问题

Jules API 是什么?

Create and manage Google Jules AI coding sessions to automate tasks like code writing, bug fixing, testing, and PR creation on GitHub repos using the Jules API. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 802 次。

如何安装 Jules API?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install jules-api」即可一键安装,无需额外配置。

Jules API 是免费的吗?

是的,Jules API 完全免费(开源免费),可自由下载、安装和使用。

Jules API 支持哪些平台?

Jules API 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Jules API?

由 arthbhalodiya(@arthbhalodiya)开发并维护,当前版本 v1.0.0。

💬 留言讨论