ljg-constraint

ljg-constraint is a skill for Claude Code from lijigang/ljg-skills. It costs 245 tokens per session (5,821 once invoked), scanned A, original, MIT.

A Chinese-language analysis method for finding the rules and limits that shape a field, role, product, or disagreement. It separates hard facts from rules and personal assumptions, then shows how those limits affect possible solutions.

In plain words
What is it for?
Use it to analyze a profession, industry, product, debate, or boundary and save the result as an Org-mode file.
Why use it?
It helps explain why people with the same goal may disagree because they are solving different versions of the problem.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Part of the ljg-skills plugin — 22 skills shipped together

Good fit Use it to analyze a profession, industry, product, debate, or boundary and save the result as an Org-mode file.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/lijigang/ljg-skills/ljg-constraint
About the project

ljg-skills is a collection of custom Codex skills for tasks such as learning, writing, reading, relationship analysis, image creation, and investment analysis. Codex users install selected skills or the whole collection through a skills command-line interface. The catalogue entries are the collection's individual skills, plugin, and instruction.

lijigang/ljg-skills · 7,327 stars · on GitHub

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 lijigang/ljg-skills --skill ljg-constraint
Clone the repo
git clone --depth 1 https://github.com/lijigang/ljg-skills

Made for: Claude Code.

Or install ljg-skills, the plugin that ships this one along with the rest of its 22 skills.

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 ljg-constraint

