Skip to main content
Most AI systems that use procedural skills preload all of them into the agent’s context window at session start. This is expensive, noisy, and scales badly as the skill library grows. GenieHelper takes a different approach: Just-In-Time (JIT) skill hydration. At session start, the system analyzes the incoming task, runs stimulus propagation across the DuckDB skill graph, and surfaces only the top-N most relevant skills for that specific task. Irrelevant skills never touch the context window. The result is a leaner, faster agent that gets better over time as skills accrete.

The skill graph at a glance

191 skills

Procedural skills covering everything from platform scraping to fan message drafting — all stored as .md files with YAML frontmatter.

252 nodes

Skill nodes plus category nodes, plus cross-category correlation nodes. The graph has more nodes than skills because categories and correlation anchors are nodes too.

12,880+ edges

Weighted edges between skills, categories, and correlation nodes — seeded from co-occurrence data and reinforced by Hebbian decay.

DuckDB backend

The skill graph lives in memory/core/agent_memory.duckdb. Fast, local, no server process required.

Skill categories

Skills are organized into 11 categories. The first 10 cover general development and infrastructure domains. Category 11 — 11-genie-user-skills — contains the platform-specific skills that power the GenieHelper agent’s day-to-day work:
Skills for pulling data from OnlyFans, Fansly, and other platforms. Covers scrape-platform-content, capture-platform-cookies, and check-scrape-status. These are the skills the agent hydrates when a creator asks to pull their stats or sync their subscriber list.
Upload, process, search, and download media assets. Covers the FFmpeg pipeline, watermarking jobs, teaser clip creation, and thumbnail generation. Hydrated when the agent handles media ingest or processing requests.
Schedule posts, publish immediately, generate captions, and surface content ideas. Covers the full editorial pipeline from suggest-ideas through publish-post-now. The most frequently hydrated category for content-focused sessions.
Connect, verify, and disconnect platform accounts. Handles the authentication and session management flow for OnlyFans, Fansly, Instagram, and TikTok — including HITL escalation when platforms block headless automation.
Create and update creator personas, manage subscription tier changes, and configure writing voice rules. Hydrated during onboarding and when a creator updates their identity configuration.
Analyze fan insights, generate analytics reports, and run taxonomy classification on historical content. Covers the full reporting surface from per-fan scoring to platform-level growth curves.
Configure user preferences — notification rules, automation defaults, tier limits. Hydrated when a creator adjusts their platform configuration.
Skills for fan messaging, template management, and broadcast campaigns. Includes learn-user-typos — a skill that trains the agent on a creator’s specific writing style quirks so AI-drafted messages match their voice.
Categories 01-10 (generic development and infrastructure skills) were purged on 2026-03-14. The canonical platform skills now live exclusively in agent-skills/11-genie-user-skills/. If you’re ingesting into DuckDB after a purge, run with --reset: python3 memory/core/ingest_skills.py --reset

How JIT hydration works

At session start — specifically when a chat request hits /api/genie/stream-chat — the server runs surgical_context.py before invoking the LLM:
Creator sends: "draft a caption for my new beach yoga set"

→ surgical_context.py activate "draft caption beach yoga"
  → embed task query
    → stimulus propagation across agent_memory.duckdb
      → skill nodes activated: [publishing:generate-caption, analytics:classify-taxonomy]
      → category correlations: [03-publishing, 06-analytics]
      → top-N skills selected by activation strength
        → skill content fetched from agent-skills/
          → injected into agent context window
            → LLM runs with only relevant procedural context
Skills that are not relevant to the task — scraping skills, platform connection skills, settings skills — consume zero context window budget.
The activate command uses the same stimulus propagation mechanism as the taxonomy graph. The DuckDB skill graph and the taxonomy graph in Nodes/Universe/ are separate stores that share the same propagation architecture.

surgical_context.py commands

The surgical_context.py script is the CLI interface to the skill graph. It is called programmatically by the server at session start, but you can also run it directly:
# Surface top skills for a task
python3 memory/core/surgical_context.py activate "<task description>"

# Get full content for a specific skill
python3 memory/core/surgical_context.py get_skill <skill-name>

# Find skills by tag
python3 memory/core/surgical_context.py find_skills <tag1,tag2>

# Get Hebbian correlation neighbors for a skill
python3 memory/core/surgical_context.py get_correlations <skill-name>

# List all skills in a category
python3 memory/core/surgical_context.py list_category <category>

# Graph statistics
python3 memory/core/surgical_context.py stats

memory.recall MCP plugin

The memory.recall MCP plugin exposes the skill graph to the LLM agent as a set of 4 tools. These are served by the unified genie-mcp-server (part of the 83-tool bundle):

activate_skills

