Nox-Lumen MfgNox-Lumen Mfg

④ Build your first custom skill

Goal

Create a reusable custom Skill—for example my-team/commit-message-checker—to enforce your commit-message policy.

Outcome:

  • Teammates invoke via /commit-message-checker
  • Policy updates propagate in one place

Prerequisites

  • Know your team’s rules
  • Basic Markdown (+ optional Python)

Steps

Step 1 — Enable skill-maker (~2 minutes)

/skill-maker Sketch a skeleton for a "commit-message-checker" skill

You’ll answer:

  • Trigger scenarios?
  • Inputs / outputs?
  • External tools?

Step 2 — Generated skeleton (~5 minutes)

Typical layout:

my-team-commit-message-checker/
├── SKILL.md
├── tools/
│   └── check.py
└── tests/
    └── test_check.py

Step 3 — Author SKILL.md (~20 minutes)

Front matter is critical:

---
name: commit-message-checker
description: Validate Git commits against team rules (Conventional Commits + type/scope allowlist)
execution_mode: precise
tags: [devtool, team-convention]
---

Natural-language triggers:

# Commit Message Checker
 
Triggers when users ask to check commit messages, review commit text, or normalize git commits.
 
Does not trigger when: ...

Step 4 — Implement checker (~20 minutes)

tools/check.py:

import re
 
PATTERN = re.compile(
    r"^(feat|fix|docs|style|refactor|test|chore)"
    r"(\([a-z-]+\))?: .+"
)
 
def check(message: str) -> dict:
    ok = bool(PATTERN.match(message.strip().splitlines()[0]))
    return {"ok": ok, "pattern": PATTERN.pattern}

Step 5 — Contract tests (~10 minutes)

def test_valid():
    assert check("feat(api): add v2 endpoint")["ok"]
 
def test_invalid():
    assert not check("add new stuff")["ok"]

Step 6 — Dry run (~5 minutes)

/skill-install ./my-team-commit-message-checker
/commit-message-checker Check: "add new button"

Expect “violates policy” plus fix hints.

Step 7 — Publish to tenant (~3 minutes)

/skill-publish commit-message-checker --visibility tenant

Teammates see it automatically.

Acceptance checklist

  • SKILL.md front matter complete
  • tools/check.py runs
  • Contract tests green
  • Teammates can call /commit-message-checker
  • Captured one real violation caught in the wild

Next steps

On this page