# Ljg mechanism

> Ljg mechanism is an open-source agent skill for knowledge and memory. Builds and tests mechanism hypotheses for a phenomenon, checked against web sources. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/lijigang/ljg-skills/tree/master/skills/ljg-mechanism
- **Repository:** https://github.com/lijigang/ljg-skills
- **GitHub stars:** 7,834
- **License:** MIT
- **Skill name:** ljg-mechanism
- **Collection:** https://github.com/lijigang/ljg-skills
- **Categories:** [knowledge and memory](https://ai-powered.com/categories/knowledge-and-memory)
- **Listing updated:** 2026-12-01

## About

This skill guides an agent through explaining how a phenomenon comes about. It starts from what looks anomalous, traces the process that produces the result, breaks down the explanation into concrete links, and then states the conditions under which the mechanism would carry over to other settings.

The agent is asked to verify the phenomenon and the key causal links with web search and page retrieval, keeping competing explanations alive and noting which observations would tell them apart. Findings are reported with the strength of the evidence, separating what sources support from the agent's own inference and from unknowns. If new evidence contradicts the mechanism, the skill asks the agent to narrow or rewrite the claim rather than piling on exceptions.

The default output is a read-only answer in Chinese, delivered in the chat. The skill expects the user to supply a phenomenon or question and access to web search; it runs no scripts and does not create notes, reports or memory files unless asked.

## When your agent uses it

> 针对用户提供的现象，用「看反常—追过程—分解释—带条件迁移」生成机制猜想，并联网核对现象、检验关键因果与竞争解释，交付证据最能支撑的机制及其边界。USE WHEN 用户调用 ljg-mechanism、说「找机制」「机制研究」「用四步框架走一遍」「联网验证这个解释」，或希望研究一个现象怎样发生。NOT FOR 纯概念定义、普通摘要、已有唯一解的操作题或只画地图。

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/lijigang/ljg-skills/tree/HEAD/skills/ljg-mechanism)
- [License: MIT](https://github.com/lijigang/ljg-skills/tree/HEAD/skills/ljg-mechanism)

## Features

- **Anomaly-first framing:** Identifies what departs from expectation, whether a missing condition produced a result or an expected result failed to appear.
- **Process tracing:** Follows the intermediate steps that link actors and conditions to the observed outcome.
- **Competing explanations:** Keeps rival explanations and states the different observations each would predict.
- **Web-based verification:** Checks the phenomenon and key causal links against retrieved sources and separates support from inference.
- **Boundary conditions:** States where the mechanism holds and which conditions must be kept when moving it to another context.
- **Read-only output:** Delivers the findings in conversation without creating notes, reports or memory files unless the user asks.

## Good for

- Explain why a trend or outcome happens and what drives it
- Check whether a popular claim about an effect holds up against sources
- Compare competing explanations for an observed pattern
- Work through a phenomenon step by step using a structured research framework
- Identify what evidence would confirm or overturn a proposed mechanism

## Install

### Claude Code

This skill ships in the `ljg-skills` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add lijigang/ljg-skills
/plugin install ljg-skills@ljg-skills
```

Or copy only this skill to `~/.claude/skills/ljg-mechanism`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/lijigang/ljg-skills.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/ljg-mechanism &&
cp -R "$tmp/skills/ljg-mechanism" ~/.claude/skills/ljg-mechanism &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/ljg-mechanism` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/ljg-mechanism` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/lijigang/ljg-skills.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/ljg-mechanism &&
cp -R "$tmp/skills/ljg-mechanism" ~/.agents/skills/ljg-mechanism &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/ljg-mechanism` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/ljg-mechanism` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/lijigang/ljg-skills.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/ljg-mechanism &&
cp -R "$tmp/skills/ljg-mechanism" ~/.cursor/skills/ljg-mechanism &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/ljg-mechanism` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/lijigang/ljg-skills.git --path skills/ljg-mechanism
```

Or copy the folder to `~/.gemini/skills/ljg-mechanism` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/ljg-mechanism`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/lijigang/ljg-skills.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/ljg-mechanism &&
cp -R "$tmp/skills/ljg-mechanism" ~/.copilot/skills/ljg-mechanism &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/ljg-mechanism` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/lijigang/ljg-skills.git
```

Then copy `ljg-skills/skills/ljg-mechanism` into your agent's skills folder as `ljg-mechanism`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What does the skill need to run?

It needs web search and page retrieval to verify the phenomenon and causal links. It runs no scripts and declares no allowed tools.

### When does Ljg mechanism trigger?

When the user invokes it by name or asks to find a mechanism, run a mechanism study, use the four-step framework, or verify an explanation online. It is not meant for plain definitions, summaries or tasks with a single known answer.

### Does Ljg mechanism save files or change my setup?

No. The research is read-only and produces no notes, reports, logs or rules unless the user explicitly asks for a saved file in a specified location.

### What happens if web access is unavailable?

The skill states that only the reasoning was completed and does not claim the explanation was verified online.

### How do I install Ljg mechanism in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/ljg-mechanism to use it in all your projects, or to .claude/skills/ljg-mechanism in one project. Or install the ljg-skills plugin, which includes it: /plugin marketplace add lijigang/ljg-skills, then /plugin install ljg-skills@ljg-skills.

### Does Ljg mechanism run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Ljg mechanism?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Ljg mechanism?

The closest alternatives to Ljg mechanism are Ljg is, Ljg relationship, Ljg learn, Build evidence map and Ljg read.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Ljg is](https://ai-powered.com/skills/ljg-is): Ljg is is an open-source agent skill for knowledge and memory.
- [Ljg relationship](https://ai-powered.com/skills/ljg-relationship): Ljg relationship is an open-source agent skill for knowledge and memory.
- [Ljg learn](https://ai-powered.com/skills/ljg-learn): Ljg learn is an open-source agent skill for knowledge and memory.
- [Build evidence map](https://ai-powered.com/skills/build-evidence-map): Build evidence map is an open-source agent skill for knowledge and memory.
- [Ljg read](https://ai-powered.com/skills/ljg-read): Ljg read is an open-source agent skill for knowledge and memory.
- [Research](https://ai-powered.com/skills/research-hec-ovi-2): Research is an open-source agent skill for web search and scraping.
- [Ljg map](https://ai-powered.com/skills/ljg-map): Ljg map is an open-source agent skill for knowledge and memory.
- [Ljg paper](https://ai-powered.com/skills/ljg-paper): Ljg paper is an open-source agent skill for knowledge and memory.

---
Source: https://ai-powered.com/skills/ljg-mechanism