README.md
[![agentmods](https://agentmods.dev/badge/skills/lijigang/ljg-skills/ljg-constraint/github.svg)](https://agentmods.dev/skills/lijigang/ljg-skills/ljg-constraint)
Your own site
<a href="https://agentmods.dev/skills/lijigang/ljg-skills/ljg-constraint"><img src="https://agentmods.dev/badge/skills/lijigang/ljg-skills/ljg-constraint/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 ljg-constraint

Your own site · 80×15
<a href="https://agentmods.dev/skills/lijigang/ljg-skills/ljg-constraint"><img src="https://agentmods.dev/badge/skills/lijigang/ljg-skills/ljg-constraint.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 245 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,821 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 6 Jul 2026
  • Snyk pass 6 Jul 2026
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00245 $0.05821
Opus 5 $0.00122 $0.02910
Sonnet 5 $0.00049 $0.01164
Haiku 4.5 $0.00024 $0.00582

Measured 12d ago against content hash 96424fca55f0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

ljg-constraint scanned grade A with 0 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 12d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/ljg-constraint/SKILL.md · 245 lines

How it starts

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

约束引擎

输入一个领域、一门专业、一个角色,找出框住它的那几条约束,看清这组约束框出的解空间——以及这个解空间怎么解释它的种种行为。

Workflow Routing

Trigger Workflow
给领域、专业、角色、产品找本质约束 执行本文工序,写成一篇中文散文分析,保存为 org 文件
分析一场方案争论为什么说不清 先找各方默认约束,再说明他们其实是不是同一道题
判断某条边界是真硬约束还是旧解释 走三层硬度和真伪定性,不急着给突破方案

Gotchas

  • 不要把约束写成普通困难、缺点或建议。约束必须能改变解空间;拿掉它,允许的行为会变。
  • 不要只盯目标。同一目标在不同约束下不是同一道题;先补全题面,再谈解法。
  • 不要把共识、习惯、行业话术顺手归进硬约束。硬约束要经得起"违背它是否立刻崩"这一问。
  • 不要急着写"如何突破约束"。先把当前约束的真实硬度、身份边界和行为解释力写准,松动只在结尾点一句。
  • 不要把身份约束和策略约束混在一起。拿掉之后还成其为自己的,不是身份约束。

Examples

Example 1: 分析一个角色

User: "投资经理的约束是什么?"
-> 找出资金期限、LP 信任、信息不对称、上行/下行分配等约束
-> 说明这些约束如何逼出追热点、重共识、怕错过等行为
-> 写入 notes 里的 org 文件

Example 2: 分析一场争论

User: "为什么产品和增长总吵架?"
-> 先拆出双方默认约束:不能打扰用户 vs 必须提高转化
-> 说明目标看似都是做好产品,其实题面不同
-> 再解释各自方案为什么在各自约束里是理性的

Example 3: 判断旧解释

User: "这个行业必须重销售吗?"
-> 先问这是世界约束、规则约束,还是行业解释
-> 查有没有别的时代、地区、玩家已经活着跨过去
-> 若跨过去仍成立,把它降级为软约束或自设约束

约束是什么

日常语感里,约束是负面的——束缚、不自由、不能做什么。这个引擎不这么看。

没有约束的东西没有形状。水没有约束时无形,给它一个杯子才有了形状;一道题没有约束条件时无解,给它约束,解才从无穷里浮出来。约束不是在减少可能性,是从无穷里生出特定性。没有约束等于什么都可以,等于什么都不是;有了约束,等于只有这些可以,等于这个东西是它自己。

问题也一样。一个问题不是只由目标构成,也由约束构成。大家都说"做一个产品",但一个人默认不能增加复杂度,另一个人默认必须追求增长,他们其实已经不在同一道题里。目标相同,约束不同,解空间就不同;解空间不同,方法之争就常常只是错位。

所以一个事物的约束条件,就是它的身份。约束是把无限可能坍缩成"这一个"的那组方程。 而这组方程一旦写全,它框出的解空间就出来了——这个角色能做什么、不能做什么、最优的选择落在哪里,全被这几条约束夹定。找约束的真正回报不在清单本身,在这个解空间:它能把这个角色的实际行为一个个解释回来。

这引擎首先是描述,不是改造。 核心问的是"当前的本质约束是什么、框出什么解空间、解释了什么行为"。"怎么办更好、哪条能松动"是第二位的事,排在后面,而且不许反过来影响前面的诊断——一急着找出口,就会看不清墙。

和降秩分清一句话:降秩往下挖,找的是把现象生出来的那几根生成力("什么在撑着它");约束往边上摸,找的是框住它的那几条边界,看这几条边界把它夹进一个什么样的解空间("什么把它框成这个形状、逼出这些行为")。一个找底,一个找边。

三层硬度:这条约束是哪一层的

约束不是一种东西,它们有硬度之分,权重不一样。分清硬度,是准确描述约束的第一步。

硬约束(世界层 / 物理层)——不可违背,试图违背则系统崩溃。人会死(时间),光速不可超越,公司现金流断了就没了。这层没有商量。它不是惩罚你,是系统直接停。

软约束(规则层)——可以违背,但有代价。法律、牌照、合同、行规。违背了系统不会物理崩溃,但会有人罚你、市场会惩罚你。这层是价码问题,不是可能性问题。

自设约束(解释层 / 认知层)——你以为存在,其实可以重新定义的。"我不擅长这个","这行就得这么干","别人会怎么看"。这层住在脑子里,不住在世界上。

不能违背的,要承认;可以违背的,要算代价;可以重写的,就不该称为命运。大部分困境不是被硬约束卡住的,是被自设约束困住的——把解释层的东西当成了世界层的。 一个领域里最贵的错误,永远是有人把一道粉笔线当成了石墙,绕着走了几十年。给约束定准硬度,就是在描述它真实的分量:它到底夹得死不死。

Read the full file on GitHub · 245 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 12d ago First seen · 245 lines · 245 tokens per session scan A 96424fca55f0

Subscribe to this mod's changes

ljg-constraint is a skill published in the GitHub repository lijigang/ljg-skills (7,327 stars, last pushed 3d ago), licensed MIT. It adds 245 tokens to every session and 5,821 once invoked, about $0.0012 per session on Opus 5. A static security scan graded it A with 0 findings. 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

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

insight-error-page

Write or audit an insight-kind error page for the Next.js dev overlay. Use when creating a new errors/ .mdx page, auditing an existing one, or checking that a page matches the framework fix cards. Covers page structure, title alignment, FixCard cards with Copy prompt button, code snippets, terminology verification…

vercel/next.js · 83 tokens

next-cache-components-optimizer

Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…

vercel/next.js · 170 tokens

next-partial-prefetching-adoption

Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…

vercel/next.js · 103 tokens