janbjorge/rekal/rekal-init
Claude Code and agent skill by janbjorge/rekal
- community
Checking that the SKILL.md file is still in the repository.
Bootstrap rekal memory for a project. Scans the codebase for architecture, conventions, dependencies, workflows, and config, then stores durable knowledge as properly typed, tagged, deduplicated memories. Use when starting rekal on a new project, or when user says "init rekal", "bootstrap memory", "populate rekal", "scan project". Trigger: /rekal-init.
Install
npx vskill@latest install janbjorge/rekal/rekal-initSKILL.md
Bootstrap rekal memory from a codebase. Goal: a fresh agent in a new session has enough context to work effectively without the user repeating themselves.
Requirements
- Execute ALL steps including Tier 4 (source code scanning). Do NOT stop after reading docs and config.
- Run every Grep command in Tier 4. Each grep with results → at least 1 memory.
- Store at least 1 memory per source module discovered in the codebase.
- Read high-signal docs first (CLAUDE.md, AGENTS.md). They reveal what else to scan.
- Follow breadcrumbs. If docs reference other files or dirs, read those too.
- Run the self-check in Step 7 before finishing.
- On a fresh DB, skip dedup searches. Nothing to dedup against. Store directly.
Common failure: agent reads docs + config, stores ~20 memories, skips source code scanning entirely. Do not do this.
Step 0: Pre-flight
Report current state. If the project already has memories, warn and wait for confirmation. For a fresh database, continue automatically.
Step 1: Identify the project
Determine the project name from the working directory, git remote, or config files. Prefer short, lowercase names: rekal, backend, myapp. Pass it as project="<name>" on every memory_store call below.
Step 2: Scan for knowledge sources
Search for these files in priority order. Read every file that exists. Skip what's missing.
Tier 1: High-signal project docs (read fully, read FIRST)
Read these BEFORE other tiers. They frequently reference:
- Specific directories or modules to pay attention to
- Conventions not captured in linter configs
- Domain-specific terminology and concepts
- Workflows, procedures, and tool preferences
- Other documentation files worth reading
Follow the breadcrumbs. If CLAUDE.md says "read AGENTS.md before doing anything" or references docs/api-guide.md, read those files too. If AGENTS.md describes a specific architecture, that's a memory.
Tier 2: Config and dependency manifests (read fully)
Extract: stack + versions, key deps with purpose, CI pipeline steps, Docker setup, env vars needed.
Tier 3: Structural exploration
Also explore anything Tier 1 docs pointed to: scripts/ dirs, specific modules mentioned by name, etc.
Tier 4: Source code structure (MANDATORY)
You MUST execute every sub-step below.
Scan the codebase through an architectural lens. The goal is to map the system's layers, not just list files but understand what role each piece of code plays.
4a. Discover all modules/packages:
Use the directory tree from Tier 3 and the stack from Tier 2 to identify top-level source units (packages, modules, crates, services, whatever the project calls them). Glob for src/*/ or equivalent. List every module found. Store at least 1 memory per module.
4b. Map the architecture by layer:
For EACH module from 4a, read its entry/index file and 1-2 key files. Classify what you find and store memories accordingly:
Domain (entities, value objects, business rules):
- Find type/model definitions: look in dirs named
models,entities,domain,types,schemas - Find enums and constants: these define domain vocabulary (statuses, categories, roles)
- Find error/exception types: these define domain boundaries and business rule violations
Store: what entities exist, their relationships, invariants, domain-specific terms.
Ports (interfaces the domain exposes or depends on):
- Find abstract interfaces, contracts, traits: look for dirs named
ports,interfaces,contracts - Find types named Repository, Service, Gateway, Port, Store: these are usually boundaries
Store: what abstractions exist, which are inbound (driving) vs outbound (driven).
Adapters (how ports connect to the outside world):
Inbound (drive the application):
- Find route/handler definitions: HTTP endpoints, GraphQL resolvers, gRPC services, CLI commands
- Find message consumers/subscribers
- Look in dirs named
routes,controllers,handlers,adapters,api
Outbound (driven by the application):
- Find persistence implementations: SQL files, ORM models, repository classes
- Read latest 3-5 migration files and schema definitions
- Find event/message publishers
- Find external service client wrappers (HTTP clients, cloud SDK usage)
Store: API surface, persistence strategy, external integrations, event patterns.
Infrastructure (wiring, config, middleware, startup):
- Find DI/wiring configuration
- Find middleware/interceptor chains
- Look in dirs named
config,infrastructure,wire,di
Store: how layers are wired together, middleware chain.
4c. Read schema files in detail:
Find and read files in model/schema/entity directories. Read migration files, proto files, GraphQL schemas, OpenAPI specs if they exist.
Store: entity relationships, key fields, constraints worth knowing.
Each discovery → at least 1 memory summarizing findings. Nothing found → skip.
Tier 5: Test structure and patterns
Store: test framework, fixtures/factories, DB/service strategy, parallelization.
Do NOT read
- Lock files (package-lock.json, uv.lock, Cargo.lock, yarn.lock)
- Generated files, build artifacts, node_modules, dist/, .git/
- Binary files, images, fonts
- Individual test implementations (test names suffice)
- Vendored/third-party code
Step 3: Extract knowledge candidates
For each file read, extract knowledge that passes this filter:
Bias toward storing. The cost of a redundant memory (superseded later) is low. The cost of a missing memory (user repeats themselves, agent makes wrong assumption) is high.
What to extract
Architecture & structure:
| Category | Source | Example memory | |
|---|---|---|---|
| Architecture overview | README, ARCHITECTURE, AGENTS.md | "Hex arch: domain in core/, ports as Protocol classes, adapters in adapters/. DI wires at startup." | |
| Module map | __init__.py, directory structure | "services/ has 6 modules: auth, billing, notifications, search, inventory, reporting" | |
| Project structure | Directory tree, entry points | "Entry point: rekal/cli.py. MCP server: rekal/adapters/mcp_adapter.py" | |
| Key decisions | ADRs, DESIGN.md | "Chose SQLite over Postgres for zero-config single-file deployment" |
Domain layer:
| Category | Source | Example memory | |
|---|---|---|---|
| Domain model | Models, schemas, enums | "Core entities: Order (stateful, FSM), Product (immutable), Warehouse (has zones/bins). All IDs are NewType UUIDs." | |
| Domain vocabulary | Enums, constants, README | "Content code = barcode type. Pick = retrieve from bin. Putaway = store in bin. Wave = batch of picks." | |
| Domain errors | Exception classes | "DomainError → {ValidationError, NotFoundError, ConflictError}. Raised in domain, caught by adapters." |
Ports & adapters:
| Category | Source | Example memory | |
|---|---|---|---|
| Inbound ports | Protocols, ABCs, interfaces | "OrderService protocol: create_order, cancel_order, ship_order. Implemented by OrderServiceImpl." | |
| Inbound adapters | Routes, controllers, CLI, consumers | "REST API: /api/v2/ prefix. 47 endpoints across 8 routers. Auth via Bearer JWT." | |
| Outbound ports | Repository protocols, gateway ABCs | "OrderRepository protocol: get, save, list_by_status. WarehouseGateway: reserve_stock, release_stock." | |
| Outbound adapters | ORM, DB, API clients, publishers | "Postgres 15. 34 tables. Key: orders→order_lines→products. Soft deletes. Redis Streams for events." | |
| External integrations | HTTP clients, cloud SDKs | "Stripe adapter for billing. Azure Blob for file uploads. SendGrid for email." |
Infrastructure & operations:
| Category | Source | Example memory | |
|---|---|---|---|
| Wiring / DI | Container, startup, middleware | "FastAPI Depends for DI. Middleware chain: auth → audit log → error handler → request ID." | |
| Conventions | CLAUDE.md, linter configs | "No underscore prefixes. Public by default. No mutable globals." | |
| Dependencies & stack | pyproject.toml, package.json | "Python 3.11+, key deps: mcp[cli], aiosqlite, sqlite-vec, fastembed, pydantic" | |
| Build & CI | Makefile, CI configs | "CI: ruff check, ruff format --check, ty check, pytest 100% coverage required" | |
| Test patterns | conftest.py, fixtures | "Tests use testcontainers for Postgres+Redis. Factory pattern. 8 parallel pytest workers." | |
| Deploy & infra | Docker, CI/CD | "Deploy via git tag vX.Y.Z → CI builds and publishes to PyPI" | |
| Workflows | CONTRIBUTING, Makefile | "PR workflow: branch from main, all CI checks pass, squash merge" |
What NOT to extract
- Verbatim content from CLAUDE.md or AGENTS.md. Those are loaded every session. DO synthesize cross-cutting knowledge that spans multiple files into single memories.
- Individual function signatures or line numbers: trivially re-discoverable
- Boilerplate from templates (default CI configs, standard Dockerfile patterns)
- Version numbers that change frequently (pin knowledge to concepts, not versions)
- License text, badges, marketing copy
Step 4: Deduplicate and store
On a fresh DB (no existing memories), skip the recall step entirely. There's nothing to dedup against. Store directly. This dramatically speeds up init.
On re-init (memories already exist), recall before each store:
Content rules
Every memory must be self-contained. A fresh agent with zero context reads it.
Tags must be specific
Step 5: Batch efficiently
Group related candidates. Store in logical order:
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/rekal-init/SKILL.md
Popularity
- Repository stars
- 48
- Repository forks
- 4
- 7-day trend score
- 19
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 27 Apr 2026, 6 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/janbjorge/rekal/rekal-init)