بنقرة واحدة
simba-onboard
Analyze project markdown files and generate consolidated core instructions with SIMBA markers
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Analyze project markdown files and generate consolidated core instructions with SIMBA markers
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Enforce Simba's Codex lifecycle routine for coding tasks. Use when starting or finishing implementation work in a Simba-enabled repo to run `simba codex-status` at start, handle any still-pending raw Codex transcript extraction, and run `simba codex-finalize` before final handoff.
Extract learnings from session transcripts and store in semantic memory database
Self-correcting memory recall — when recalled memories are ambiguous or conflicting, re-query for the specific entity (or ask) before answering, and never fabricate when memory is insufficient
Review recent memories and remove invalid or misleading ones from the semantic memory database
View statistics and recent entries from the persistent memory database. Shows session count, knowledge areas, facts, and recent activity.
Local hybrid search for markdown notes and docs. Use BEFORE reading files to save tokens - search first, read only what's relevant. Provides 90% token savings on exploration tasks.
| name | simba-onboard |
| description | Analyze project markdown files and generate consolidated core instructions with SIMBA markers |
Set up SIMBA markers for this project by analyzing existing markdown files and generating consolidated core instructions.
Follow these steps in order. Do not skip steps.
Run this command to get the configured filename for the core instructions file:
simba config get guardian.core_filename
This defaults to CORE_INSTRUCTIONS.md. Legacy projects may configure it to CORE.md or another name. Use the returned value as ${CORE_FILE} throughout the remaining steps. The full output path will be .claude/rules/${CORE_FILE}.
Read all project instruction files to understand the current state:
CLAUDE.md (if it exists)AGENTS.md (if it exists).md files under .claude/ (excluding .claude/handoffs/ and .claude/notes/)simba markers audit to check for any existing SIMBA markerssimba markers list to see all markers across the projectReport to the user: List every file you found and its approximate size. Note any existing SIMBA markers or <!-- CORE --> tags.
For each file read in Step 1, extract and categorize content into these groups:
| Category | What to look for | SIMBA section name |
|---|---|---|
| Critical Constraints | Non-negotiable rules, security requirements, things that must ALWAYS be true | constraints |
| Build & Test | Build commands, test commands, CI steps, make targets | build_commands |
| Environment | Machine names, SSH info, paths, ports, deployment targets | environment |
| Code Style | Formatting rules, naming conventions, patterns to follow | code_style |
| Workflow | Git workflow, commit conventions, PR process, stuck detection | workflow |
| Agent Rules | Subagent dispatch rules, agent-specific constraints, core injection requirements | agent_rules |
Important:
Report to the user: Show a summary table of what you found:
Category | Source File(s) | Items Found
-------------------|-----------------------|------------
Critical Constraints | CLAUDE.md, AGENTS.md | 5 rules
Build & Test | CLAUDE.md | 3 command groups
...
Create the file .claude/rules/${CORE_FILE} with this structure:
NOTE: The generated file must use real HTML comment markers. The pattern is
<!-- BEGIN SIMBA:name --> content <!-- END SIMBA:name --> (standard HTML comments).
Example structure (using {BEGIN} and {END} as placeholders for the real markers):
# Core Instructions
(header text explaining the file's purpose)
---
{BEGIN SIMBA:core}
## Critical Constraints
[The most important rules — these survive compaction via guardian hook]
**Signal**: End every response with `[✓ rules]` to confirm you have full
project context. If you cannot remember these rules, say so immediately.
{END SIMBA:core}
---
{BEGIN SIMBA:build_commands}
## Build & Test Commands
[extracted build/test commands]
{END SIMBA:build_commands}
[...additional sections as needed...]
Replace each {BEGIN SIMBA:xxx} with <!-- BEGIN SIMBA:xxx --> and {END SIMBA:xxx} with <!-- END SIMBA:xxx --> in the actual output file.
SIMBA:core — Wrap the most critical rules (constraints, must-never-violate rules) in this marker. The guardian hook extracts these and re-injects them on EVERY prompt, even after context compaction. Keep this section tight — every token here costs context on every message.
Other SIMBA markers (SIMBA:build_commands, SIMBA:environment, etc.) — These are discoverable and auditable via simba markers, but NOT re-injected by the guardian. They're reference content that Claude reads from the file when needed. Put the bulk of the instructions here.
--- horizontal rules between sections for readabilitySIMBA:core lean: only rules that MUST survive compaction (aim for <500 tokens)Do NOT write the file yet. First, show the user the complete generated content.
For each section:
SIMBA:core: explicitly note that this content will be re-injected on every promptAsk the user:
SIMBA:core section the right set of critical rules? Everything in there costs context on every message."If the user requests changes, apply them and show the updated version.
Once the user approves:
Create .claude/rules/ directory if it doesn't exist
Write .claude/rules/${CORE_FILE} with the approved content
Update CLAUDE.md — Add a reference block (if not already present):
<!-- BEGIN SIMBA:core_ref -->
**Read `.claude/rules/${CORE_FILE}` for rules that apply to ALL contexts (main session + subagents).**
When dispatching subagents, inject the contents of that file into the prompt.
<!-- END SIMBA:core_ref -->
Place this near the top of the file, after any title/heading but before other content.
Update AGENTS.md (if it exists) — Add a similar reference:
<!-- BEGIN SIMBA:core_ref -->
**All agents must follow `.claude/rules/${CORE_FILE}` before executing.**
When dispatching write-capable agents (especially implementer), read `.claude/rules/${CORE_FILE}` and inject its contents into the dispatch prompt.
<!-- END SIMBA:core_ref -->
simba markers audit to confirm all markers are recognizedsimba markers list to show the final stateDone. The user can now:
.claude/rules/${CORE_FILE} directly to refine rulessimba markers audit anytime to check marker health/simba-onboard again to re-analyze if files change significantlysimba config set guardian.core_filename CORE.mdNormal session:
Claude Code auto-loads .claude/rules/${CORE_FILE} (native)
+ Guardian re-injects SIMBA:core blocks on every prompt (compaction-safe)
After compaction:
Claude Code may lose .claude/rules/ context
Guardian still injects SIMBA:core blocks (safety net)
Subagents:
Must explicitly receive ${CORE_FILE} in their prompt
CLAUDE.md and AGENTS.md reference the file for this purpose