with one click
simba-onboard
// Analyze project markdown files and generate consolidated core instructions with SIMBA markers
// Analyze project markdown files and generate consolidated core instructions with SIMBA markers
[HINT] Download the complete skill directory including SKILL.md and all related files
| 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