← Back to Skills Marketplace
pablothethinker

Lineage Code Mini

by PabloTheThinker · GitHub ↗ · v0.1.3 · MIT-0
cross-platform ⚠ suspicious
115
Downloads
0
Stars
0
Active Installs
4
Versions
Install in OpenClaw
/install lineage-mini
Description
Behavioral adaptation for AI agents. Builds a lightweight user profile from interaction history and adapts response style, topic focus, timing, and recovery...
README (SKILL.md)

Lineage Code Mini — Behavioral Adaptation Skill

You have access to lineage-code-mini, a behavioral adaptation engine. It learns how each user likes to be talked to and adapts your responses accordingly.

Links

How It Works

  1. Record — after each conversation, record whether the user engaged positively
  2. Compactify — compress interaction history into a behavioral profile
  3. Adapt — inject the profile into your system prompt before responding

Commands

/lineage or /profile — View a user's behavioral profile

Run the adaptation pipeline on the current user's conversation history:

node --input-type=module -e "
import { compactify, DEFAULT_CONFIG } from 'lineage-code-mini';
import { existsSync, readFileSync } from 'node:fs';
const historyPath = '{baseDir}/data/interactions.json';
const history = existsSync(historyPath) ? JSON.parse(readFileSync(historyPath, 'utf8')) : [];
const profile = compactify('current-user', history, DEFAULT_CONFIG);
console.log(JSON.stringify(profile, null, 2));
"

/adapt — Generate behavioral hints for the current user

node --input-type=module -e "
import { pipeline } from 'lineage-code-mini';
import { existsSync, readFileSync } from 'node:fs';
const historyPath = '{baseDir}/data/interactions.json';
const history = existsSync(historyPath) ? JSON.parse(readFileSync(historyPath, 'utf8')) : [];
const basePrompt = 'You are a helpful AI assistant.';
const { context, profile } = pipeline('current-user', history, basePrompt);
console.log('Active patterns:', context.active_patterns);
console.log('Fitness:', context.fitness);
console.log('Personalized:', context.personalized);
console.log('---');
console.log(context.prompt);
"

Automatic Adaptation

This skill provides the commands and storage layout. Your host agent still needs to call these commands or wire recording into its turn loop. Installation alone does not automatically capture conversations.

When this skill is loaded, you should:

  1. Before each response, check if a user profile exists at {baseDir}/data/profiles/. If it does, read it and apply the behavioral hints to your response style.

  2. After each conversation turn, record the interaction:

    • Was the user's response positive/engaged? (replied, followed up, said thanks, acted on suggestion) → accepted: true
    • Was it negative/disengaged? (ignored, changed topic, expressed frustration, no reply) → accepted: false
  3. Every 10 interactions, run compactification to update the profile.

Profile Fields

Field What it means
preferred_style "direct" / "detailed" / "casual" / "formal" — how to frame responses
strong_topics Topics user engages with — lean into these
weak_topics Topics user ignores — avoid leading with these
acceptance_rate 0-1 — how often your responses land
fitness 0-1 — how well you're serving this user. Below 0.35 = change approach
productive_hour Hour of day user is most engaged
channel_distribution Which channels user talks on most

SOUL.md Integration

Generate a section for your SOUL.md or USER.md:

node --input-type=module -e "
import { compactify, asSoulPatch, DEFAULT_CONFIG } from 'lineage-code-mini';
import { existsSync, readFileSync } from 'node:fs';
const historyPath = '{baseDir}/data/interactions.json';
const history = existsSync(historyPath) ? JSON.parse(readFileSync(historyPath, 'utf8')) : [];
const profile = compactify('current-user', history, DEFAULT_CONFIG);
console.log(asSoulPatch(profile));
"

Append the output to your USER.md for persistent behavioral adaptation.

Data Storage

Interaction history is stored at {baseDir}/data/interactions.json. Profiles are stored at {baseDir}/data/profiles/. These are plain JSON files — portable, inspectable, no database required.

Installation

npx clawhub@latest install lineage-mini

Or manually: copy this skill/ directory into your ~/.openclaw/skills/lineage-mini/.

