smart-citizen: Command for Claude Code

.claude/commands/begin_work.md

begin_work is a command for Claude Code from Osiris-DevWorks/smart-citizen. It costs 38 tokens per session (1,609 once invoked), scanned A, original, Apache-2.0.

A command that starts work on a GitHub issue, a tracked task in a code project. It selects the right release branch, creates an issue branch, and guides implementation step by step.

In plain words
What is it for?
Use it to begin an issue for a specific software release, prepare the needed Git branches, and work through the plan and implementation with pauses for confirmation.
Why use it?
It removes the manual setup and branch-choice work before coding. Checkpoints let you review each stage before the next one begins.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: reads .claude/ paths; mentions CLAUDE.md.

This is Osiris-DevWorks/smart-citizen's own configuration. It tells Claude Code how to work on smart-citizen itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything smart-citizen configures →

Reuse

Borrowing it

Nothing to install: this file belongs to Osiris-DevWorks/smart-citizen. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/Osiris-DevWorks/smart-citizen/main/.claude/commands/begin_work.md
Clone the repo
git clone --depth 1 https://github.com/Osiris-DevWorks/smart-citizen

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for begin_work

README.md
[![agentmods](https://agentmods.dev/badge/commands/osiris-devworks/smart-citizen/begin_work/github.svg)](https://agentmods.dev/commands/osiris-devworks/smart-citizen/begin_work)
Your own site
<a href="https://agentmods.dev/commands/osiris-devworks/smart-citizen/begin_work"><img src="https://agentmods.dev/badge/commands/osiris-devworks/smart-citizen/begin_work/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for begin_work

Your own site · 80×15
<a href="https://agentmods.dev/commands/osiris-devworks/smart-citizen/begin_work"><img src="https://agentmods.dev/badge/commands/osiris-devworks/smart-citizen/begin_work.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 38 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,609 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00038 $0.01609
Opus 5.5 $0.00015 $0.00644
Sonnet 5.5 $0.00008 $0.00322
Haiku 4.5 $0.00004 $0.00161

Measured 2mo ago against content hash 72aee8ba9716, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

begin_work scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/begin_work.md · 108 lines

How it starts

The opening of the file, as written. The whole thing — 108 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/begin_work

Bootstrap a work session for a GitHub issue. Resolves which release/X.Y.Z integration branch holds the work — reusing an existing unmerged branch when one fits, otherwise opening a new one by following the /start_release procedure — then creates a feature branch off it for the issue. After setup, drives the work in chunks with checkpoints between each stage so the user stays in the loop.

Work through every step in order. After each step, stop at the CHECKPOINT and wait for the user before proceeding.

Arguments

$ARGUMENTS — two whitespace-separated tokens, both required:

  1. issue — a GitHub issue URL (https://github.com/Osiris-DevWorks/smart-citizen/issues/NN) or short form (#NN). The repo is implicit (Osiris-DevWorks/smart-citizen).
  2. target release — either an explicit semver X.Y.Z (e.g. 1.4.3) or a bump type (major / minor / patch).

If either argument is missing or malformed, abort with: "/begin_work requires: <issue-url-or-#NN> <X.Y.Z | major | minor | patch>"

1. Parse and validate arguments

  • Extract the issue number from URL or #NN shorthand.
  • Validate the target release:
    • Matches ^\d+\.\d+\.\d+$ → treat as explicit version.
    • Is major / minor / patch → compute the explicit version from current VERSION.TXT (same math as /start_release).
    • Otherwise abort.

2. Fetch and summarize the issue

gh issue view <NN> --json number,title,body,labels,state,url
  • If state is closed, warn the user.
  • Present a short summary: number, title, state, labels, and a one-paragraph summary of the body (keep it tight — the full body is in conversation context).

CHECKPOINT — confirm the issue summary captures the work, or correct it. Wait for the user.

3. Resolve the target release branch

Target is release/X.Y.Z (the version from step 1). Check the world in this order:

  • Already merged to main: git branch -r --merged origin/main | grep -F "origin/release/X.Y.Z". If matched, abort — "release/X.Y.Z is already merged to main; pick a higher target."
  • Exists locally: git rev-parse --verify release/X.Y.Z. If yes, git checkout release/X.Y.Z. Confirm VERSION.TXT on it equals X.Y.Z.
  • Exists on origin only: git ls-remote --heads origin release/X.Y.Z. If matched, git fetch origin release/X.Y.Z:release/X.Y.Z, then check out. Confirm VERSION.TXT.
  • Does not exist anywhere: open it by following the procedure in .claude/commands/start_release.md. Use the bump type the user passed; if they passed an explicit version, derive the bump type by diffing current VERSION.TXT (on main) against X.Y.Z. The derived bump must be a single step (next patch, next minor, or next major). If the requested version skips ahead (e.g. current 1.4.2 → requested 1.6.0), abort and ask the user to clarify intent.

Read the full file on GitHub · 108 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 108 lines · 38 tokens per session scan A 72aee8ba9716

Subscribe to this mod's changes

begin_work is a command published in the GitHub repository Osiris-DevWorks/smart-citizen (114 stars, last pushed today), licensed Apache-2.0. It adds 38 tokens to every session and 1,609 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.