# Keyword Density

> Use this skill to compute how often a target keyword (or phrase) appears in a text, as a raw count and as a percentage of total words (0-100). Case-insensitive, whole-word matching, supports multi-word phrases. Deterministic, offline. Flags over-optimization above 3%.

- Skill: `ncreighton/keyword-density` (Agent Skill, multi-file: 9 files)
- Install (CLI): `npx skillmds@latest add ncreighton/keyword-density`
- Raw SKILL.md: https://api.skillmd.com/api/skills/ncreighton/keyword-density/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Docs & Writing
- Author: ncreighton (https://skillmd.com/u/ncreighton)
- Updated: 2026-09-10
- Page: https://skillmd.com/skills/ncreighton/keyword-density

---


# keyword-density

Use this skill to compute how often a target keyword (or phrase) appears in a text, as a raw count and as a percentage of total words (0-100). Case-insensitive, whole-word matching, supports multi-word phrases. Deterministic, offline. Flags over-optimization above 3%.

- **Kind**: analyzer  |  **Niche**: publishing  |  **Cost tier**: free  |  **Version**: 0.1.0

## Empire Integration
```python
import sys
sys.path.insert(0, r'C:\D\Claude Code Projects\_SHARED')
import empire_bootstrap  # wires all shared paths
```

## Usage

**As a CLI:**
```bash
python run.py --text <string> --keyword <string>
```

**From a Python agent (ATEN runtime):**
```python
from skill_library import executor
result = executor.execute("keyword-density", {text=..., keyword=...})
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `text` | string | yes | The body text |
| `keyword` | string | yes | Keyword or phrase to measure |

## Returns

`object` — `{"status": "ok"|"error", "result": ...}`