Usage Guidance
This skill appears to do what it claims (build compact user profiles and steer replies), but it persistently records interaction history and the included setup script will attempt a global npm install of the package. Before installing: 1) Inspect the npm package and GitHub repository referenced in SKILL.md to verify author/trustworthiness; 2) Prefer a local or sandboxed install (avoid global `npm install -g`) or run setup in a disposable environment; 3) If you enable recording, review and control the {baseDir}/data/interactions.json file regularly and consider where profiles are stored; 4) Be cautious about appending generated content to USER.md (this makes the learned behavior persistent across sessions); 5) If you have privacy concerns, do not enable automatic recording or persistent USER.md changes until you’ve audited the upstream package source and are comfortable with the data retention. If you want a lower-risk option, consider running the lineage package manually on export data rather than wiring automatic per-turn recording.
Capability Analysis
Type: OpenClaw Skill Name: lineage-mini Version: 0.1.3 The lineage-mini skill is a behavioral adaptation tool designed to personalize AI responses by tracking user engagement. It manages interaction history and user profiles locally in JSON format and utilizes a dedicated npm package (lineage-code-mini) for data processing. The skill's operations, including the setup script and the Node.js commands defined in SKILL.md, are transparent and strictly aligned with its stated purpose of behavioral profiling without any indicators of data exfiltration or malicious intent.
Capability Assessment
Purpose & Capability
Name/description align with what the files do: they build compact behavioral profiles from conversation history and apply them to responses. The only required binary is node, which is appropriate for the provided node-based snippets and the referenced npm package. There are no unrelated environment variables or config paths requested.
Instruction Scope
SKILL.md instructs the agent to record per-turn interaction outcomes (accepted: true/false), store interaction history at {baseDir}/data/interactions.json, and apply profiles before responses. This stays within the stated purpose, but it does instruct the agent to persist user interaction history and to append generated profile data to USER.md (persistent host files), which is a privacy-sensitive action and expands the agent's write surface on the host.
Install Mechanism
No registry-level install spec is provided; instead the included setup.sh will globally install the npm package via `npm install -g lineage-code-mini` if the package is not importable. Global npm installs change system-wide state and increase risk if the npm package is malicious or compromised. The SKILL.md also suggests npx-based installation via ClawHub, which is more normal, but the presence of an automatic global installer in setup.sh is more intrusive than necessary.
Credentials
The skill requires no credentials or environment variables beyond node being present. That is proportionate to its functionality. The node/npm access is expected for a JS package; no unrelated secrets or config paths are requested.
Persistence & Privilege
The skill persists interaction history and generated profiles under its own directory ({baseDir}/data/...). setup.sh creates these directories. SKILL.md also recommends appending profile output to USER.md for persistent behavior adaptation — that implies modifying host user files outside the skill directory if the operator follows the recommendation. always:false and no cross-skill config changes are requested, but the persistence of user behavioral data and the optional modification of USER.md are privacy-sensitive and should be considered before enabling.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install lineage-mini
  3. After installation, invoke the skill by name or use /lineage-mini
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v0.1.3
Tighten compatibility wording and clarify Node requirement for the skill
v0.1.2
Fix short-history style detection so direct users are classified correctly
v0.1.1
Fix skill docs, support current ESM usage, and improve profile recency handling
v0.1.0
Initial release — behavioral adaptation for AI agents
Metadata
Slug lineage-mini
Version 0.1.3
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 4
Frequently Asked Questions

What is Lineage Code Mini?

Behavioral adaptation for AI agents. Builds a lightweight user profile from interaction history and adapts response style, topic focus, timing, and recovery... It is an AI Agent Skill for Claude Code / OpenClaw, with 115 downloads so far.

How do I install Lineage Code Mini?

Run "/install lineage-mini" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Lineage Code Mini free?

Yes, Lineage Code Mini is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Lineage Code Mini support?

Lineage Code Mini is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Lineage Code Mini?

It is built and maintained by PabloTheThinker (@pablothethinker); the current version is v0.1.3.

💬 Comments