← 返回 Skills 市场
pablothethinker

Lineage Code Mini

作者 PabloTheThinker · GitHub ↗ · v0.1.3 · MIT-0
cross-platform ⚠ suspicious
115
总下载
0
收藏
0
当前安装
4
版本数
在 OpenClaw 中安装
/install lineage-mini
功能描述
Behavioral adaptation for AI agents. Builds a lightweight user profile from interaction history and adapts response style, topic focus, timing, and recovery...
使用说明 (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/.

安全使用建议
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.
功能分析
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.
能力评估
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.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install lineage-mini
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /lineage-mini 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
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
元数据
Slug lineage-mini
版本 0.1.3
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 4
常见问题

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... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 115 次。

如何安装 Lineage Code Mini?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install lineage-mini」即可一键安装,无需额外配置。

Lineage Code Mini 是免费的吗?

是的,Lineage Code Mini 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Lineage Code Mini 支持哪些平台?

Lineage Code Mini 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Lineage Code Mini?

由 PabloTheThinker(@pablothethinker)开发并维护,当前版本 v0.1.3。

💬 留言讨论