dancing-bear: Agent for Claude Code

.claude/agents/code-writer-opus.md

code-writer-opus is an agent for Claude Code from dancing-bear-show/dancing-bear. It costs 55 tokens per session (600 once invoked), scanned A, original, MIT.

A code implementation agent for complex changes involving many files or difficult reasoning. It is intended as a stronger alternative when another coding agent has failed or become confused.

In plain words
What is it for?
Use it for deeply connected refactors, subtle bugs, and changes that could affect many parts of a project.
Why use it?
It helps with changes where simple edits are likely to miss interactions or introduce regressions. Its instructions also require running focused tests, the full test suite, and code-quality checks.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

This is dancing-bear-show/dancing-bear's own configuration. It tells Claude Code how to work on dancing-bear 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 dancing-bear configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is | ./bin/workflow select-concerns --paths-file - --format json.

Reuse

Borrowing it

Nothing to install: this file belongs to dancing-bear-show/dancing-bear. 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/dancing-bear-show/dancing-bear/main/.claude/agents/code-writer-opus.md
Clone the repo
git clone --depth 1 https://github.com/dancing-bear-show/dancing-bear

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 code-writer-opus

README.md
[![agentmods](https://agentmods.dev/badge/agents/dancing-bear-show/dancing-bear/code-writer-opus/github.svg)](https://agentmods.dev/agents/dancing-bear-show/dancing-bear/code-writer-opus)
Your own site
<a href="https://agentmods.dev/agents/dancing-bear-show/dancing-bear/code-writer-opus"><img src="https://agentmods.dev/badge/agents/dancing-bear-show/dancing-bear/code-writer-opus/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 code-writer-opus

Your own site · 80×15
<a href="https://agentmods.dev/agents/dancing-bear-show/dancing-bear/code-writer-opus"><img src="https://agentmods.dev/badge/agents/dancing-bear-show/dancing-bear/code-writer-opus.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 55 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 600 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.00055 $0.00600
Opus 5.5 $0.00022 $0.00240
Sonnet 5.5 $0.00011 $0.00120
Haiku 4.5 $0.00006 $0.00060

Measured yesterday against content hash 7586954a6920, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

code-writer-opus 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 yesterday.

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/agents/code-writer-opus.md · 58 lines

How it starts

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

Code Implementation Agent (Opus)

You are a code implementation agent for dancing-bear. Use this agent when the task is too complex for Sonnet: deeply entangled refactors, subtle bugs requiring long reasoning chains, or changes with high blast radius across multiple domains.

Implementation Rules

  • Use @dataclass for structured data, not dicts
  • Type hints on all function signatures; PEP 585/604 syntax (list[str], str | None)
  • Lazy imports for optional deps (Google APIs, PyYAML, MSAL)
  • Never break backwards compatibility of bin/* entry points
  • # nosec B110/B112 with intent comment on any bare except block

After Making Changes

  • Run domain tests: PYTHONPATH="$PWD/src" python3 -m unittest discover tests/<domain>_tests/ -v Never a bare unittest run — in a worktree an inherited PYTHONPATH resolves imports to the main checkout, so tests pass against unmodified code.
  • Run full suite: make test
  • Lint: make lint qlty check --all works from an isolated worktree now — the exclusion was narrowed to **/.claude/worktrees/**. Pass --all: the default is changed-files-only, which prints "✔ No issues" on a clean branch either way.

Review Concerns (Self-Check Before Finishing)

Get the guides for your changed files using the canonical selector. Pipe the list from git so no path is ever placed in shell text (a filename with spaces splits, and one with shell metacharacters executes):

set -o pipefail
{ git diff --name-only HEAD && git ls-files --others --exclude-standard; } \
  | ./bin/workflow select-concerns --paths-file - --format json

git diff lists only tracked files; git ls-files --others adds the files you created. pipefail makes a failing git command fail the whole check rather than silently selecting guides for an empty list.

For files not yet changed, Write the paths one per line to a uniquely named file and pass --paths-file "<that file>" instead.

The rules live in concerns/selection.yaml.

Git Rules

Read the full file on GitHub · 58 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. yesterday First seen · 58 lines · 55 tokens per session scan A 7586954a6920

Subscribe to this mod's changes

code-writer-opus is an agent published in the GitHub repository dancing-bear-show/dancing-bear (7 stars, last pushed yesterday), licensed MIT. It adds 55 tokens to every session and 600 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-11-07.

Related

code-writer-opus compared with agents from other repositories

code-writer-opus next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
code-writer-opusdancing-bear-show/dancing-bearAgent7yesterdayMITA55Claude Code
test-failure-analystGoldziher/ai-rulezAgent167yesterdayMITA26Claude Code
incident-responderechoVic/blade-codeAgent18126d agoMITA36Claude Code
diagnosis-analystselftune-dev/selftuneAgent186d agoMITA58Claude Code
deep-auditorLucasSantana-Dev/sharekitAgent26d agoMITA84Claude Code
unstickerfatihkan/badiAgent71mo agoMITA13Claude Code
auditorfatihkan/badiAgent71mo agoMITA13Claude Code