diff --git a/claude-skills/README.md b/claude-skills/README.md index b0b8db7..eeef5cb 100644 --- a/claude-skills/README.md +++ b/claude-skills/README.md @@ -1,7 +1,7 @@ -# Claude Code skills +# Skills for Claude Code and Kiro - **`datamasque-cli/`** — -teaches Claude how to operate a DataMasque instance with `dm`: +teaches the agent how to operate a DataMasque instance with `dm`: - authenticate, - list connections, - start runs, @@ -17,6 +17,10 @@ joins DataMasque's many-file generated rulesets into one file for editing, then ## Install +All three skills run `dm`. [Install the CLI](../README.md#installation) first. + +### Claude Code + In [Claude Code](https://claude.com/claude-code), add this repo as a plugin marketplace and install the plugins you want: ``` @@ -26,8 +30,20 @@ In [Claude Code](https://claude.com/claude-code), add this repo as a plugin mark /plugin install ruleset-splitter@datamasque-tools ``` +### Kiro + +Clone this repo. +In [Kiro](https://kiro.dev/docs/powers/installation/), select **Powers → Add Custom Power → Import power from a folder**. +Import each plugin folder as a separate power: + +- `claude-skills/datamasque-cli` +- `claude-skills/ruleset-builder` +- `claude-skills/ruleset-splitter` + ## Uninstall +In Claude Code: + ``` /plugin uninstall datamasque-cli@datamasque-tools /plugin uninstall ruleset-builder@datamasque-tools diff --git a/claude-skills/datamasque-cli/plugin.json b/claude-skills/datamasque-cli/plugin.json new file mode 100644 index 0000000..576139f --- /dev/null +++ b/claude-skills/datamasque-cli/plugin.json @@ -0,0 +1,10 @@ +{ + "$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json", + "name": "datamasque-cli", + "version": "1.1.0", + "description": "DataMasque command-line interface integration. Drive DataMasque from your agent: list connections, kick off runs, stream logs, download reports.", + "author": { "name": "DataMasque Ltd" }, + "repository": "https://github.com/datamasque/datamasque-cli", + "license": "Apache-2.0", + "keywords": ["datamasque", "data-masking", "cli"] +} diff --git a/claude-skills/ruleset-builder/plugin.json b/claude-skills/ruleset-builder/plugin.json new file mode 100644 index 0000000..7ab0ec4 --- /dev/null +++ b/claude-skills/ruleset-builder/plugin.json @@ -0,0 +1,16 @@ +{ + "$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json", + "name": "ruleset-builder", + "version": "1.1.0", + "description": "Convert auto-generated DataMasque rulesets into production-ready form. Validate and iterate.", + "author": { + "name": "DataMasque Ltd" + }, + "repository": "https://github.com/datamasque/datamasque-cli", + "license": "Apache-2.0", + "keywords": [ + "datamasque", + "ruleset", + "yaml" + ] +} diff --git a/claude-skills/ruleset-builder/skills/ruleset-builder/SKILL.md b/claude-skills/ruleset-builder/skills/ruleset-builder/SKILL.md index 7f56bce..7a86f9b 100644 --- a/claude-skills/ruleset-builder/skills/ruleset-builder/SKILL.md +++ b/claude-skills/ruleset-builder/skills/ruleset-builder/SKILL.md @@ -14,13 +14,13 @@ Transform auto-generated DataMasque rulesets into production-ready rulesets with FK cascade is automatic: mask the parent PK with `imitate_unique` (or `imitate_uuid` / `imitate_nz_ird`) and the engine replicates the rule onto every FK column referencing it. **Do NOT add explicit rules for FK columns.** Avoid `from_unique_imitate` and `mask_unique_key` (both deprecated). Never skip IDs. -5-step process (1–5). Use `TaskCreate` to track all 5; report after each step before proceeding. The prompt must include business domain and application type — ask if missing. +5-step process (1–5). Track all 5 with the host's task tool (`TaskCreate` in Claude Code, the todo list in Kiro CLI). If the host has no task tool, keep a checklist in chat. Report after each step before proceeding. The prompt must include business domain and application type — ask if missing. --- ## Step 1: Report versions -Report the Ruleset Builder version (from `plugin.json`) and `dm version` so the operator can correlate output with releases. +Report the Ruleset Builder version and `dm version` so the operator can correlate output with releases. Read the Ruleset Builder version from `../../.claude-plugin/plugin.json` or `../../plugin.json`, relative to this skill's directory. If neither file exists, report the version as unknown. --- @@ -29,12 +29,12 @@ Report the Ruleset Builder version (from `plugin.json`) and `dm version` so the Canonical mask reference: -Read all of these before any other work: +Read all of these, relative to this skill's directory, before any other work: ``` -${CLAUDE_PLUGIN_ROOT}/skills/ruleset-builder/references/fk-cascade.md -${CLAUDE_PLUGIN_ROOT}/skills/ruleset-builder/references/mask-definitions-guide.md -${CLAUDE_PLUGIN_ROOT}/skills/ruleset-builder/references/hash-columns-guide.md -${CLAUDE_PLUGIN_ROOT}/skills/ruleset-builder/references/ruleset-yaml-reference.md +references/fk-cascade.md +references/mask-definitions-guide.md +references/hash-columns-guide.md +references/ruleset-yaml-reference.md ``` --- diff --git a/claude-skills/ruleset-splitter/plugin.json b/claude-skills/ruleset-splitter/plugin.json new file mode 100644 index 0000000..91e3a1f --- /dev/null +++ b/claude-skills/ruleset-splitter/plugin.json @@ -0,0 +1,16 @@ +{ + "$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json", + "name": "ruleset-splitter", + "version": "1.0.0", + "description": "Consolidate multi-file DataMasque rulesets for editing, then re-split them back out.", + "author": { + "name": "DataMasque Ltd" + }, + "repository": "https://github.com/datamasque/datamasque-cli", + "license": "Apache-2.0", + "keywords": [ + "datamasque", + "ruleset", + "yaml" + ] +} diff --git a/tests/test_plugin_manifests.py b/tests/test_plugin_manifests.py new file mode 100644 index 0000000..c634c0a --- /dev/null +++ b/tests/test_plugin_manifests.py @@ -0,0 +1,15 @@ +import json +from pathlib import Path + +import pytest + +CLAUDE_MANIFESTS = sorted((Path(__file__).parent.parent / "claude-skills").glob("*/.claude-plugin/plugin.json")) + + +# Kiro reads `plugin.json` and Claude Code reads `.claude-plugin/plugin.json`, so a version bump must change both. +@pytest.mark.parametrize("claude_manifest", CLAUDE_MANIFESTS, ids=lambda p: p.parent.parent.name) +def test_kiro_manifest_matches_claude_manifest(claude_manifest: Path) -> None: + claude = json.loads(claude_manifest.read_text()) + kiro = json.loads((claude_manifest.parent.parent / "plugin.json").read_text()) + + assert (kiro["name"], kiro["version"]) == (claude["name"], claude["version"])