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.
npx agentmods add skills/knowledgexlab/skill-git/rule-extractionnpx skills add KnowledgeXLab/skill-git --skill rule-extractiongit clone --depth 1 https://github.com/KnowledgeXLab/skill-gitWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00045 | $0.01792 |
| Opus 5 | $0.00023 | $0.00896 |
| Sonnet 5 | $0.00009 | $0.00358 |
| Haiku 4.5 | $0.00005 | $0.00179 |
Grade A, and why
Rule Extraction 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 2d 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.
How it starts
The opening of the file, as written. The whole thing — 205 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Rule Extraction
This skill teaches you how to extract a structured, line-numbered list of rules from a skill directory.
What Counts as a Rule
A rule is any statement that prescribes or constrains agent behavior. Recognize rules by their form:
- Imperative directives: "Always add type annotations", "Never use
var" - Prohibition patterns: "Do not X", "Avoid X", "禁止 X"
- Requirement patterns: "Must X", "Should X", "需要 X", "必须 X"
- Conditional behavior: "If X, then Y", "When X, do Y"
- Style/format mandates: "Use camelCase", "Limit lines to 80 characters"
- Preference statements: "Prefer X over Y", "优先使用 X"
Rules can appear as:
- Bullet list items (
-or*or+) - Numbered list items (
1.,2.) - Bold or emphasized sentences (
**Always do X**) - Plain sentences within a paragraph that contain directive language
- Section headers that are themselves imperatives ("Never commit secrets")
What Does NOT Count as a Rule
Exclude the following from extraction:
- Descriptive text: Explanations of why a rule exists, background context
- Examples: Code blocks, sample outputs, "for example..." passages
- Metadata: YAML frontmatter, version info, author notes
- Headings that introduce a section (unless the heading itself is an imperative rule)
- Vague non-actionable statements: "Do good work", "Be helpful" — extract these but flag them as
vague: true
Output Format
Return a JSON array. Each rule is an object:
[
{
"id": 1,
"file": "SKILL.md",
"line": 12,
"text": "Always add type annotations to function parameters",
"source_text": "- Always add type annotations to function parameters",
"vague": false
},
{
"id": 2,
"file": "SKILL.md",
"line": 15,
"text": "Do not use var, prefer const or let",
"source_text": "**Do not use `var`** — prefer `const` or `let`",
"vague": false
},
{
"id": 3,
"file": "examples.md",
"line": 4,
"text": "Do good work",
"source_text": "- Do good work",
"vague": true
}
]
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.
- 2d ago First seen · 205 lines · 45 tokens per session scan A f42f83a6a93c
Rule Extraction is a skill published in the GitHub repository KnowledgeXLab/skill-git (41 stars, last pushed 4mo ago), licensed MIT. It adds 45 tokens to every session and 1,792 once invoked, about $0.0002 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.
Other skills, from other repositories
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.
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…
babysit-pr
Babysit a GitHub pull request after creation by continuously polling review comments, CI checks/workflow runs, and mergeability state until the PR is merged/closed or user help is required. Diagnose failures, retry likely flaky failures up to 3 times, auto-fix/push branch-related issues when appropriate, and keep…
imagegen
Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output…
cpu-profile-analysis
Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…
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…