home / skills / bahayonghang / my-claude-code-settings / claude-expert-skill-creator

This skill transforms expert knowledge into production-ready capabilities by aligning domain expertise with system ontology for reliable skills.

npx playbooks add skill bahayonghang/my-claude-code-settings --skill claude-expert-skill-creator

Review the files below or copy the command above to add this skill to your agents.

Files (8)
SKILL.md
4.6 KB
---
name: create-expert-skill
description: Create production-ready skills from expert knowledge. Extracts domain expertise and system ontologies, uses scripts for deterministic work, loads knowledge progressively. Use when building skills that must work reliably in production.
version: 2.2
category: skill-management
tags: [skill-creation, knowledge-extraction, production-ready, ontology]
---

# Expert Skill Creation

Transform expert knowledge into production-ready skills that combine domain expertise with system-specific understanding.

## Why Skills Fail in Production

AI assistants fail not because they lack intelligence, but because they lack:

1. **Domain Expertise** — Industry-specific rules, edge cases, unwritten conventions
2. **Ontology Understanding** — How YOUR systems, data structures, and workflows actually work

**Both are required.** Domain knowledge without system context produces generic output. System knowledge without domain expertise produces structurally correct but semantically wrong results.

## Workflow

```
Assess → Discover (Expertise + Ontology) → Design → Create → Refine → Ship
```

## Quick Assessment

**Create a skill when:**
- Used 3+ times (or will be)
- Follows consistent procedure
- Saves >300 tokens per use
- Requires specialized knowledge not in Claude's training
- Must produce trusted output (not "close enough")

**Don't create for:** one-time tasks, basic knowledge Claude already has, rapidly changing content.

## Discovery: Two Streams

### Stream 1: Domain Expertise

Deep knowledge that transcends any specific company:
- Industry standards and their versions
- Professional conventions and best practices
- Edge cases only practitioners know
- Validation rules from specifications

*Example (LEDES validation):* LEDES 98B vs XML 2.0 formats, UTBMS code taxonomy, date format requirements, required vs optional fields.

### Stream 2: Ontology Understanding

How the skill maps to specific systems and organizations:
- Company-specific policies and constraints
- Data structures and identifiers unique to the system
- Cross-references between entities (timekeepers → IDs → rates)
- Workflow states and transitions

*Example (LEDES validation):* Firm-specific timekeeper codes, matter numbering conventions, approved billing rates, outside counsel guideline requirements.

### Discovery Questions

When starting, I'll ask about:
1. **Domain & Purpose** — What problem? What industry standards apply?
2. **Ontology Requirements** — What system-specific structures must the skill understand?
3. **Content Source** — Conversation, docs, specifications, or files to distill from?
4. **Automation Potential** — What can be deterministic (scripts)? What needs interpretation (LLM)?
5. **Complexity Level** — Simple (SKILL.md only), Enhanced (+scripts), or Full (+resources)?

## Skill Architecture

```
skill-name/
├── SKILL.md              # Layer 1: Core (300-500 tokens)
├── scripts/              # Layer 0: Automation (0 tokens to run)
│   └── validate.py
└── resources/            # Layer 2: Details (loaded selectively)
    └── ADVANCED.md
```

**Layer 0** (Scripts): Free execution, structured JSON output
**Layer 1** (SKILL.md): Loaded when triggered - keep lean
**Layer 2** (Resources): Fetched only when specific section needed

## Token Optimization

| Technique | Instead of | Do this | Savings |
|-----------|-----------|---------|---------|
| Scripts | 500 tokens explaining validation | `python scripts/validate.py` | ~450 tokens |
| Reference | Inline schema (200 tokens) | Link to `resources/schema.json` | ~185 tokens |
| Layer 2 | Everything in SKILL.md | Link to `resources/ADVANCED.md` | ~750 tokens |

## Description Formula

`<Action> <Object> for <Purpose>. Use when <Trigger>.`

Example: "Validate billing data for system migration. Use before importing invoices."

## Shipping

When content is finalized:

```bash
python scripts/package_skill.py skill-name 1.0
```

Creates `skill-name-v1.0.zip` with:
- DIRECTORY_STRUCTURE.txt (auto-generated)
- README.md with deployment instructions
- All skill files properly organized

## Templates & Examples

See `resources/templates/` for:
- Minimal skill template
- Enhanced skill template  
- Script template

See `resources/examples/` for domain-specific patterns.

## Quality Checklist

Before shipping:
- [ ] Description <30 tokens
- [ ] SKILL.md <500 tokens (Layer 1)
- [ ] Scripts for deterministic operations
- [ ] Advanced content in resources/ (Layer 2)
- [ ] Version in frontmatter
- [ ] All referenced files exist

---

**Version:** 2.2 | **Target:** <500 tokens Layer 1

Overview

This skill creates production-ready skills from expert knowledge and system ontologies. It extracts domain rules, maps them to system-specific structures, and layers deterministic scripts with lightweight knowledge loaded on demand. Use it when you need reliable, repeatable automation that must respect both professional conventions and your internal data models.

How this skill works

The skill runs a discovery phase that separates domain expertise (standards, edge cases, validation rules) from ontology understanding (IDs, workflows, company constraints). It generates a compact core description, deterministic scripts for routine validation or transformation, and supplementary resources that are loaded only when needed. Packaging and simple versioning produce deployable artifacts ready for integration into production workflows.

When to use it

  • You will run the task 3+ times or it will be reused across teams
  • Procedure follows a consistent, repeatable process
  • Result must be trusted and auditable (not “close enough”)
  • Task requires specialized domain knowledge or firm-specific mappings
  • You want to minimize token cost by offloading deterministic work to scripts

Best practices

  • Start with a quick assessment: purpose, frequency, savings threshold, and complexity level
  • Separate discovery into Domain Expertise and Ontology streams and document both
  • Implement deterministic operations as scripts that output structured JSON
  • Keep the core description minimal and load advanced resources only when necessary
  • Include a simple packaging/versioning step and a pre-shipment checklist

Example use cases

  • Validate and transform billing files to firm-specific LEDES formats with deterministic validators
  • Generate data-mapping rules for migrating legacy IDs into a new system while preserving business rules
  • Create a skills package that enforces professional compliance rules and produces audit logs
  • Automate extraction of domain conventions and produce a lightweight rule engine plus references
  • Build an interpretation layer that maps user language to internal workflow states and IDs

FAQ

How do scripts reduce token usage?

Scripts perform deterministic checks and transformations locally, replacing long textual explanations and saving large prompt tokens when run.

When should I include advanced resources?

Only include Layer 2 resources when a specific scenario requires them; keep the runtime core minimal to stay efficient.

What does a minimal shipping checklist include?

A short description, compact core content, deterministic scripts, referenced resources present, and a versioned package ready for deployment.