# Golem Read Only Method Effect

> Adds cacheable read-only methods to Effect Golem agents. Use for queries that do not mutate agent state.

- Skill: `golemcloud/golem-read-only-method-effect` (Agent Skill)
- Install (CLI): `npx skillmds@latest add golemcloud/golem-read-only-method-effect`
- Raw SKILL.md: https://api.skillmd.com/api/skills/golemcloud/golem-read-only-method-effect/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: golemcloud (https://skillmd.com/u/golemcloud)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/golemcloud/golem-read-only-method-effect

---


# Read-only Effect methods

Set `readOnly` on a `method`; handlers must remain ordinary Effects and must not mutate state or perform writes.

```ts
value: method({ input: {}, success: Schema.Number, readOnly: true })
cached: method({
  input: {},
  success: Schema.String,
  readOnly: { cache: { ttlNanos: 5_000_000_000n } },
})
```

Whether a read-only result is cached per principal is derived from its input: declare a
`PrincipalSchema` parameter when the response depends on the caller. A read-only handler without
that declared parameter cannot access the ambient `Principal` service. Do not mark a method
read-only merely because its return type is immutable.

