---
name: garden
description: The team's shared memory. Forage it at the start of work on any topic, before proposing tools, libraries, services, designs, or workflows, and when asked "what should I use for X", "have I saved anything about X", "what do we know about X", or "any inspo for X". Save finished reports, dashboards and mockups as pages, and findings, decisions and how-tos as notes, instead of leaving them in chat or a local file. Also saves links, marks them used, shares pages and notes with the team or by link, and updates the context the weekly digest uses.
---

# Garden

The user saves links from their phone. Each one is summarized, tagged, and scored for fit. Agents and people also plant **pages** (HTML) and **notes** (Markdown) here, privately or shared with their team. This skill lets you search all of it, save new pages and notes, and record what got used.

## Setup (once)

Token: the `GARDEN_TOKEN` environment variable (older setups call it `LINKGARDEN_TOKEN`; same token). If neither is set, ask the user for it once and suggest adding `export GARDEN_TOKEN=...` to their shell profile. Never print it.

Prefer the MCP server when the client supports it; the HTTP calls below work everywhere.

Use `https://gardens.sh` exactly. Requests that get redirected to another host lose their
`Authorization` header, so `www.gardens.sh` (which redirects to the bare domain) arrives without a
token. The old `https://gardens.sh` still works.

```
claude mcp add --transport http --scope user garden https://gardens.sh/mcp --header "Authorization: Bearer $GARDEN_TOKEN"
```

## When to search

Forage first, then web search. Do it silently at the start of work on any topic, and at the start of any task that involves choosing a tool, library, service, design pattern, or approach. `forage` searches the user's links, their own pages and notes, and the pages and notes teammates shared with the team. Show at most 5 results: title, one line of summary, why it was saved or who wrote it, and when. Quote `why_saved` and the fit notes for links, not just the URL. Read a promising page or note in full with `read_item` before relying on it.

## Shared collections

Links live in gardens (collections). Some are the user's own; some are shared with their team (`gardens` marks them "shared with Fiveable"). Everyone on the team can save into a shared garden and every teammate's agents forage it, so when the user says "save this for the team", `plant` it into the shared garden. `garden_create` with `shared: true` makes a new one, only when asked. People do the same at gardens.sh under Links.

## Pages and notes (MCP)

Plant with `plant_item` when the work produced something worth reading later or by someone else:

- **page** (`kind: "page"`): a complete HTML document meant to be looked at: a report, dashboard, comparison, mockup, explainer with charts. It renders in a locked-down sandbox: scripts, styles and fonts may load from cdnjs.cloudflare.com, cdn.jsdelivr.net, unpkg.com, cdn.tailwindcss.com, code.jquery.com and Google Fonts; nothing else reaches the network (no fetch, no remote images, no forms), so inline data and images (data: URLs). Links inside a page cannot open new tabs.
- **note** (`kind: "note"`): Markdown meant to be read as text or reused as context: findings, decisions and why, how-tos, meeting outcomes, research summaries, a project's current state. Prefer a note unless layout or interactivity matters.

Give every item a specific title and a one-sentence `description`; that is what search and lists show. Add a few tags. To revise something, `update_item` the existing item rather than planting a near-duplicate; forage or `list_items` first if unsure whether it exists.

**Everything is private by default.** Never share unless the user asked to. When they do, `share_item` with `visibility: "team"` (their teammates can find and read it) or `"public_link"` (anyone with the link; the team too). Setting it back to `private`, or re-sharing, retires an old public link. You can only edit or share the user's own items; teammates' items are read-only.

After planting or sharing, give the user the `view` link (and the public link, if any). Private and team items open after signing in at gardens.sh (anyone with a fiveable.me email can sign in), where the home page lists everything the person can read and has Add pages for files and Claude artifacts; public links open for anyone. `delete_item` removes a page for good, only when asked.

## Designing pages

Pages use the Garden page kit, Fiveable's look in one stylesheet. Reference with live examples: https://gardens.sh/kit

```html
<link rel="stylesheet" href="https://gardens.sh/kit/v1.css">
<body class="g"><main class="g-wrap">
  <header class="g-head">
    <div class="g-eyebrow">Weekly report · Quinn</div>
    <h1>week of oct 19 – 25</h1>
    <p class="g-sub">Compared with the same week last year · prepared Oct 26</p>
    <p class="g-lede"><strong>The answer in one sentence.</strong> One or two more with the key numbers.</p>
  </header>
  <nav class="g-toc"><a href="#needs-you">Needs you · 12</a> …</nav>
  <section class="g-section" id="…"><h2>…</h2> … </section>
  <footer class="g-foot">definitions, sources</footer>
</main></body>
```

- Open with the answer: `.g-lede`, then a `.g-stats` row of 3–6 `.g-stat` tiles, then `.g-points` for the three to five things that matter most.
- Every number gets a comparison, and a `.g-delta` whose class says better (`good`) or worse (`bad`), not up or down; `flat` for steady. Tiles and chips take the same `good` / `bad` / `warn`.
- Tables: `.g-table` inside `.g-table-wrap`, `.num` on number cells, `.g-note` for a second line, `tr.g-group` to label groups.
- Anything the reader must act on: `ol.g-todo`, one `li` per item with `.g-ref`, a bold title, `.g-do` with the exact reply or command, and `.g-age`. It numbers itself so people can answer by number.
- Trends: `.g-colchart`, `.g-bar` or an inline `svg.g-spark`; Chart.js from cdn.jsdelivr.net for anything bigger. Inline all data.
- Long lists, definitions and caveats go in `details.g-more`.
- Don't restyle colors or fonts. Check it at 390px wide.

Notes don't need the kit; the viewer styles Markdown.

## HTTP

Base: `https://gardens.sh/api`. Header: `Authorization: Bearer $GARDEN_TOKEN`.

Search (hybrid keyword + semantic):
```
curl -sS "https://gardens.sh/api/forage?q=postgres+branching&limit=5&format=text" -H "Authorization: Bearer $GARDEN_TOKEN"
```
Drop `format=text` for JSON. Add `status=inbox,keep` to filter.

Recent saves:
```
curl -sS "https://gardens.sh/api/forage?recent=7&format=text" -H "Authorization: Bearer $GARDEN_TOKEN"
```

Save a link (tweets resolve to the link inside; duplicates merge):
```
curl -sS -X POST https://gardens.sh/api/capture -H "Authorization: Bearer $GARDEN_TOKEN" -H "content-type: application/json" \
  -d '{"url":"https://example.com","note":"why it matters","source":"agent"}'
```

Mark a link after using it (status: keep, used, skip, inbox):
```
curl -sS -X POST https://gardens.sh/api/forage -H "Authorization: Bearer $GARDEN_TOKEN" -H "content-type: application/json" \
  -d '{"id":"<uuid>","status":"used","note":"used in cms onboarding PR #42"}'
```

## Rules

1. When a foraged link ends up in the work, mark it `used` with a note saying where. That is how the collection learns what actually landed.
2. Do not put secrets, credentials, or student or customer personal data in pages or notes, even private ones.
3. When the user shares a URL in chat that looks worth keeping, offer to save it.
4. At the end of a planning session, update the `current_projects` context (MCP tool `context_set`) so the weekly digest judges fit against current work.
5. Failures return `{ "ok": false, "message": "..." }`. Relay the message, don't retry blindly.
