b3os-ai-code-safety

b3os-ai-code-safety is a skill for Claude Code, Codex from b3rys/b3rys-team-os. It costs 124 tokens per session (4,998 once invoked), scanned A, original, Apache-2.0.

A guide to organizing code so changes stay local and do not unexpectedly affect unrelated behavior. It focuses on mapping data flow, identifying the single source of truth, and refactoring code when its structure creates unwanted dependencies.

In plain words
What is it for?
Use it when designing new code, investigating regressions, choosing module boundaries, checking data reads and writes, or planning a refactor.
Why use it?
It addresses coupling: a change in one area can otherwise ripple into places that were not edited. The guide helps agents locate the real source of data and reduce side effects.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import { pgPool } from "../infra/pg";.

Good fit Use it when designing new code, investigating regressions, choosing module boundaries, checking data reads and writes, or planning a refactor.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/b3rys/b3rys-team-os
agentmods
npx agentmods add skills/b3rys/b3rys-team-os/b3os-ai-code-safety

Made for: Claude Code, Codex.

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 b3os-ai-code-safety

README.md
[![agentmods](https://agentmods.dev/badge/skills/b3rys/b3rys-team-os/b3os-ai-code-safety/github.svg)](https://agentmods.dev/skills/b3rys/b3rys-team-os/b3os-ai-code-safety)
Your own site
<a href="https://agentmods.dev/skills/b3rys/b3rys-team-os/b3os-ai-code-safety"><img src="https://agentmods.dev/badge/skills/b3rys/b3rys-team-os/b3os-ai-code-safety/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 b3os-ai-code-safety

Your own site · 80×15
<a href="https://agentmods.dev/skills/b3rys/b3rys-team-os/b3os-ai-code-safety"><img src="https://agentmods.dev/badge/skills/b3rys/b3rys-team-os/b3os-ai-code-safety.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 124 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,998 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00124 $0.04998
Opus 5 $0.00062 $0.02499
Sonnet 5 $0.00025 $0.01000
Haiku 4.5 $0.00012 $0.00500

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

Security

Grade A, and why

b3os-ai-code-safety scanned grade A with 1 finding 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 10d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

return fetch(config.apiUrl, { headers: { token: config.token } });
skills/b3os-ai-code-safety/SKILL.md · 315 lines

How it starts

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

b3rys AI Code Safety — Structure & Refactoring

As code and logic grow, the cost is not the happy path — it is coupling: a change ripples into places you did not touch, and a "small fix" breaks something unrelated. This skill is a code-structure and refactoring guide: structure well from the initial design so a change stays local, apply operational safety where effects live, and refactor deliberately when the code smells. (Team-workflow rules — backup-first, verbatim user input, don't-touch-working-logic — live in TEAM-OS, not here.)

Two throughlines:

  • Structure to reduce side effects and coupling — so most changes stay in one place.
  • Refactor when it smells — the "I fixed one thing and something unrelated broke" signal is coupling telling you where the structure is wrong.

Phase 1 — Design (structure before writing)

  • Data flow / source of truth first. Map read → transform → write, and name the single source of truth for each piece of state. Confirm you read the live source, not a synced mirror that drops fields. (Root of the 2026-07-06 dashboard bug: a read hit the DB-synced registry, which lacked the purpose field, instead of agents.json where it lives — the code compiled and passed units, the output was wrong.)
  • SOLID as coupling design, not class patterns. (SOLID = five object-oriented design principles; here we use them as a low-coupling lens, not a class-pattern checklist.) Dependencies point inward — domain/use-case logic does not depend on framework/ORM/HTTP/infra (DIP, dependency inversion: depend on an abstraction, not a concrete infra type). One reason to change per module (SRP, single responsibility). Depend on the small slice you actually use (ISP, interface segregation: small interfaces). Add an abstraction only when a real extension axis exists (skip speculative OCP, open/closed).
  • Module boundaries hide volatile decisions. A module's public contract is a schema/interface/event/API; its private choices (storage, format, algorithm) stay hidden and swappable. One owner per concern — no two modules writing the same mutable state.

Read the full file on GitHub · 315 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. 10d ago First seen · 315 lines · 124 tokens per session scan A 6d69eaf5fdfb

Subscribe to this mod's changes

b3os-ai-code-safety is a skill published in the GitHub repository b3rys/b3rys-team-os (13 stars, last pushed yesterday), licensed Apache-2.0. It adds 124 tokens to every session and 4,998 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

dos-self-improve

Run the DOS self-improvement loop: propose a candidate, verify it in an isolated worktree, measure suite/truth/metric gates, and keep only confirmed gains. Use for recursive improvement; use dos-enforce-tune for policy knobs.

anthony-chaudhary/dos-kernel · 56 tokens

dos-unstick

Analyze BLOCKED/DRAIN run history, cluster recurring causes, and propose one structural fix per wedge via dos decisions. Use when a fleet keeps stalling and you want a systemic unblock rather than another manual nudge.

anthony-chaudhary/dos-kernel · 49 tokens

cordis-plugin-sofagent-rollback

A sofagent plugin for undoing changes in reverse order after an error, using Git snapshots and cleanup handlers for registered effects.

KongFangXun/sofagent · 87 tokens

log-troubleshooting

Investigate and troubleshoot daemon logs at /.comis/logs/. Covers NDJSON log format, Pino level codes, field dictionary, and staged analysis strategies for efficient troubleshooting of large log files. Use this skill whenever the user asks about logs, errors, warnings, daemon issues, slow operations, debugging daemon…

comisai/comis · 89 tokens

refire

Turns confirmed findings from a taste into one scoped fix run, then re-verifies each finding at its cited location. Use after /sous-chef:taste when the user says to fix the findings, apply the review, or refire it. Not for new feature work - that is a fresh /sous-chef:fire.

tomascupr/sous-chef · 71 tokens

fable-commander

A planning and review workflow in which one model prepares decisions while selected models handle research and execution. It is written for Fable and Claude Code, tools for coordinating multi-step software work.

DennisWei9898/fable-commander · 176 tokens