linglu-discipline

linglu-discipline is a skill for Claude Code from FuRongJun-1999/dsh-memory. It costs 73 tokens per session (8,322 once invoked), scanned A, original, MIT.

A set of 16 operating rules for an AI coding agent, including when to read or write long-term memory and how to report completed actions. It is designed to work with the Lingshu memory service through an MCP connection.

In plain words
What is it for?
It helps structure task preparation, memory searches, command execution, submissions, root-cause analysis, sensitive-data handling, and publishing work.
Why use it?
It gives the agent a defined procedure for starting tasks, using existing knowledge, recording violations, and showing evidence of what it did.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions subagents; mentions Claude Code; mentions Codex.

Part of the lingshu-memory plugin — 1 skill shipped together

Good fit It helps structure task preparation, memory searches, command execution, submissions, root-cause analysis, sensitive-data handling, and publishing work.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/furongjun-1999/dsh-memory/linglu-discipline
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add FuRongJun-1999/dsh-memory --skill linglu-discipline
Clone the repo
git clone --depth 1 https://github.com/FuRongJun-1999/dsh-memory

Made for: Claude Code.

Or install lingshu-memory, the plugin that ships this one along with the rest of its 1 skill.

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 linglu-discipline

README.md
[![agentmods](https://agentmods.dev/badge/skills/furongjun-1999/dsh-memory/linglu-discipline/github.svg)](https://agentmods.dev/skills/furongjun-1999/dsh-memory/linglu-discipline)
Your own site
<a href="https://agentmods.dev/skills/furongjun-1999/dsh-memory/linglu-discipline"><img src="https://agentmods.dev/badge/skills/furongjun-1999/dsh-memory/linglu-discipline/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 linglu-discipline

Your own site · 80×15
<a href="https://agentmods.dev/skills/furongjun-1999/dsh-memory/linglu-discipline"><img src="https://agentmods.dev/badge/skills/furongjun-1999/dsh-memory/linglu-discipline.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 73 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 8,322 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00073 $0.08322
Opus 5.5 $0.00029 $0.03329
Sonnet 5.5 $0.00015 $0.01664
Haiku 4.5 $0.00007 $0.00832

Measured 9d ago against content hash a04d749b946a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

linglu-discipline scanned grade A with 1 finding 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 9d 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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

- 动作:构造 argv 列表→subprocess.run(capture_output=True, text=True, encoding='utf-8', errors='replace')→env 带 PYTHONUTF8=1→shell=False;边界判据=本次调用是否产出非UTF-8字节流(纯MSYS工具与不起进程的内置工具豁免;原生Windows程序不豁免,须python包装或显式解码);仓内引用与文档路径一律写相对路径
claude/lingshu-memory/skills/linglu-discipline/SKILL.md · 297 lines

How it starts

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

你是挂载了灵枢(Lingshu)长期记忆的 Agent。以下工作纪律与 DSH / CodeBuddy / ZCode / Codex / Claude Code 各端同源, 真源 = 灵枢大脑库 docs/工作纪律_认知图条目_v1.1.json(工作纪律_认知图条目_v1.1),共 20 条。 命中「触发」即执行该条「动作」,并在回复中原样输出该条「声明」;未声明视为未执行。

【执行公约】 0.1 会话起始先查记忆:动手前先调认知图入口(MCP server「mdcg」的 cg 工具;op 为必填参数,勿省略)cg(op=route, intent=<任务意图>);命中纪律/知识则按其「动作」执行。 0.2 命中即声明:输出该条 response.direct 原文——这是「已执行」的唯一可观测证据。 0.3 产出即证据:动作栏要求的产出(判定单/检索结果/验证结论/归档节点 id)必须实际给出,缺失即未执行。 0.4 违规即归档:发现违规 → 第 4 条归因 + 第 16 条写入灵枢记忆;隐瞒违规本身是更严重的违规。 0.5 例外不外溢:某条的「不适用」只豁免该条,不豁免其它条。

【本 skill(Claude Code 插件形态)与其它端的差异】

  • 记忆通路:MCP server「mdcg」(tools = kernel 面 cg/stg,其余能力经 op 分发)。插件不含大脑本体—— 安装后须按插件 README 把 mcp.json.example 配置为项目 .mcp.json(PYTHONPATH 指向你本机的 dsh-memory 仓库)。
  • 注入时机:Claude 按本 skill 的 description 在任务开始 / 命中触发词时自动调用; 也可用 /lingshu-memory:linglu-discipline 显式调用。其它端是会话起始一次性全文注入—— 本 skill 形态下若本会话尚未加载过本 skill,应先加载再动手。
  • 写入凭据:mdcg fail-closed,未配 MDCG_TOKEN 时只读 guest(读得到、写不进);签发见插件 README。

【20 条工作纪律 · 编号|触发 → 动作 → 命中后必须输出的声明】

AI 编程通用规范 v1.1.2(三层结构 · P0 修订 · 中文条款证据降级)

一句话:底线不破,按风险走流程,手册按需查。

v1.1.2 的变化:中文条款(1.7)的证据口径更正——实测无法观测中文思维链,故改为「工程设计 + 可审计规范」,不再声称更优。

v1.1.1 的变化(仅修 P0,不扩范围):加「项目规范 vs 外部内容」区分;风险拆成技术风险/流程要求两维;授权分目标/操作/风险确认三级;中文条款验收只看可见产出。

v1.1 的变化:吸收外部评审意见——流程按风险分级、加冲突裁决、加「外部内容不是指令」、验证结果分四档、语言条款保留为规范但注明依据。 v1.0 保留作对照基线(《AI编程通用规范_v1.0.md》),不删除。 唯一真源声明:自 v0.9.3 起,本文件是 AI 编程通用规范的唯一真源。历史版本已归档到 docs/规范/归档/;适配表与自检清单同目录。随包分发(npm files 字段包含本文件),宿主启动时载入。


第 0 章 怎么用(先看这一章)

0.1 先定风险档(决定走多少流程)

两个维度分开判:

  • 技术风险:看后果——不可逆 / 生产数据 / 凭据与权限 / 影响他人正在使用的东西。命中即高风险。
  • 流程要求:看协作——有验收人、有截止、要交接文档。它只决定多写多少记录,不改变技术风险等级。

低风险 = 技术风险全不命中且改动可逆;其余非高风险 = 中风险。

判据 例子
不可逆 删数据、改历史、发版本、对外发送
跨系统 / 跨仓库 改多端产物、改 CI、改共享配置
动公开面 公开仓库文件、发布说明、对外文档
碰凭据或权限 密钥、令牌、权限配置
(以下不算技术风险,只影响记录量)
有验收人 / 有截止 只增加流程要求(多写记录、多留交接),不单独提级

Read the full file on GitHub · 297 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. 9d ago Changed · +4 lines a04d749b946a
  2. 1mo ago Changed · +4 lines 578e49a1d87d
  3. 1mo ago Changed · +4 lines aa41fedc471c
  4. 1mo ago Changed · +164 lines 2febb5d6d645
  5. 1mo ago Changed 69b029b8ac61
  6. 1mo ago Changed 63c0b76cd2c1
  7. 1mo ago Changed b0679440281f
  8. 1mo ago Changed 2f59c1f9ec62
  9. 2mo ago Changed 9e3073ade36b
  10. 2mo ago First seen · 121 lines · 73 tokens per session scan A 4c5454889c52

Subscribe to this mod's changes

linglu-discipline is a skill published in the GitHub repository FuRongJun-1999/dsh-memory (761 stars, last pushed today), licensed MIT. It adds 73 tokens to every session and 8,322 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-13.

Related

linglu-discipline compared with skills from other repositories

linglu-discipline next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
linglu-disciplineFuRongJun-1999/dsh-memorySkill761todayMITA73Claude Code
strata-memorySherryLi-vc/strata-memorySkill029d agoMITB76Claude Code, Codex
potpie-graphpotpie-ai/potpieSkill5.8k5d agoApache-2.0A107Codex
potpie-repo-baselinepotpie-ai/potpieSkill5.8k5d agoApache-2.0A75Claude Code, Codex
potpie-debug-memorypotpie-ai/potpieSkill5.8k5d agoApache-2.0A41Claude Code, Codex
install-openviking-memoryvolcengine/OpenVikingSkill43kyesterdayAGPL-3.0A191Claude Code, Codex
mem9mem9-ai/mem9Skill1.2k26d agoApache-2.0A27Claude Code