bf-domain

bf-domain is a skill for Claude Code from chan4lk/specclaw. It costs 267 tokens per session (1,824 once invoked), scanned A, original, MIT.

A codebase analysis tool for documenting the business concepts, rules, screens, workflows, and missing functions found in an existing project.

In plain words
What is it for?
Use it to map forms, user-interface files, type and constant declarations, validation routines, modules, and user-facing capabilities.
Why use it?
It turns scattered source-code evidence into documents that help explain a legacy system before you change or replace it.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

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

Good fit Use it to map forms, user-interface files, type and constant declarations, validation routines, modules, and user-facing capabilities.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/chan4lk/specclaw/bf-domain
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add chan4lk/specclaw --skill bf-domain
Clone the repo
git clone --depth 1 https://github.com/chan4lk/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-domain

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/chan4lk/specclaw/bf-domain"><img src="https://agentmods.dev/badge/skills/chan4lk/specclaw/bf-domain.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 267 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,824 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00267 $0.01824
Opus 5 $0.00133 $0.00912
Sonnet 5 $0.00053 $0.00365
Haiku 4.5 $0.00027 $0.00182

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

Security

Grade A, and why

bf-domain 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 4d 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-domain/SKILL.md · 53 lines

How it starts

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

specclaw bf-domain

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).

Analyze an existing codebase's business domain and user-facing functionality, writing .specclaw/analysis/domain-model.md, .specclaw/analysis/functional-spec.md, and .specclaw/analysis/module-map.md. Read-only side-command — no specclaw-validate-change call, no <change> involved, matching the analyze/architecture/patterns/status pattern.

  1. Resolve and collect:

    specclaw-bf-domain-collect collect .specclaw [path]
    

    [path] defaults to the repository root when omitted. The script delegates to specclaw-bf-analyze-codebase collect for path validation, manifests, dependency_graph, and discovered_docs, then adds domain-specific facts (forms, xaml_forms, other_ui_files, handler_implementations, main_form_hint, type_declarations, const_declarations, validation_routine_candidates) plus architecture_md presence and the module_map block — the prior map's status, its prior_modules[] roster (id/name/status/owned entities/rules, ID-level facts only), and next_mod_id. validation_routine_candidates is a hint list only: a narrow Valid*/Check*/Can* naming heuristic, never an exhaustive inventory of business rules — an empty array means the heuristic matched nothing, never that the codebase has no rules (see the analyst's Candidate-Hint Rule). If it exits non-zero, surface its stderr message to the user verbatim and stop — don't retry, don't guess a different path. This validation already lives inside the delegated call to specclaw-bf-analyze-codebase collect; do not reimplement it here.

    Run this step before Step 2's archive, and pass its JSON to the agent verbatim. The module_map.prior_modules[] roster is read from the live module-map.md, which Step 2 is about to move — it is the only thing that lets the agent carry surviving MOD-### ids forward instead of renumbering them, and MOD ids are permanent.

  2. Archive all three prior documents, if they exist, before writing new ones:

    mkdir -p .specclaw/analysis/archive
    mv .specclaw/analysis/domain-model.md .specclaw/analysis/archive/$(date +%Y-%m-%d-%H%M%S)-domain-model.md
    mv .specclaw/analysis/functional-spec.md .specclaw/analysis/archive/$(date +%Y-%m-%d-%H%M%S)-functional-spec.md
    mv .specclaw/analysis/module-map.md .specclaw/analysis/archive/$(date +%Y-%m-%d-%H%M%S)-module-map.md
    

    Skip each mv independently if that specific file doesn't exist yet — one may exist without the others on an unusual prior run, and module-map.md is absent entirely on any project that predates the module hierarchy. This is the same shared archive directory analyze/architecture already use — all document types land in .specclaw/analysis/archive/, distinguished by filename.

  3. Spawn the analysis agent: Agent tool, subagent_type: "bf-domain-analyst", on the model from config.yaml models.review (default: anthropic/claude-sonnet-4-5). Pass as context:

    • The collected JSON (stdout of Step 1) — including pending_questions/clarifications presence + resolved paths for the agent's own Ask, Don't Guess de-duplication, and the module_map/architecture_md blocks for rubric row 9.
    • The resolved target path.
  4. The agent writes .specclaw/analysis/domain-model.md, .specclaw/analysis/functional-spec.md, and .specclaw/analysis/module-map.md itself, per its own Output section — this skill does not write any of them.

  5. Present a short summary to the user: the path analyzed, entity/rule/capability counts, and any Named Gaps the agent flagged.

  6. Relay the module map and ask the human to confirm it. Report the module count with each module's name and owned-entity count, every cross-module reference the map recorded (an entity one module owns and another references — that is where a flow crosses a boundary), anything under ## Unassigned, and name every module or placement the agent marked ⚠ PROVISIONAL together with its PQ-NNN. Then state plainly that the map is PROPOSED and ask the user to review it and either confirm it — by editing its **Status:** line to CONFIRMED by <name>, <YYYY-MM-DD> — or tell you what to regroup.

Read the full file on GitHub · 53 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. 4d ago First seen · 53 lines · 0 tokens per session scan A fabcbe53fac6

Subscribe to this mod's changes

bf-domain is a skill published in the GitHub repository chan4lk/specclaw (12 stars, last pushed 5d ago), licensed MIT. It adds 267 tokens to every session and 1,824 once invoked, about $0.0013 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