bf-architecture

bf-architecture is a skill for Claude Code from chan4lk/specclaw. It costs 139 tokens per session (943 once invoked), scanned A, original, MIT.

A codebase analysis tool that creates a C4 architecture report, from the whole system down to containers, components, and selected code details. C4 is a way to describe software architecture at several levels of detail.

In plain words
What is it for?
Use it to document system context, services or containers, components, and justified code-level views in a Mermaid-based report.
Why use it?
It turns an existing or older codebase into a structured architecture document instead of requiring people to infer the design from source files. It archives the previous report before creating a new one.

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 document system context, services or containers, components, and justified code-level views in a Mermaid-based report.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/chan4lk/specclaw/bf-architecture
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-architecture
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-architecture

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/chan4lk/specclaw/bf-architecture"><img src="https://agentmods.dev/badge/skills/chan4lk/specclaw/bf-architecture.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 139 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 943 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 warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Agent Snooping · line 22
    Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
    Fix: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
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.00139 $0.00943
Opus 5 $0.00069 $0.00472
Sonnet 5 $0.00028 $0.00189
Haiku 4.5 $0.00014 $0.00094

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

Security

Grade A, and why

bf-architecture 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-architecture/SKILL.md · 42 lines

What it actually says

specclaw bf-architecture

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 architecture and write .specclaw/analysis/architecture.md. Read-only side-command — no specclaw-validate-change call, no <change> involved, matching the analyze/patterns/status pattern.

  1. Resolve and collect:

    specclaw-bf-analyze-codebase collect .specclaw [path]
    

    [path] defaults to the repository root when omitted. The script itself validates that [path] exists, resolves inside the repository, and is not .specclaw itself or nested inside it, and now also emits a dependency_graph field alongside its existing fields. 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 collect; do not reimplement it here.

  2. Archive the prior architecture report, if any, before writing a new one:

    mkdir -p .specclaw/analysis/archive
    mv .specclaw/analysis/architecture.md .specclaw/analysis/archive/$(date +%Y-%m-%d-%H%M%S)-architecture.md
    

    Skip this step if .specclaw/analysis/architecture.md doesn't exist yet. This is the same shared archive directory skills/analyze/SKILL.md uses for codebase-report.md — both document types land in .specclaw/analysis/archive/, distinguished by filename.

  3. Spawn the analysis agent: Agent tool, subagent_type: "bf-architecture-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, which now includes dependency_graph).
    • The resolved target path.
    • Whether .specclaw/analysis/pending-questions.md and .specclaw/analysis/clarifications.md exist (simple [ -f ... ] checks — this command has no dedicated collector to add the fields to, unlike bf-domain) and their resolved paths if so, for the agent's own Ask, Don't Guess de-duplication.
  4. The agent writes .specclaw/analysis/architecture.md itself, per its own Output section — this skill does not write the file.

  5. Present a short summary to the user: the path analyzed, which C4 levels were written, and any component the agent flagged "L4 not warranted for this component."

  6. Show what comes next:

    specclaw-bf-status .specclaw --next
    

    Render its output verbatim, after the summary above — never instead of it. Read-only, writes nothing, costs a second.

    Only if this run completed. Step 1 says to surface collect's stderr and stop; that means stop. A run that did not finish must never print a next step, which would read as though the phase advanced when it did not.

    Never work the next step out yourself. specclaw-bf-status owns the lifecycle ordering for every bf-* command — which phase follows which, which open items are human work, and which command clears them. A next phase decided here would be a second copy of that ordering, diverging the moment either side changes.

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 · 42 lines · 0 tokens per session scan A c6aab6001431

Subscribe to this mod's changes

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