maintain

maintain is a skill for Claude Code, Codex from nemock/company-brain. It costs 173 tokens per session (2,661 once invoked), scanned A, original, MIT.

A maintenance tool for a company-brain vault, a folder of connected notes and documents. It checks the vault and repairs specific structural problems without changing information that needs human judgment.

In plain words
What is it for?
Use it to validate a vault, preview maintenance changes, repair approved issue types, and refresh its index and generated README section.
Why use it?
It removes repetitive cleanup as the vault grows, such as mismatched file names and identifiers or one-way links that should be two-way. It also shows issues that cannot be safely fixed automatically.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to validate a vault, preview maintenance changes, repair approved issue types, and refresh its index and generated README section.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/nemock/company-brain/maintain
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 nemock/company-brain --skill maintain
Clone the repo
git clone --depth 1 https://github.com/nemock/company-brain

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 maintain

README.md
[![agentmods](https://agentmods.dev/badge/skills/nemock/company-brain/maintain.svg)](https://agentmods.dev/skills/nemock/company-brain/maintain)
Your own site
<a href="https://agentmods.dev/skills/nemock/company-brain/maintain"><img src="https://agentmods.dev/badge/skills/nemock/company-brain/maintain.svg" alt="Measured on agentmods" height="20"></a>
Per session 173 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,661 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.00173 $0.02661
Opus 5 $0.00086 $0.01331
Sonnet 5 $0.00035 $0.00532
Haiku 4.5 $0.00017 $0.00266

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

Security

Grade A, and why

maintain 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 7d 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.

skills/maintain/SKILL.md · 148 lines

How it starts

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

maintain

This skill keeps a vault healthy as it grows. Where validate reports issues, maintain fixes the ones that can be fixed without a human call — and surfaces the rest for you to address via intake or hand-editing.

You do not invent edges. You do not silently rewrite confidence away from the original. You do not flip controlled_document from true to false. Every change has a defined repair rule.

Before any maintenance

  1. Confirm the vault path. Default: current working directory. Refuse if _system/PROFILE.md is missing.
  2. Run cb validate --path <vault> first. Get a baseline. Note which errors are repair-eligible (filename-id, missing inverse, missing controlled_document) and which need human input (duplicate ids, unknown types, broken edge targets, missing required fields).
  3. Run cb maintain audit --path <vault>. Read-only preview of what repair and decay would do. Use this to set expectations with the user before writing anything.

Capabilities

Auto-repair (cb maintain repair)

Fixes three classes of issue:

  1. Filename-id mismatch. A node whose file is named pillar-foo.md but whose frontmatter id is pillar-bar gets renamed to pillar-bar.md. Skipped if the target name already exists (won't clobber).
  2. Missing inverse edges. The schema declares one inverse pair: preceded_byfollowed_by. When A has preceded_by: B but B has no followed_by: A, the inverse is auto-added with note: "auto-added inverse of preceded_by from <A>". Other edge types have no declared inverse — maintain does not invent one.
  3. Missing controlled_document: false on risk/IFU nodes. Nodes under risk/ or entities/indications-for-use/ carry an affirmative controlled_document: false. When the field is absent, maintain sets it to false. When the field is present (even if true), maintain leaves it alone — the boundary is a safety rail and never gets silently flipped.

Always regenerates _system/INDEX.md at the end of the pass. Idempotent — re-running on an already-repaired vault is a no-op (modulo the INDEX.md rewrite).

Read the full file on GitHub · 148 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. 7d ago First seen · 148 lines · 173 tokens per session scan A 162b9fb62de7

Subscribe to this mod's changes

maintain is a skill published in the GitHub repository nemock/company-brain (5 stars, last pushed 3mo ago), licensed MIT. It adds 173 tokens to every session and 2,661 once invoked, about $0.0009 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-08-31.

Related

Other skills, from other repositories

agent-recall

Persistent compounding memory for AI agents. 5 default MCP tools: sessionstart, sessionend, remember, recall, check. Full surface (18 tools) available with --full flag. Two-verb model: inhale (sessionstart) and exhale (sessionend). Correction-first memory with decision trail tracking, watchfor warnings, palace rooms…

Goldentrii/AgentRecall-X · 157 tokens

mykg

Run mykg knowledge-graph commands inside Claude Code from one slash command /mykg. The user describes intent in natural language (extract, append, sync, resume, approve, walkthrough, parse-docs, fetch-web, query); the skill parses intent, builds the right mykg CLI command from the live --help output, confirms, runs…

SenolIsci/mykg · 175 tokens

swarmvault

Use SwarmVault when the user needs a local-first knowledge vault that writes durable markdown, graph, search, dashboard, review, chat-session, context-pack, task-ledger, static AI export, retrieval, and MCP artifacts to disk from books, notes, transcripts, exports, datasets, slide decks, files, URLs, code, and…

swarmclawai/swarmvault · 76 tokens

engraph

Index and search document collections using hybrid semantic + graph + full-text search. Use when users need to search knowledge bases, find connections between documents, discover related content via link graphs, or query indexed markdown collections.

devwhodevs/engraph · 45 tokens

compiler

Scans knowledge/, analyzes documents, generates summaries/concepts/connections to wiki/ with reference graph. Updates existing articles instead of creating duplicates.

Yrzhe/pagefly · 30 tokens

linker

Discovers missing cross-domain connections between knowledge documents and creates/updates connection wiki articles.

Yrzhe/pagefly · 20 tokens