write-rows
Changing rows through the sql-server write tool with a counted expectedRows and a person's approval. Use when inserting, updating, deleting or merging rows on…
от melodic-software★ 34 звезды на GitHub
Установить write-rows в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Write rows
Preconditions
writeruns only on a registration started with--write, against an environment whose write block names a write login and whose write mode is on.describe_environmentsshows the write mode and the most rows one write may expect. When writes are off there, tell the person: opening them is their change to the registration or the config.- Use the environment and database settled with the choose-environment skill. A write must name its database when the environment allows more than one, and a pattern counts as more than one.
- A change of several statements that must land together goes to the run-scripts skill, never
to a run of
writecalls: eachwritecall commits on its own.
Workflow
- Write one INSERT, UPDATE, DELETE or MERGE, optionally led by WITH. The
writetool's own description lists what it refuses. - Count the rows first with
query, using the exact filter the write will use. That count isexpectedRows: the write commits only when the statement affects exactly that many rows of the target table, and rolls back otherwise. Never choose the number to fit whatever the statement happens to do. - Run
preview_writeon the target table. It lists the triggers on the table and the foreign keys whose delete or update action cascades from it. The row check counts only the target table, so rows a trigger or cascade changes are not counted and only this preview shows them. - Before the call, show the person the environment, the database, the statement,
expectedRowswith the query that counted it, and whatpreview_writelisted. A person approves everywritecall, and this is what they need to judge it. - When the count is above the most the environment lets one write expect, split the write by key into calls that each stay within it.
Outcomes
- Committed: report
committedandrowCount. - A row-count mismatch rolls back and returns an error naming both counts, so nothing changed. Find out why the counts differ (the filter, a concurrent change, a trigger) and show the person before any new attempt.
- After a timeout, or when a trigger returns more rows than the row cap, whether the write committed is not known. Read the table to learn its state and tell the person before anything else; never resend the write blind.
- On a refusal, read the message and do its
nextstep. On any other error, report the message to the person.
Next
- The write committed and the person wants the result checked: the query-safely skill.
- The change needs several statements to land together: the run-scripts skill.
Related
- No sql-server registration is available, or a call reports that the config is invalid: the setup skill.
Gotchas
- A sequence of
writecalls is not one transaction. When a later call fails, the earlier ones have already committed; a change that must land whole belongs in a script. - Leaving out
databaseon an environment with several databases or a pattern is refused for a write, even where a read without it would run in the default database.
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл write-rows?
Changing rows through the sql-server write tool with a counted expectedRows and a person's approval. Use when inserting, updating, deleting or merging rows on a sql-server registration, or a write rolled back or its outcome is unknown. Not for reads: the query-safely skill.
Как установить скилл write-rows?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл write-rows запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
AnthropicGuide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
academy-guide
AnthropicStop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
internal-comms
AnthropicA set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
skill-development
AnthropicThis skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…