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.
git clone --depth 1 https://github.com/b3rys/b3rys-team-osnpx agentmods add skills/b3rys/b3rys-team-os/b3os-ai-code-safetyWrote 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.
[](https://agentmods.dev/skills/b3rys/b3rys-team-os/b3os-ai-code-safety)<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.
<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>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00124 | $0.08843 |
| Opus 5.5 | $0.00050 | $0.03537 |
| Sonnet 5.5 | $0.00025 | $0.01769 |
| Haiku 4.5 | $0.00012 | $0.00884 |
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 2d 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 } }); How it starts
The opening of the file, as written. The whole thing — 409 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. (Example: reading a synced copy that lacks a field compiles and passes unit tests, but the output is 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.
- 서버·클라이언트 역할 분리. 서버는 상태(코드)와 데이터를 주고, 클라이언트는 그것을 문장·아이콘·UI 로 보여 준다. 서버가 화면에 보일 문장을 만들면 문구 하나 바꿀 때마다 서버를 고치게 된다. 사람이 읽는 문장·튜닝 숫자·AI 지시문은 코드에 넣지 않고 문구·설정 파일로 분리한다 — 그래야 문구를 고치거나 다른 언어를 추가할 때 코드를 수정하지 않고, 화면을 언어마다 따로 만들지 않는다. 100% 원칙은 아니다 — 디버깅 로그처럼 개발자만 보는 문장 등 필요한 경우는 코드에 둘 수 있다.
- Start simple; restructure when a change starts causing side effects — not up front. The criterion is not size: it is whether one class or function has taken on so many jobs that changing one breaks another. With few features, don't layer in advance. Watch these, cheapest first:
- Cross-area direct writes (primary): count how many areas write the same shared field. A guard test fails if the count goes up; the target is one entry point per field.
- A mutant in one area fails another area's tests (primary): that is a side-effect coupling point — split there.
- A state judged from three or more fields combined by
ifs → one state value + onereduce(state, event) → (state, effects)table; every cell written, an empty cell fails a test. - Line count of a file or function (signal only): report it, don't fail on it. A very long function or a file with many unrelated sections is where to look first.
- Don't take the first design when it is expensive to reverse. For a data shape, a storage or wire format, a public API, or a new UI interaction with no precedent in the codebase, get 2–3 independent candidates (a different model family when available) or build small runnable prototypes and compare them side by side. Write the caller's usage first in each candidate. Answer open questions by running a prototype, not by debate, and review a plan only after code has answered its open questions — a plan with no code behind it draws invented risks. A design judgment (refactor or not, where a shared rule lives, the direction of a large fix) goes to a read-only architect review first, and the question always includes "is this necessary? is it over-engineering?"; report the verdict with the dissent. Most changes need none of this.
- For code other code will call, write the usage doc first. A short README or example of how a caller uses the new package or API sets the target and forces the caller's view.
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 2d ago Changed 1fe8a74f28eb
- 8d ago Changed · +8 lines cc3f73410194
- 9d ago Changed · +3 lines 427a1193075c
- 11d ago Changed · +42 lines 7561ba467a44
- 13d ago Changed · +2 lines 07f54b0ef00b
- 14d ago Changed · +2 lines 1d27b4aae355
- 28d ago Changed · +6 lines ef56c9dc2950
- 1mo ago Changed · +31 lines 04718dbb22b8
- 1mo ago First seen · 315 lines · 124 tokens per session scan A 6d69eaf5fdfb
b3os-ai-code-safety is a skill published in the GitHub repository b3rys/b3rys-team-os (14 stars, last pushed today), licensed Apache-2.0. It adds 124 tokens to every session and 8,843 once invoked, about $0.0005 per session on Opus 5.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.
Other skills, from other repositories
harness-doctor
Scans a project's harness structure (.claude/ directory, CLAUDE.md, rules, agents) to diagnose complexity, drift, missing files, and broken references, then suggests improvements. --lint flag adds language-pattern scan (self-marketing, cushion words, version brags). Triggered by "harness check", "structure diagnosis"…
install-doctor
Scans the existing environment (after the built-in /doctor — this covers FH-plugin conflicts it does not) before and after meta-harness plugin install to diagnose conflicts, duplicates, and silent overwrite risks. Reports potential conflict areas with existing CLAUDE.md, skills, hooks, and audit practices. Activates…
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.
mcp-circuit-breaker
Detects MCP tool failure patterns and trips a circuit breaker to stop cascading retries. Proposes fallback alternatives and resets when the tool recovers. Triggers on "MCP failing", "tool keeps erroring", "circuit-breaker", repeated tool call failures.
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.
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…