Khaos-Brain: Skill for Codex

.agents/skills/kb-organization-maintenance/SKILL.md

kb-organization-maintenance is a skill for Codex from liuyingxuvka/Khaos-Brain. It costs 61 tokens per session (1,941 once invoked), scanned A, original, MIT.

A maintenance cycle for a shared organization knowledge base that exchanges reviewed cards between machines. The shared base is an exchange layer, not a single source of truth.

In plain words
What is it for?
Use it when explicitly asked to inspect, review, or maintain a validated organization knowledge-base repository on a machine enabled for organization maintenance.
Why use it?
It lets a repository contribute eligible local knowledge and refresh its local snapshot without automatically adopting cards or changing the local canonical model.

Skill for Codex

Written for Codex: agents/openai.yaml present. Also seen: installed under .agents/ (shared by several agents).

This is liuyingxuvka/Khaos-Brain's own configuration. It tells Codex how to work on Khaos-Brain itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything Khaos-Brain configures →

Reuse

Borrowing it

Nothing to install: this file belongs to liuyingxuvka/Khaos-Brain. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/liuyingxuvka/Khaos-Brain/main/.agents/skills/kb-organization-maintenance/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/liuyingxuvka/Khaos-Brain

Made for: 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 kb-organization-maintenance

README.md
[![agentmods](https://agentmods.dev/badge/skills/liuyingxuvka/khaos-brain/kb-organization-maintenance/github.svg)](https://agentmods.dev/skills/liuyingxuvka/khaos-brain/kb-organization-maintenance)
Your own site
<a href="https://agentmods.dev/skills/liuyingxuvka/khaos-brain/kb-organization-maintenance"><img src="https://agentmods.dev/badge/skills/liuyingxuvka/khaos-brain/kb-organization-maintenance/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 kb-organization-maintenance

Your own site · 80×15
<a href="https://agentmods.dev/skills/liuyingxuvka/khaos-brain/kb-organization-maintenance"><img src="https://agentmods.dev/badge/skills/liuyingxuvka/khaos-brain/kb-organization-maintenance.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 61 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,941 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.00061 $0.01941
Opus 5 $0.00030 $0.00971
Sonnet 5 $0.00012 $0.00388
Haiku 4.5 $0.00006 $0.00194

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

Security

Grade A, and why

kb-organization-maintenance 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 12d 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.

.agents/skills/kb-organization-maintenance/SKILL.md · 76 lines

How it starts

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

KB Organization Maintenance

Run one organization maintenance cycle for this predictive KB repository: maintain the shared repository, contribute eligible local cards, and refresh a complete local snapshot for direct read-only retrieval.

The organization KB is a shared exchange layer, not a central truth layer. Treat organization maintenance as Sleep for the shared exchange surface: it can maintain main cards and imported card content when the evidence supports the decision. Local machines still decide how strongly to rely on organization cards. Normal retrieval uses the synchronized snapshot directly; it never auto-adopts a card, publishes a local model, or installs a card-bound Skill.

The shared card remains an exchange projection. Organization maintenance owns the organization repository's review state, not any machine's local LogicGuard model or ModelMesh. A receiving machine searches and uses the synchronized card directly; only later outcome evidence may cause local Sleep to reinforce, dampen, suppress, or derive a new local candidate. Similarity or co-use never creates a local canonical mesh edge automatically.

Use kb/imports as the sole incoming lane and kb/main as the sole organization exchange surface. Retired kb/trusted or kb/candidates roots are upgrade-only input and must make daily maintenance fail visibly. Local download/search reads organization cards only from kb/main, never from kb/imports or an old root.

Authority

Work from the repository root. Treat these files as authoritative before stateful organization maintenance:

  • PROJECT_SPEC.md
  • docs/maintenance_agent_worldview.md
  • docs/organization_mode_plan.md
  • .agents/skills/local-kb-retrieve/SKILL.md
  • organization-review guidance, when available. This is a judgment aid, not an apply gate.

Current user instructions still override repository files.

Execution Contract

  1. Use scripts/kb_org_maintainer.py --automation --cycle as the entry point. It serializes the existing organization maintenance and contribution facades; do not schedule either child separately.
  2. The entry point must first read .local/khaos_brain_desktop_settings.json.
  3. If organization mode is not validated or this machine has not opted into organization maintenance, exit successfully with a no-op result.
  4. Run KB preflight against system/knowledge-library/organization before inspecting organization candidates.
  5. Pin the exact source commit. If the source is an upgradeable old managed format, run the versioned direct-to-current source upgrader transaction before ordinary validation; normal maintenance has no legacy reader. Validate schema-2 manifest, exact catalog identity set, kb/imports, kb/main, portable LogicGuard bundles, absence of retired roots/fields, Skill registry, and Git state. After synchronization, copy the verified source bundles into one content-addressed immutable snapshot and move its pointer only by compare-and-swap.
  6. Read the shared maintenance-agent worldview and apply the exchange-layer Sleep model: organization main cards are maintainable content, not untouchable central truth.
  7. Run the organization card-surface map checkpoint. Summarize main trusted/candidate/rejected/deprecated counts plus import counts; low-confidence main trusted cards; duplicate/similar cards; stale rejected/deprecated cards; Skill-linked cards; retired-layout residual count; and privacy/Skill risks before applying anything. A nonzero retired-layout residual is a blocker, not a readable surface.
  8. Run the organization candidate intake checkpoint. Review new imports for reusable scenario, action, prediction, confidence, route, provenance, and public sharing value; reviewed imports can move into main as candidate or trusted.
  9. Run the organization content-hash checkpoint. Use content hashes for duplicate analysis across main, imports, prior accepted uploads, and current proposals. The source upgrader assigns a stable new identity to every non-identical duplicate and records exact duplicates as catalog tombstones; ordinary snapshot code must reject duplicate current identities.
  10. Run the mandatory organization similar-card merge checkpoint. Inspect overlapping cards by scenario, action, prediction, route, evidence, and content hash. A proposed merge must either produce a digest-bound reversible apply packet with explicit field ownership, or close as keep_separate/blocked_evidence with a machine-evaluable reopen condition. Generic permanent watch is not a terminal.
  11. Run the mandatory organization overloaded-card split checkpoint. Use LogicGuard node roles and boundaries rather than list length. A proposed split must either produce a reversible apply packet, or close as keep_single/blocked_evidence with an executable reopen condition. Legitimate alternatives under one root claim are not automatically an overloaded card.
  12. Run the organization card decision checkpoint. For each reviewed card bundle, including main cards, decide whether to keep, approve/promote, reject with reason, rewrite, adjust confidence, supersede, deprecate, merge, or split. Do not skip the decision checkpoint itself.
  13. Apply the organization maintenance worldview to card candidates, main card changes, card-and-Skill bundles, Skill registry changes, privacy boundaries, and GitHub auto-merge readiness. Use organization-review as a review lens when available, but do not block direct Sleep-style maintenance because the local Skill is absent.
  14. Run the organization Skill safety checkpoint. For every declared Skill dependency or Skill candidate, check card evidence, public usefulness, privacy boundaries, install risk, bundle_id, sha256: content hash, current unavailable_skill_guidance, read-only import behavior, and status.
  15. Run the organization Skill bundle version checkpoint. Group Skill bundles by bundle_id; approve only original-author updates on the same bundle, treat non-author changes as forks with new bundle_id, and select the latest approved version by version_time for organization distribution.
  16. Treat candidate, approved, and rejected as Skill-bundle review states only. Card lifecycle states are exactly trusted, candidate, deprecated, and rejected. Never auto-install a card-bound Skill during snapshot, retrieval, selection, or use.
  17. Build an organization Sleep decision set over the cleanup proposal. Every merge/split action must close as ready packet, keep-separate/keep-single, or typed blocked evidence with a reopen predicate.
  18. Apply only exact selected packet ids through the source publication transaction. Every card/status/confidence/merge/split change rebuilds the affected bundle and catalog and has an exact rollback inventory. Missing organization-review guidance is not a blocker.
  19. Run the post-apply organization check after selected actions are applied, and keep the audit path for rollback.
  20. Commit and push applied maintenance changes to a maintenance branch, open the PR when the repository is on GitHub, apply org-kb:auto-merge only for reviewed main/imports changes with audit evidence, then restore the local mirror to the organization base branch so later sync or contribution work does not continue on an old maintenance branch.
  21. Run the GitHub merge-readiness checkpoint. Confirm changed paths, low-risk import eligibility or reviewed-maintenance eligibility, required checks, rollback story, and whether the PR should be auto-merge eligible or remain review-only.
  22. Do not skip the merge, split, card-decision, Skill-safety, Skill-bundle-version, decision-apply, post-apply, maintenance-branch, or GitHub-readiness checkpoints. It is acceptable to skip applying a change when evidence, safety, tooling, permissions, or scope is insufficient, but the inspection and recorded decision must still happen.
  23. Run the single cycle postflight after a non-skipped pass and record the result as structured history. A failed snapshot activation is a visible cycle failure; retrieval must continue using the previous complete snapshot.

Read the full file on GitHub · 76 lines

Files

What ships with it

4 files 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.

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. 12d ago First seen · 76 lines · 61 tokens per session scan A f3f8a2f04165

Subscribe to this mod's changes

kb-organization-maintenance is a skill published in the GitHub repository liuyingxuvka/Khaos-Brain (37 stars, last pushed 1mo ago), licensed MIT. It adds 61 tokens to every session and 1,941 once invoked, about $0.0003 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-30.

Related

Other skills, from other repositories

knowledge-base

Skill "knowledge-base" from Pinvou/pinvou-agent, covering ima knowledge base, operations, routing rules, examples and file upload guard.

Pinvou/pinvou-agent · 0 tokens

notes

Skill "notes" from Pinvou/pinvou-agent, covering ima notes, operations, write rules, examples and response handling.

Pinvou/pinvou-agent · 0 tokens

shodh-memory

Persistent memory system for AI agents. Use this skill to remember context across conversations, recall relevant information, and build long-term knowledge. Activate when you need to store decisions, learnings, errors, or context that should persist beyond the current session.

varun29ankuS/shodh-memory · 53 tokens

vault

Search, read, write, and manage files in the Kept conversation vault. Use when the user asks about past conversations, wants to save notes, needs to find specific content, or wants to organize their vault.

egroup-labs/kept · 45 tokens

knowledge-ingestion

A skill for saving links, social posts, videos, podcasts, screenshots, PDFs, local files, or text into an Obsidian knowledge base, a personal collection of searchable notes. The ingestion tools analyse and format the material for storage.

lyc403223157-source/knowledge-inbox · 112 tokens

personal-knowledge-ingestion

A skill for saving links, videos, social posts, local files, screenshots, PDFs, or text into an Obsidian vault, a folder used for personal notes and knowledge. It uses connected knowledge tools to process and format the saved item.

lyc403223157-source/knowledge-inbox · 86 tokens