domain-extract

domain-extract is a skill for Claude Code, Codex from luiseiman/dotforge. It costs 24 tokens per session (1,610 once invoked), scanned A, original, MIT.

A skill that studies existing project sources to identify business knowledge and turn it into rules for coding assistants. Domain knowledge means the real-world rules and processes a project represents.

In plain words
What is it for?
Use it to extract, list, or synchronize domain rules from project files and stored project knowledge.
Why use it?
It helps an assistant learn important business behavior that may be scattered across memories, error records, agent notes, rules, and project history.

Skill for Claude CodeCodex

Part of the dotforge plugin — 23 skills, 25 commands, 7 agents, 8 hooks shipped together

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.

agentmods
npx agentmods add skills/luiseiman/dotforge/domain-extract
Any agent
npx skills add luiseiman/dotforge --skill domain-extract
Clone the repo
git clone --depth 1 https://github.com/luiseiman/dotforge

Made for: Claude Code, Codex.

Or install dotforge, the plugin that ships this one along with the rest of its 23 skills, 25 commands, 7 agents, 8 hooks.

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 domain-extract

README.md
[![agentmods](https://agentmods.dev/badge/skills/luiseiman/dotforge/domain-extract.svg)](https://agentmods.dev/skills/luiseiman/dotforge/domain-extract)
Your own site
<a href="https://agentmods.dev/skills/luiseiman/dotforge/domain-extract"><img src="https://agentmods.dev/badge/skills/luiseiman/dotforge/domain-extract.svg" alt="Measured on agentmods" height="20"></a>
Per session 24 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,610 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00024 $0.01610
Opus 5 $0.00012 $0.00805
Sonnet 5 $0.00005 $0.00322
Haiku 4.5 $0.00002 $0.00161

Measured 3d ago against content hash 38c98ecb7c5e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

domain-extract 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 3d 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/domain-extract/SKILL.md · 181 lines

How it starts

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

Domain Extract

Analyze existing project sources to propose domain knowledge rules for approval.

Dispatch

Based on $ARGUMENTS after "domain":

  • domain extract → Step 1-5 (full extraction)
  • domain list → Step 6 (list only)
  • domain sync-vault → Step 7 (vault sync only)

Step 1: Gather sources

Read these project sources (skip any that don't exist):

  1. CLAUDE.md — sections below <!-- forge:custom --> (user-written content)
  2. Auto-memory — resolve the project's memory directory:
    • Compute project path hash: the memory lives in ~/.claude/projects/-<path-with-dashes>/memory/
    • Read MEMORY.md index, then read each linked memory file
    • Filter: keep only entries with business/domain content (not purely technical)
  3. CLAUDE_ERRORS.md — read all entries. Flag errors where the root cause is "Claude didn't know X about the business"
  4. Agent memory — read .claude/agent-memory/implementer/*.md and .claude/agent-memory/architect/*.md
    • Filter: keep domain-relevant learnings (business logic, API behavior, deployment procedures)
  5. Existing rules — read all .claude/rules/*.md. Identify files that mix domain + technical content
  6. Git log — run git log --oneline -50 to identify domain-related commits (keywords: fix, deploy, API, auth, config)

Step 2: Classify findings

For each piece of domain knowledge found, classify:

  • Category: deploy, api-integration, business-logic, data-model, auth-flow, external-service, workflow
  • Source: which file(s) it came from
  • Confidence: high (explicit in CLAUDE.md/rules), medium (in memory/errors), low (inferred from git)
  • Overlap: does it duplicate existing .claude/rules/domain/*.md content?

Discard:

  • Pure technical patterns (import order, test fixtures, lint rules)
  • Already covered by existing domain rules
  • One-time fixes that won't recur

Step 3: Generate proposals

Group findings by category. For each group, propose a domain rule file:

═══ DOMAIN EXTRACT ═══
Project: {{project_name}}
Sources analyzed: {{count}}
Existing domain rules: {{count in .claude/rules/domain/}}

── PROPOSED DOMAIN RULES ──

{{number}}. {{filename}}.md (from: {{sources}})
   globs: {{suggested glob patterns}}
   Content preview:
     "{{3-5 line summary of what the rule will contain}}"
   → Create? (y/n/edit)

Read the full file on GitHub · 181 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. 3d ago First seen · 181 lines · 24 tokens per session scan A 38c98ecb7c5e

Subscribe to this mod's changes

domain-extract is a skill published in the GitHub repository luiseiman/dotforge (8 stars, last pushed 2mo ago), licensed MIT. It adds 24 tokens to every session and 1,610 once invoked, about $0.0001 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-31.

Related

Other skills, from other repositories

scaffold

Set up or align a non-code ops/PM repo with the ops folder structure, CLAUDE.md, and INDEX.md hierarchy.

OdinMB/ops-workflow · 30 tokens

find-opps

Find new directions for an ops project — adjacent opportunities, strategic gaps, preparatory research. Use when known work is well-mined and you need to look outward.

OdinMB/ops-workflow · 37 tokens

prioritize

Pick 2–3 independent ops tasks from active plans and backlog for autonomous execution, weighing impact, feasibility, and project goals.

OdinMB/ops-workflow · 29 tokens

factory-db-migration

The operational discipline for running a destructive change against a production database — schema migrations, data backfills, one-shot RPCs, historical seed imports. Adjacent to factory-data-layer.md (schema design) and factory-deployment.md (where migrations execute in CI) — this skill is about the runbook around…

nonlinear-xyz/factory-kit · 155 tokens

factory-api

API conventions for both server actions and tRPC builds. Covers the decision between them, per-mutation Zod input schemas, central router composition, pagination shape, multi-field search via Drizzle ilike + or(), mutation lifecycle hooks, conditional query enabling, stale-time defaults, error response shape and…

nonlinear-xyz/factory-kit · 95 tokens

factory-auth

Auth and authorization conventions distilled across builds with three different auth stacks (Better Auth + orgs, Supabase Auth + RLS, Clerk). Covers the provider decision matrix, the unified wrapper interface (requireAuth / requireRole / withOrgContext), procedure tier stacking, session handling, OAuth callback…

nonlinear-xyz/factory-kit · 97 tokens