Skip to content
Agentmart
Submit a tool

update

Update an existing Claude Code routine via the read-modify-write protocol.

Skill by hamzafer

IndexedMIT★ 10
Write a review

Chalk Labs

Need help deploying update?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/hamzafer-update

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Update an existing Claude Code routine via the read-modify-write protocol. Invoke when the user says "update <file>" or as a sub-skill of deploy. The file's frontmatter MUST contain a trigger_id. Critical safety rules apply, especially around mcp_connections and permissions.

Use cases: devops, writing, agent-building

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/update

What's inside

Skill name
update
Description
Update an existing Claude Code routine via the read-modify-write protocol. Invoke when the user says "update <file>" or as a sub-skill of deploy. The file's frontmatter MUST contain a trigger_id. Critical safety rules apply, especially around mcp_connections and permissions.
License
MIT
Instructions
78 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# claude-routines:update

Update an existing routine. The file's frontmatter MUST have a `trigger_id`. (If it doesn't, route to `create` instead.)

## CRITICAL: read-modify-write is mandatory

The API resets missing nested fields inside `job_config` to maximally-permissive defaults. If you send a partial `job_config`, the API will silently expand `allowed_tools` to a default set including Bash, Write, Edit, NotebookEdit. NEVER send a partial `job_config`.

## Procedure

1. Parse YAML frontmatter and body from the file.
2. If `trigger_id` is absent, abort and route to `create`.
3. Call `RemoteTrigger` with `action: "get"` and `trigger_id: <id>`. Capture the response as `live`.
4. Drop these read-only fields from `live` before modifying:
   - `id`, `created_at`, `updated_at`, `next_run_at`, `creator`, `ended_reason`
   - `api_token_hint`, `persist_session`, `last_fired_at`, `enabled_plugins`, `extra_marketplaces`
   - `job_config.ccr.session_context.outcomes`
5. Deep-merge frontmatter values onto `live`:
   - Top-level: `name`, `cron_expression`, `run_once_at`, `enabled`
   - `job_config.ccr.environment_id`
   - `job_config.ccr.events[0].data.message.content` (the expanded prompt body)
   - `job_config.ccr.session_context.allowed_tools` / `model` / `sources`
   - `mcp_connections` (see special handling below)
6. Expand `{{include <path>}}` directives in the prompt body before merging (same as `create`).
7. Call `RemoteTrigger` with `action: "update"`, `trigger_id: <id>`, and the merged body.
8. Surface the result and the URL `https://claude.ai/code/routines/<trigger_id>`.

## mcp_connections special handling on update

| Frontmatter `mcp_connections` | Body to send |
|---|---|
| Field absent | Don't include `mcp_connections` in the body. Live state preserved. |
| Non-empty list | `mcp_connections: [...]` (replaces live state) |
| Empty list (`[]`) | Use `clear_mcp_connections: true` (NOT `mcp_connections: []`, which is a no-op) |

## Model field placement on partial update

For UPDATE, the `model` field can be sent at the TOP LEVEL of the body, as a shortcut:

```jsonc
// Top-level form (works for partial update; sets model without touching anything else)
{"model": "claude-opus-4-7[1m]"}

// Full-config form (model lives inside job_config.ccr.session_context.model)
{"job_config": {"ccr": {..., "session_context": {"model": "claude-opus-4-7[1m]", ...}}}}
```

Use the top-level form ONLY when nothing else is changing. For any full read-modify-write, put `model` inside `session_context` as part of the merged body.

## API quirk: GET does not echo model

The `get` response does NOT include the `model` field, even when the routine is clearly running on a non-default model. This means:

- You cannot verify a model change by re-GET'ing. The web UI at `https://claude.ai/code/routines/<id>` is the only reliable visual confirmation.
- When merging live state from `get`, you won't have the current model. Use whatever's in frontmatter; if the user wants to preserve an unknown current model, ask them.

## Hard rules

1. Always read-modify-write. Never send a partial `job_config`. The cost of forgetting: silent permission expansion.
2. Use `clear_mcp_connections: true` to clear connectors. `mcp_connections: []` is a no-op.
3. `enabled: false` does NOT block manual run. It only pauses scheduled triggers. Tell the user this if they're confused.
4. There is no DELETE via API. If asked to delete, use the `delete` skill.
5. Surface API errors verbatim. On 4xx, show `error.message` to the user and stop. Don't retry, don't silently fall back.

## Common errors

- `cron interval too short`: Pick a less frequent schedule.
- `conflicting fields` (cron + run_once_at): Set exactly one.
- HTTP 404: The `trigger_id` doesn't exist. Maybe deleted via web UI. Suggest `list`.

## See also

- `deploy <file>` to route automatically
- `diff <file>` to preview the changeset
- `dry-run deploy <file>` to preview the body
- `validate <file>` to lint frontmatter and cron rules first

From hamzafer/claude-routines, MIT.

More from hamzafer/claude-routines

Signals

Stars
10
Forks
0
Open issues
0
Last commit (this folder)
May 14, 2026 (5 months ago)
Last release
Apr 27, 2026 (6 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from hamzafer

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get update running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying update?

CallGet help
Cite this page

update skill. Agent Mart. https://agentmart.dev/skills/hamzafer-update (last updated 2026-10-24)