run-wenlan

run-wenlan is a skill for Claude Code from 7xuanlu/wenlan. It costs 53 tokens per session (2,700 once invoked), scanned C, original, Apache-2.0.

Instructions for building, starting, checking, and stopping the Wenlan daemon, a background service used during local development and verification.

In plain words
What is it for?
Building Wenlan, launching an isolated test instance, checking its health endpoint, identifying which process owns a port, and managing the production service carefully.
Why use it?
They keep testing separate from the shared production service and reduce the risk of using the wrong data or stopping a service that other tools rely on.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: positional $N argument.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is ./target/debug/wenlan-server &.

Good fit Building Wenlan, launching an isolated test instance, checking its health endpoint, identifying which process owns a port, and managing the production service carefully.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/7xuanlu/wenlan
agentmods
npx agentmods add skills/7xuanlu/wenlan/run-wenlan

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for run-wenlan

README.md
[![agentmods](https://agentmods.dev/badge/skills/7xuanlu/wenlan/run-wenlan/github.svg)](https://agentmods.dev/skills/7xuanlu/wenlan/run-wenlan)
Your own site
<a href="https://agentmods.dev/skills/7xuanlu/wenlan/run-wenlan"><img src="https://agentmods.dev/badge/skills/7xuanlu/wenlan/run-wenlan/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for run-wenlan

Your own site · 80×15
<a href="https://agentmods.dev/skills/7xuanlu/wenlan/run-wenlan"><img src="https://agentmods.dev/badge/skills/7xuanlu/wenlan/run-wenlan.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 53 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,700 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00053 $0.02700
Opus 5 $0.00026 $0.01350
Sonnet 5 $0.00011 $0.00540
Haiku 4.5 $0.00005 $0.00270

Measured 6d ago against content hash 14b8fc9b0bc2, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade C, and why

run-wenlan scanned grade C with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

# its own `rm -rf`; the daemon is handed the native spelling. `cygpath -m`

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

# ready: curl -sf --max-time 2 http://127.0.0.1:17878/api/health (poll up to ~120s)
.claude/skills/run-wenlan/SKILL.md · 196 lines

How it starts

The opening of the file, as written. The whole thing — 196 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Run wenlan-server (dev)

Build: cargo build -p wenlan-server -p wenlan (add -p wenlan-mcp for the MCP bridge).

Ports — one allocation, no guessing

Three ports exist and they are not interchangeable. Stopping "the isolated daemon" on the wrong one leaves a live daemon behind and reports success.

Port Owner Notes
7878 the user's real daemon never kill casually, never verify against
17878 manual isolated instance (this skill) the recipes below
17881 scripts/smoke-cli.sh PORT= overrides
17882 scripts/smoke-mcp.sh PORT= overrides; runs alongside the CLI smoke

The smokes own their own ports so both can run at once. Do not repoint them at 17878 — a manual daemon and a smoke would then fight over one listener, and the smoke's ownership assertion would fail on a daemon it did not start.

Isolated instance (default for verification)

Never verify against the shared prod daemon on :7878 — dev and prod share the platform data dir by default. Isolating the port and WENLAN_DATA_DIR is not enough: the default pages folder is .wenlan/pages under the OS user-home, NOT under WENLAN_DATA_DIR, so a capture will write into the user's real notes unless knowledge_path is set explicitly. Write the scratch config.json BEFORE the daemon starts, then read the live value back from /api/knowledge/path — the daemon reloads config per request, so a value written afterwards proves nothing about what was already ingested.

WENLAN_NO_AUTOSTART=1 belongs on every harness command: without it a failed connect starts the user's registered background service.

DATA_DIR="$(mktemp -d "${TMPDIR:-/tmp}/run.XXXXXX")"
mkdir -p "$DATA_DIR/pages"
printf '{"knowledge_path":"%s"}' "$DATA_DIR/pages" >"$DATA_DIR/config.json.tmp"
mv "$DATA_DIR/config.json.tmp" "$DATA_DIR/config.json"   # atomic, before spawn
WENLAN_NO_AUTOSTART=1 WENLAN_PORT=17878 WENLAN_DATA_DIR="$DATA_DIR" \
  ./target/debug/wenlan-server &
# ready:  curl -sf --max-time 2 http://127.0.0.1:17878/api/health  (poll up to ~120s)
# check:  curl -sf http://127.0.0.1:17878/api/knowledge/path   → must be $DATA_DIR/pages
# stop:   lsof -ti :17878 | xargs kill -9

Read the full file on GitHub · 196 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago Changed · +139 lines scan A → C 14b8fc9b0bc2
  2. 10d ago First seen · 57 lines · 53 tokens per session scan A 937c3f7078fb

Subscribe to this mod's changes

run-wenlan is a skill published in the GitHub repository 7xuanlu/wenlan (64 stars, last pushed today), licensed Apache-2.0. It adds 53 tokens to every session and 2,700 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it C with 2 findings (recursive force delete, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

shodh-memory

Persistent memory system for AI agents. Use this skill to remember context across conversations, recall relevant information, and build long-term knowledge. Activate when you need to store decisions, learnings, errors, or context that should persist beyond the current session.

varun29ankuS/shodh-memory · 53 tokens

braindb-agent

Persistent memory across sessions via the BrainDB agent. Use at conversation start and whenever you need to recall what you know about the user or save new information to long-term memory.

dimknaf/braindb · 40 tokens

windows-compat

Audit and harden this Rust repo (code-graph-mcp) for Windows correctness: path-spelling drift between producers, the 32,767-char command-line cap, index-key mismatches, and path predicates that assume one ecosystem's layout. Use whenever touching code that builds, compares, prints, or stores a filesystem path; that…

sdsrss/code-graph-mcp · 165 tokens

remnic-memory-workflow

Shared memory workflow for Claude Code agents connected to Remnic — recall before acting, observe during work, remember at the end. Trigger phrases include "what do you remember about", "save this for later", "any context from last time".

joshuaswarren/remnic · 54 tokens

deeprefine

Agent-native DeepRefine refinement loop — same control flow as DeepRefine.refine(), graphify search instead of FAISS, session LLM, dry-run review before approved graph writes.

HKUST-KnowComp/DeepRefine-Skill · 42 tokens

remnic-entities

Browse entities in the Remnic knowledge graph and surface their facts and relationships. Trigger phrases include "tell me about the entity", "look up", "what do we know about".

joshuaswarren/remnic · 41 tokens