garden
Autonomous project gardening. Scans the docs, code, and tests for maintenance issues, picks one, fixes it in a worktree, self-reviews with competing agents…
от maragudk★ 30 звёзд на GitHub
Установить garden в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Garden
A single-shot autonomous maintenance agent. You invoke it, it finds one thing worth fixing, fixes it well, and opens a PR. Then it stops. Think of it as a gardener walking through the project, tending one thing per visit: sometimes pulling a weed, sometimes taking the shears to an overgrown bed.
Inspired by the "doc-gardening" and "garbage collection" concepts from agent-first engineering: steady, small-batch tending beats painful cleanup sprints.
Flow
- Setup -- enter a worktree on a
garden/-prefixed branch - Scan -- survey the project for maintenance issues
- Select -- pick the single most worthwhile issue to fix
- Fix -- make the change, commit it
- Self-review -- dispatch two competing sub-agents to review the fix
- Iterate -- if reviewers find problems, fix and re-review (max 3 rounds)
- Ship -- open a PR against the main branch
Step 1: Setup
Create a worktree and branch:
REPO="$(git rev-parse --show-toplevel)"
WORKTREE="$REPO/.claude/worktrees/garden-$(date +%Y%m%d-%H%M%S)"
git worktree add "$WORKTREE" -b garden/<descriptive-slug>
echo "repo: $REPO"
echo "worktree: $WORKTREE"
Record both paths the block echoes -- git worktree add prints neither. Shell state doesn't survive to your next command: the variables are gone, and in a sub-agent thread the working directory resets too. So pass the worktree path explicitly from here on. Prefix later commands with cd <worktree> &&, hand the path to the reviewers you dispatch in Step 5, and reuse both paths in Step 7.
Don't re-derive the worktree path with a garden-* glob. Another garden run may have a worktree of its own, and both cd and git worktree remove fail when the glob matches more than one.
The branch name should reflect the issue you end up fixing (you can rename it after the scan). Use the garden/ prefix always.
Step 2: Scan
Survey the project for maintenance issues. The scan is intentionally broad -- you're a gardener walking through the plot, noticing what needs attention. You don't need to find everything. Some things you catch this time, others next time.
Read the project's documentation, code, and tests, cross-reference them against each other, and build a list of findings.
Docs plot
Look for these kinds of issues in documentation:
- Stale docs -- documentation that describes code, behavior, APIs, or project structure that no longer exists or has changed
- Orphaned references -- links to files, functions, sections, or URLs that don't exist or are broken
- Missing docs -- code, features, packages, or entry points that should be documented but aren't
- Inconsistencies -- docs that contradict each other or contradict the code
- README drift -- the README doesn't reflect the current state of the project (structure, features, usage, dependencies)
Code plot
Look for code that could be less code, or plainer code, while doing the same thing:
- Dead code -- functions, types, parameters, flags, imports, and branches that nothing uses or reaches
- Duplicated logic -- the same thing implemented in several places that could be one
- Needless complexity -- abstractions with a single user, indirection that hides nothing, options nobody sets, a long function that a short one would replace
- Inconsistent patterns -- one problem solved several ways where the project clearly has a preferred way
- TODO graveyards -- TODOs and commented-out code that are done, obsolete, or never going to happen
Tests plot
Look for tests that cost more to keep than they are worth:
- Useless tests -- tests that cannot fail, or that say nothing about the project's own behavior: they exercise a mock, the standard library, or a dependency, or they restate the implementation line by line
- Duplicated tests -- several tests covering the same behavior that could be one test, or one table of cases
- Stale tests -- skipped or disabled tests nobody will re-enable, tests of behavior that was removed, helpers and fixtures no test uses
How heavy-handed to be
The size of the change follows from the issue, not from a preference for small diffs. Deleting a few hundred lines or reshaping a package is fine when that is what the issue takes. What keeps heavy-handed work safe is not its size but these rules:
- Preserve behavior. A refactor or simplification changes how the code is written, not what it does. If you find a bug along the way, leave it in place and mention it in the PR; a fix hidden inside a refactor is hard to review.
- Leave public interfaces alone. Don't rename, remove, or change the signature of anything other projects or users depend on -- a library's exported API, a CLI's flags, an HTTP API, a database schema.
- Lean on the tests. Run the test suite before you change anything, so you know what passes, and again after. If the code you want to reshape has no tests covering it, pick something you can verify,
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл garden?
Autonomous project gardening. Scans the docs, code, and tests for maintenance issues, picks one, fixes it in a worktree, self-reviews with competing agents, and opens a PR. The fix can be as small as a stale doc reference or as heavy-handed as pruning useless tests, combining duplicated ones, deleting dead code, or refactoring and simplifying code. Use when the user wants to tidy up the project, fix stale docs, prune or consolidate tests, simplify or refactor code, or generally tend the codebase. Invoke with /garden.
Как установить скилл garden?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл garden запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…