# lamarck

> A production self-evolving system for agent skills, driven by real invocations.

lamarck is a free AI agent skill on Agensi by Kian, in Agents & Orchestration. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Kian](https://www.agensi.io/creators/kian)
- Category: [Agents & Orchestration](https://www.agensi.io/skills/agents-orchestration)
- Uses: 1
- Version: 1.0
- Last updated: 2026-10-06
- Security: scan passed (2026-10-06); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/lamarck
- Tags: ai-agents, llm-ops, git, automation, self-improving, hooks, claude-code, cursor

## About this skill

lamarck is a production self-evolving system for agent skills. Install it once. Every installed skill keeps a record of real invocations, and it changes only when an evidence gate opens.

It is not a one-shot optimizer for one hand-picked skill. Adapters for Claude Code, Codex, Cursor, and pi write one local ledger. Telemetry stays on your machine. License: MIT. Source: https://github.com/newdee/lamarck-skill

### What it does
- Logs every skill call and stamps it with that skill file's content hash.
- Runs a short evaluation at the end of a turn. You choose every turn, manual only, or a batch (default: 5).
- Turns one user correction into a rubric entry for that skill.
- Proposes a small edit only after two separate calls show the same kind of gap.
- Asks you to apply the edit, keep it as a suggestion, or reject it. Auto-apply is opt-in, and a failed replay rolls the edit back. lamarck itself never runs on auto.
- Prunes instructions that go unused.

### How it works
1. A hook appends each call to data/pending.jsonl.
2. A stop hook runs the evaluation. Verdicts go to data/ledger.jsonl. Replay cases come from real traces.
3. When the gate opens, you get three choices. If you apply, a background job edits the skill, replays the cases, writes the ledger, and notifies you.
4. If the new version does worse than the old one, lamarck proposes a rollback.

### Install
```
npx lamarck-skill
```

Requires Node.js 18+ and git. The installer wires Claude Code hooks, then runs a self-test. Codex, Cursor, and pi use the adapters shipped in the package.

### Why the gate matters
Edits stay small, need your approval, and can be reverted. Plugins and synced skills are never edited in place. A skill with a long clean streak drops to spot-checks instead of being rewritten every turn.

## Requires

- Node.js
- lamarck-skill
- GitHub
- user

## Known limitations

Needs Node.js 18+ and git. No edit is proposed until two separate calls show the same kind of gap, so the first days are often quiet. The default trust tier is observe: evidence is kept, files are not changed. Plugins, marketplace skills, and synced skills are never edited in place. lamarck itself cannot be set to auto. The pi adapter is not yet confirmed in a live pi session.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the lamarck skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### How do I know the hooks are alive?

Use any skill, then check that data/pending.jsonl grew. Unexpected hook errors are written to data/hook-errors.log. An empty error log means the hooks are healthy.

### Which agents does lamarck support?

Claude Code is wired by the installer. Codex 0.142 or newer, Cursor, and pi ship as adapters and share one ledger. The pi adapter matches the published API and has not yet been run in a live pi session.

### Which skills can lamarck edit?

Only skills you put on the evolve or auto list. The default tier is observe: calls are logged and nothing is edited. Plugins, marketplace skills, and synced skills are never edited in place.

### Can an edit land without asking me every time?

Yes, if you promote that skill to auto. The edit must pass replay or it rolls back, and you still get a report. lamarck itself, its iron rules, and plugins always need an explicit yes.

### When should I run /lamarck myself?

Run it to drain a backlog, audit one skill, read stats, or read the evolution report. You can also set the trigger to every turn, manual, or a threshold, and set the update cadence to weekly, daily, or continuous.

### How do I pause or uninstall it?

Create a file named off in the skill directory to silence the hooks. Manual /lamarck still works. Uninstall with npx lamarck-skill uninstall. That removes the hooks and keeps your files and telemetry.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
