dancing-bear: Skill for Claude Code

.claude/skills/decompose/SKILL.md

decompose is a skill for Claude Code from dancing-bear-show/dancing-bear. It costs 38 tokens per session (2,615 once invoked), scanned A, original, MIT.

A refactoring helper for splitting an oversized Python source or test file into smaller modules with focused responsibilities. It updates imports and other call sites to use the new modules directly rather than adding a compatibility re-export.

In plain words
What is it for?
Use it when a Python source, test, or utility file is unusually large, when review flags a file, or when maintaining a domain that needs to be split into clearer modules.
Why use it?
Large files can be hard to review and maintain, and indirect re-exports can hide where code really lives. This process addresses both the file size and the references that depend on it.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions CLAUDE.md.

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 DOMAINS=<domain> PYTHONPATH="$PWD/src" python3 workflows/code/scripts/detect_facades.py.

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/skills/decompose/SKILL.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 decompose

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/dancing-bear-show/dancing-bear/decompose"><img src="https://agentmods.dev/badge/skills/dancing-bear-show/dancing-bear/decompose.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,615 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.02615
Opus 5.5 $0.00015 $0.01046
Sonnet 5.5 $0.00008 $0.00523
Haiku 4.5 $0.00004 $0.00262

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

Security

Grade A, and why

decompose 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/skills/decompose/SKILL.md · 232 lines

How it starts

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

Decompose

Split an oversized Python source or test file into focused submodules. The original module is deleted and every import site is updated to name its new module directly — no re-export facades. The companion workflow workflows/code/decompose-sweep.yaml automates this across an entire domain.

When to Use

  • A file exceeds the size thresholds below
  • User says "decompose", "split", "break up", or "too large"
  • Code review flags a file as too large to review
  • Maintenance pass on a domain you're touching anyway

Size Thresholds

Calibrated against the actual file distribution in this repo:

File type Flag for review Strong candidate Split immediately
Source module (src/<domain>/*.py) 500+ lines 700+ lines 900+ lines
Test file (tests/**/*.py) 700+ lines 850+ lines 1000+ lines
Helper/utility module 400+ lines 550+ lines 700+ lines

Rationale: source files in this repo cluster around 400-600 lines with the top 5 ranging 915-1041; test files cluster around 700-900 with the top at 1084. Thresholds are set to catch genuine outliers, not routine files.

Step 1: Identify Candidates

# Find large source files in a domain
find src/<domain>/ -name "*.py" -not -path "*/__pycache__/*" | xargs wc -l | sort -rn | head -20

# Find large test files
find tests/<domain>_tests/ -name "*.py" | xargs wc -l | sort -rn | head -10

# Repo-wide (skip venv, pycache)
find . -name "*.py" \
  -not -path "./.venv/*" \
  -not -path "*/__pycache__/*" \
  -not -path "*/.claude/*" \
  | xargs wc -l | sort -rn | head -20

Step 2: Analyze Structure

Read the full file, then identify:

  • Split boundaries: test classes, functional groupings (producers vs consumers), feature areas, command groups
  • Shared state: fixtures, base classes, constants, helpers used by multiple groups
  • Dependency map: which symbols are imported by other files in the package

Read the full file on GitHub · 232 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 · 232 lines · 38 tokens per session scan A f4c7d6f4bb62

Subscribe to this mod's changes

decompose is a skill published in the GitHub repository dancing-bear-show/dancing-bear (7 stars, last pushed yesterday), licensed MIT. It adds 38 tokens to every session and 2,615 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

decompose compared with skills from other repositories

decompose next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
decomposedancing-bear-show/dancing-bearSkill7yesterdayMITA38Claude Code
biopythonsynthetic-sciences/openscienceSkill4.4ktodayApache-2.0A76Claude Code, Codex
python-replgptme/gptmeSkill4.5ktodayMITA15Claude Code, Codex
dd-code-generationDataDog/pupSkill1.0kyesterdayApache-2.0A16Claude Code
fastapiericrisco/rsc-harnessSkill5554d agoMITA94Claude Code, Codex
pythonericrisco/rsc-harnessSkill5554d agoMITA94Claude Code, Codex
djangoericrisco/rsc-harnessSkill5554d agoMITA84Claude Code, Codex