bf-quality

bf-quality is a skill for Claude Code from chan4lk/specclaw. It costs 318 tokens per session (3,372 once invoked), scanned A, original, MIT.

A code-quality analysis tool for examining an existing codebase and recording measurements such as complexity, duplication, and file or function size.

In plain words
What is it for?
Use it to scan the whole project, compare measurements with configured limits, and produce a machine-readable JSON file and a Markdown report.
Why use it?
It gives a consistent view of how difficult a codebase is to maintain, especially when the project is old or has no current quality report.

Skill for Claude Code

Written for Claude Code: $CLAUDE_PLUGIN_ROOT variable.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the specclaw plugin — 32 skills, 21 agents shipped together

Good fit Use it to scan the whole project, compare measurements with configured limits, and produce a machine-readable JSON file and a Markdown report.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add chan4lk/specclaw
Claude Code
/plugin install specclaw

Made for: Claude Code.

Or install specclaw, the plugin that ships this one along with the rest of its 32 skills, 21 agents.

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 bf-quality

README.md
[![agentmods](https://agentmods.dev/badge/skills/chan4lk/specclaw/bf-quality.svg)](https://agentmods.dev/skills/chan4lk/specclaw/bf-quality)
Your own site
<a href="https://agentmods.dev/skills/chan4lk/specclaw/bf-quality"><img src="https://agentmods.dev/badge/skills/chan4lk/specclaw/bf-quality.svg" alt="Measured on agentmods" height="20"></a>
Per session 318 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,372 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.00318 $0.03372
Opus 5 $0.00159 $0.01686
Sonnet 5 $0.00064 $0.00674
Haiku 4.5 $0.00032 $0.00337

Measured 3d ago against content hash 91b13d93eabe, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

bf-quality 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 3d 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.

plugins/specclaw/skills/bf-quality/SKILL.md · 144 lines

How it starts

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

specclaw bf-quality

First, run specclaw-ensure-init .specclaw — idempotently creates .specclaw/ if it doesn't exist (silent if already initialized; auto-inits using the current directory's basename as the project name).

Measure code quality and write .specclaw/analysis/quality.json + .specclaw/analysis/quality-report.md. Read-only side-command — no specclaw-validate-change call, no <change> involved, matching the analyze/architecture/domain/clarify pattern.

What this command is, and what it is not

This is the only place quality is judged. /specclaw:bf-analyze, /specclaw:bf-domain and /specclaw:bf-architecture answer what is this system; this answers what shape is the code in. Those are different questions and the second one is a judgement, so it lives in exactly one command — a reader never has to wonder which document a complexity number came from. Nothing here changes what any other command does.

It is also not agents/code-reviewer.md. That reads one change's diff, forms a professional opinion across ten dimensions, and gates a PR. This reads a whole tree, runs measuring tools, and compares numbers to thresholds. The two deliberately disagree on some conventions — the reviewer flags functions over ~30 lines as a matter of taste, this command's default WARN band is 60 — because one is advice to an author and the other is a metric on a legacy corpus nobody is about to hand-tidy.

Fully optional. No other command requires anything this one produces. The single exception is /specclaw:bf-rebuild-plan, which annotates its per-module rollup with quality status if quality.json happens to exist and behaves byte-for-byte identically when it does not.

Tool prerequisites

jq is required. The three metric tools are all optional and are probed at every run:

Tool Provides Install
scc LOC, per-file line counts, per-language file counts go install github.com/boyter/scc/v3@latest, or a release binary
lizard per-function cyclomatic complexity, function length, parameter count pip install lizard
jscpd duplication percentage npm install -g jscpd

Read the full file on GitHub · 144 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. 3d ago First seen · 144 lines · 0 tokens per session scan A 91b13d93eabe

Subscribe to this mod's changes

bf-quality is a skill published in the GitHub repository chan4lk/specclaw (12 stars, last pushed 4d ago), licensed MIT. It adds 318 tokens to every session and 3,372 once invoked, about $0.0016 per session on Opus 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-09-05.

Related

Other skills, from other repositories

upload-assets

An asset-upload workflow that sends files to a console’s content-delivery network and prepares a review-request payload for a person to submit.

TOKTOKHAN-DEV/agent-company · 2 tokens

review-spec

A workflow for comparing an existing feature specification with the project's review checklist and implementation. It looks for missing requirements, differences between documented screens and actual screens, and lessons from rejected submissions.

TOKTOKHAN-DEV/agent-company · 2 tokens

wire-sdk

An SDK integration guide for 앱인토스, a platform for building apps inside Toss. It covers permissions, persistent storage, sharing links, screen controls, safe-area spacing, and secure WebSocket connections.

TOKTOKHAN-DEV/agent-company · 2 tokens

optimize-seo-geo

A workflow for filling only the SEO and GEO sections of a post's front matter. SEO helps a page appear in search results, while GEO prepares information for answer systems that may quote or cite it.

TOKTOKHAN-DEV/agent-company · 6 tokens

write-draft

A writing workflow that turns an outline into a full article while following a project’s content guidelines. It emphasizes clear structure, plain language, fact checking, and marked placeholders for unverified claims.

TOKTOKHAN-DEV/agent-company · 3 tokens

write-spec

A feature-specification workflow that turns a feature request into a Markdown file describing screens, acceptance checks, boundaries, and unanswered questions.

TOKTOKHAN-DEV/agent-company · 2 tokens