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 skills add KnowledgeXLab/skill-git --skill rule-extractiongit clone --depth 1 https://github.com/KnowledgeXLab/skill-gitWrote 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.
[](https://agentmods.dev/skills/knowledgexlab/skill-git/rule-extraction)<a href="https://agentmods.dev/skills/knowledgexlab/skill-git/rule-extraction"><img src="https://agentmods.dev/badge/skills/knowledgexlab/skill-git/rule-extraction/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.
<a href="https://agentmods.dev/skills/knowledgexlab/skill-git/rule-extraction"><img src="https://agentmods.dev/badge/skills/knowledgexlab/skill-git/rule-extraction.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00045 | $0.01792 |
| Opus 5.5 | $0.00018 | $0.00717 |
| Sonnet 5.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 2mo 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.
- 2mo 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 (42 stars, last pushed 6mo ago), licensed MIT. It adds 45 tokens to every session and 1,792 once invoked, about $0.0002 per session on Opus 5.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
review
5-pass structured code review — correctness, security, performance, readability, consistency.
generate-clip
Generate AI video clips for your Remotion project. Create unique footage from text descriptions or animate still images into video — no stock footage needed.
wenlan-handoff
End a work session. Stores durable captures, writes a narrative session log, and automatically applies typed item-level deltas to the current Space Brief. Invoked as /wenlan-handoff.
extract-resume
Parse a resume's uploaded PDF into structured JSON (basics, experience, projects, skills, education) and save it to the editor.
pr-review
Comprehensive PR review across six dimensions — cost impact, environment drift, ownership gaps, SOC 2 compliance, deprecated API / version hygiene, and rollback feasibility. Each mode inspects the diff and current file state, reports findings with severity, and recommends concrete fixes. Use when preparing a PR for…
alive:system-upgrade
Upgrade ALIVE to the current version. Handles v1/v2/v3.x source states, multi-surface aware (alive-mcp / Hermes / Codex), retroactive version detection, partial-failure resume, dry-run previews, and rollback inspection.