codex-rs/skills/src/assets/research/kb/SKILL.md
Knowledge Base operations for card-based research knowledge management. Use when reading, writing, searching, updating, resetting, or managing KB cards and files. Also handles "reset KB", "clear KB", and "wipe KB" — immediately resets to empty state without asking questions. Other research skills reference this skill via $kb for KB operations.
npx skillsauth add agents2agentsai/ata kbInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
The knowledge base is a directory of markdown files with YAML frontmatter. All operations use standard file tools (read, write, ls, grep).
Use ${CODEX_KB_PATH} as the KB directory (fallback: ~/.ata/knowledge-base).
The resolved path is referred to as <kb> below.
<kb>/
cards/<card-id>.md # One file per knowledge card
topics/<tag>/OVERVIEW.md # Per-tag prose summaries
index.json # Tag taxonomy + staleness tracking
research-context.md # User priorities and preferences
research-journal.md # Chronological session log
Each card is ---\n<yaml frontmatter>\n---\n\n<body>. Example:
---
id: latent-diffusion
title: Latent Diffusion Models
tags: [diffusion, generative]
capsule: Diffusion in latent space for efficient image generation.
source:
type: paper
refs: ["arxiv:2112.10752"]
status: current
tensions: []
supersedes: []
figures:
- path: figures/ldm-architecture.png
caption: Architecture overview
page: 3
date_added: 2025-01-15
date_updated: ~
contributed_by: research-agent
---
## Summary
[Card body content here...]
Field notes: id (required) — kebab-case [a-z0-9-]+, no leading/trailing hyphens. title (required). All other fields optional. status is one of: current, superseded, speculative, stub. source.type examples: "paper", "hackernews". figures entries have path (required), optional caption and page.
| Operation | Command |
|-----------|---------|
| Search by keyword | grep "<query>" <kb>/cards/*.md |
| Search by tag | grep "^ - <tag>" <kb>/cards/*.md |
| Read card | read <kb>/cards/<card-id>.md |
| List cards | ls <kb>/cards/ |
| Delete card | rm <kb>/cards/<card-id>.md |
| Read/write other files | read/write <kb>/<relative-path> |
| Initialize KB | mkdir -p <kb>/cards <kb>/topics |
Writing a card: Write to <kb>/cards/<card-id>.md. Ensure cards/ exists. Set date_added on new cards, date_updated on modifications. After writing, update index.json (add tags to tag_taxonomy, increment cards_since_regen for each tag).
IMMEDIATE ACTION — no clarifying questions. On "clear/reset/wipe the KB":
ls ${CODEX_KB_PATH}/cards/exec_command("cd ${CODEX_KB_PATH} && find cards topics briefings explanations assets staging -type f -delete 2>/dev/null; find cards topics briefings explanations assets staging -mindepth 1 -type d -delete 2>/dev/null; true")index.json to {"tag_taxonomy": [], "topics": {}}research-journal.md to # Research Journal\nresearch-context.md unchanged.Confirm: "Reset complete. Deleted N cards. research-context.md preserved."
Tracks tag taxonomy and topic staleness:
{
"topics": {
"diffusion": { "last_regen": "2025-06-01", "cards_since_regen": 3 }
},
"tag_taxonomy": ["diffusion", "generative", "robotics"]
}
tag_taxonomy: all known tags — register new tags when writing cards.topics[tag].last_regen / cards_since_regen: track when topic overviews need regeneration. After regenerating an overview, reset cards_since_regen to 0 and last_regen to today.Persist substantive insights from conversation back to KB cards.
When: (1) Q&A reveals details not in the card, (2) explicit save request, (3) cross-card connection discovered, (4) correction or refinement.
How: Read the card, append under ## Discussion Notes with a date header, write it back. Do not modify original synthesis sections (Summary, Core Method, etc.) unless explicitly asked.
## Discussion Notes
### YYYY-MM-DD
**Q: [Question that prompted this insight]**
[Clear prose explanation, 2-6 sentences with specific details.]
**Connection discovered:** [Other card ID, if applicable.]
Multiple insights on the same day share the date header. If a cross-card connection is found, update both cards' ## Connections sections. Set date_updated in frontmatter.
Research context signals — if the user expresses preferences ("I don't care about training cost"), offer to update <kb>/research-context.md (sections: Project, Priorities, Not Interested In, Framings That Work, Key Decisions Made).
<kb> missing → tell user, offer to initialize.index.json missing → proceed without it.research-context.md missing → skip personalization.testing
Multi-repo workspace management: clone repos, create execution runs, track papers/datasets/artifacts, manage snapshots, and review audit logs. Use when the user wants to organize multi-repo work, run experiments in sandboxes, or track research resources.
tools
Build, edit, recalculate, import, and export spreadsheet workbooks with the preloaded @oai/artifact-tool JavaScript surface through the artifacts tool.
tools
Build, edit, render, import, and export presentation decks with the preloaded @oai/artifact-tool JavaScript surface through the artifacts tool.
development
Install Codex skills into $CODEX_HOME/skills from a curated list or a GitHub repo path. Use when a user asks to list installable skills, install a curated skill, or install a skill from another repo (including private repos).