The primary tool. Takes a task description string and returns the top-N most relevant skills via stimulus propagation. This is what surgical_context.py activate calls under the hood.

get_skill

Retrieves the full content of a named skill from agent-skills/. Returns the skill’s YAML frontmatter, description, steps, and any tool-call examples.

find_skills

Tag-based skill search. Returns all skills matching one or more comma-separated tags — useful when the agent knows what kind of skill it needs but not the exact name.

memory_recall

Full retrieval pipeline returning context chunks ready for LLM prompt injection. Combines BM25 sparse search, DuckDB dense activation, RRF fusion, synaptic propagation, and entropy pruning. Takes a query string and optional max_tokens budget.

The DuckDB schema

The skill graph is stored in memory/core/agent_memory.duckdb. The schema is maintained by ingest_skills.py and seed_linkages.sql:
-- Core tables (simplified)
skills        -- 191 rows: name, category, tags, description, file_path
nodes         -- 252 rows: id, label, type (skill | category | correlation)
edges         -- 12,880+ rows: source, target, weight, type
linkages      -- Hebbian correlation pairs seeded from co-occurrence data
The ETL pipeline:
python3 memory/core/ingest_skills.py reads every .md file in agent-skills/11-genie-user-skills/, parses the YAML frontmatter (name, category, tags, description), and writes skill records into the skills table. Nodes and initial edges are derived from the category hierarchy.After ingest, run the hierarchical goosehints generator to update directory-level context files:
python3 memory/core/generate_hierarchical_goosehints.py
duckdb memory/core/agent_memory.duckdb < memory/core/seed_linkages.sql populates the initial Hebbian correlation edges. These are co-occurrence pairs derived from session data — skills that tend to be useful together get a weighted edge between them.
python3 scripts/directus/ingest-skills-to-directus.py mirrors the skill records to the agent_skills Directus collection. This makes skills queryable via the CMS API and available to the cms.directus MCP plugin.For a full reset and re-ingest:
python3 scripts/directus/ingest-skills-to-directus.py --reset

How this differs from preloaded skills

The distinction matters for understanding how the system scales:
Preloaded skillsJIT skill hydration
All skills injected at session startOnly relevant skills injected
Context window cost is constant and grows with every new skillContext window cost scales with task complexity, not library size
Adding skills makes the agent slower and more expensiveAdding skills has no cost unless they are relevant to the task
Skill relevance depends on prompt engineeringSkill relevance is computed via graph propagation
Skills do not reinforce each otherFrequently co-activated skills develop stronger edges — the graph learns
The key insight: because relevance is computed at query time rather than at system design time, you can add skills freely without degrading performance. The graph handles routing.

Automatic skill creation (in progress)

When the agent handles a request type it has not seen before — a new platform API change, an edge case in the media pipeline, a novel fan communication pattern — new skills can be drafted automatically:
  1. The agent encounters a request it cannot fully resolve with existing skills
  2. A new skill is drafted to agent-skills/11-genie-user-skills/ in the 3-layer .md format
  3. ingest_skills.py ingests the new skill into DuckDB
  4. The skill becomes retrievable on future sessions via activate_skills
  5. If the skill is activated frequently enough, Hebbian reinforcement strengthens its edges
Automatic skill creation is currently in progress and not yet fully wired. New skills are drafted but the automated ingest and DuckDB promotion pipeline is a pending sprint item. Skills created manually via the .md format are immediately available after running ingest_skills.py.
This is the mechanism by which GenieHelper accretes procedural memory. The system does not need to be retrained — it reads new skill files and incorporates them into the graph. Knowledge compounds without manual curation.

Adding a skill manually

Skills use a 3-layer .md format with YAML frontmatter:
---
name: my-new-skill
category: 11-genie-user-skills/03-publishing
tags: [caption, tone, persona]
description: Drafts a caption in the creator's configured voice persona.
---

## Context
When to use this skill and what it does.

## Steps
1. Retrieve the creator's persona from `creator_personas` via `cms.directus`
2. Load lexicon rules from `persona_lexicon_rules`
3. Call `ai.ollama generate` with the persona system prompt
4. Return the draft caption for human review

## Tool calls
- `cms.directus`: read `creator_personas`, `persona_lexicon_rules`
- `ai.ollama`: generate
After saving the file, re-ingest:
python3 memory/core/ingest_skills.py

Taxonomy system overview

The 3,205-node content taxonomy and how it connects to retrieval

Synaptic propagation

The LIF neuron model used by both the taxonomy and skill graph

Hebbian consolidation

Nightly edge weight decay and the cross-user pattern promotion pipeline

memory.recall MCP plugin

Full reference for activate_skills, memory_recall, get_skill, find_skills

Build docs developers (and LLMs) love