From 3090c24bc235f55bdb437702e8bb81b50070f290 Mon Sep 17 00:00:00 2001 From: prathikcannotcode Date: Tue, 10 Nov 2026 21:22:04 +0530 Subject: [PATCH] Package the skills as a Claude Code plugin Add .claude-plugin/plugin.json and a marketplace file so the five skills, the catalog and the calculator install with `claude plugin install aranya@prathikcannotcode-aranya`. The plugin declares no hooks: a plugin-wide write guard would block every edit in a project that has no workspace layout. Four skills now say where the catalog and the calculator live when there is no workspace. The calculator refuses --out outside its own root, so in a plugin it prints the result and the agent saves it; the README says that nothing enforces the guards there. Co-Authored-By: Claude Fable 5.2 --- .claude-plugin/marketplace.json | 14 ++++++++++++++ .claude-plugin/plugin.json | 15 +++++++++++++++ .claude/skills/eia-review/SKILL.md | 1 + .claude/skills/env-case-analysis/SKILL.md | 1 + .claude/skills/env-catalog/SKILL.md | 1 + .claude/skills/hea-rea-calculator/SKILL.md | 2 +- CHANGELOG.md | 4 ++++ README.md | 12 ++++++++++++ 8 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 .claude-plugin/marketplace.json create mode 100644 .claude-plugin/plugin.json diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json new file mode 100644 index 0000000..ce17766 --- /dev/null +++ b/.claude-plugin/marketplace.json @@ -0,0 +1,14 @@ +{ + "name": "prathikcannotcode-aranya", + "owner": { + "name": "Aranya contributors", + "url": "https://github.com/prathikcannotcode/aranya" + }, + "plugins": [ + { + "name": "aranya", + "source": "./", + "description": "Indian environmental-law skills for Claude Code" + } + ] +} diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json new file mode 100644 index 0000000..2c567fc --- /dev/null +++ b/.claude-plugin/plugin.json @@ -0,0 +1,15 @@ +{ + "name": "aranya", + "displayName": "Aranya", + "version": "0.3.2", + "description": "Indian environmental-law skills for Claude Code: NGT case analysis, EIA review and restoration-scaled damage (REA/HEA) arguments, each citing a source-checked catalog. Skills, catalog and calculator; the write guards need an Aranya workspace.", + "author": { + "name": "Aranya contributors", + "url": "https://github.com/prathikcannotcode/aranya" + }, + "homepage": "https://github.com/prathikcannotcode/aranya#readme", + "repository": "https://github.com/prathikcannotcode/aranya", + "license": "Apache-2.0", + "keywords": ["environmental-law", "india", "ngt", "eia", "rea", "hea"], + "skills": "./.claude/skills/" +} diff --git a/.claude/skills/eia-review/SKILL.md b/.claude/skills/eia-review/SKILL.md index ae234b9..0fcf12c 100644 --- a/.claude/skills/eia-review/SKILL.md +++ b/.claude/skills/eia-review/SKILL.md @@ -31,6 +31,7 @@ Review a supplied EIA report or Environmental Clearance against the EIA Notifica - Cites the 2006 Notification, never the 2020 draft. - Every finding cites the provision and its `verification` state; tooling, not legal advice. - A finding needs a `catalog_id` from `catalog/provisions.json`. If the provision is not in the catalog, raise a flag naming it and tell the user the catalog needs an entry; do not write a finding on it. +- Installed as a plugin with no `catalog/` in the working directory, read the catalog at `${CLAUDE_PLUGIN_ROOT}/catalog/provisions.json`. ## Commands diff --git a/.claude/skills/env-case-analysis/SKILL.md b/.claude/skills/env-case-analysis/SKILL.md index c9973c6..fd26df9 100644 --- a/.claude/skills/env-case-analysis/SKILL.md +++ b/.claude/skills/env-case-analysis/SKILL.md @@ -31,6 +31,7 @@ Open and orient a matter. Decide the forum before anything else, map the applica - Decide forum/jurisdiction before drafting any relief. - Every finding cites a provision and repeats its `verification` state; nothing unverified reaches a court-facing output. - A finding needs a `catalog_id` from `catalog/provisions.json`. If the provision is not in the catalog, raise a flag naming it and tell the user the catalog needs an entry; do not write a finding on it. +- Installed as a plugin with no `catalog/` in the working directory, read the catalog at `${CLAUDE_PLUGIN_ROOT}/catalog/provisions.json`. - No merits prediction; this is tooling, not legal advice. ## Commands diff --git a/.claude/skills/env-catalog/SKILL.md b/.claude/skills/env-catalog/SKILL.md index 70d379d..e8a6db8 100644 --- a/.claude/skills/env-catalog/SKILL.md +++ b/.claude/skills/env-catalog/SKILL.md @@ -29,6 +29,7 @@ Everything traces to an entry in `catalog/provisions.json`, each carrying a `sou - Every answer repeats the item's `verification` state. If `verify`/`unverified`, say so and name what a human must confirm. - The draft EIA Notification 2020 is not in force; cite only the 2006 Notification as operative. - This is tooling, not legal advice. +- Installed as a plugin with no `catalog/` in the working directory, read the catalog at `${CLAUDE_PLUGIN_ROOT}/catalog/provisions.json`. ## Commands diff --git a/.claude/skills/hea-rea-calculator/SKILL.md b/.claude/skills/hea-rea-calculator/SKILL.md index 621c2a5..275afc8 100644 --- a/.claude/skills/hea-rea-calculator/SKILL.md +++ b/.claude/skills/hea-rea-calculator/SKILL.md @@ -21,7 +21,7 @@ Size compensatory restoration by matching the discounted ecological-service loss ## Capabilities 1. **Gather inputs** per `injury-params.schema.json`: `method` (`HEA` or `REA`), `injured_area` in hectares, `baseline_service` and `injured_service` (0..1), `injury_years`, `recovery_years`, `restoration_gain` (0..1), `restoration_years` and `discount_rate` as a fraction (0.03 means 3%). Optional: `restoration_lag` (years from the start of the injury until restoration delivers service), `restoration_unit_cost` per hectare, `currency`. If any required input is missing, ask for it. Never assume one. -2. **Run** `npm run calc -- --out matters/{id}/calc/{run}.json`. The calculator validates the inputs and refuses bad ones; show the user its message rather than adjusting the numbers yourself. +2. **Run** `npm run calc -- --out matters/{id}/calc/{run}.json`. The calculator validates the inputs and refuses bad ones; show the user its message rather than adjusting the numbers yourself. Installed as a plugin with no Aranya workspace here, run `node "${CLAUDE_PLUGIN_ROOT}/.claude/scripts/hea-rea.mjs" ` with no `--out` and save its output, unchanged, to `matters/{id}/calc/{run}.json`. 3. **Read the output** — debit and credit in discounted service-hectare-years, the restoration area needed, the scaling ratio, and an optional cost when an expert unit cost is supplied. 4. **Sensitivity**: always present `range` first (area, and cost if there is one). It moves each expert input by `sensitivity_pct` one at a time, so it is not a worst case; say which rows move the result most. diff --git a/CHANGELOG.md b/CHANGELOG.md index 8cc1712..aa5aaea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## Unreleased + +- Aranya installs as a Claude Code plugin: `.claude-plugin/plugin.json` and a marketplace file. It ships the skills, the catalog and the calculator, and no hooks, because a plugin-wide write guard would block every edit in a project with no layout. Four skills say where to find the catalog and the calculator when there is no workspace. + ## 0.3.2 (2026-11-09) - The README says where Aranya comes from: the book *Evolution of Environmental Jurisprudence in India: The National Green Tribunal* (Cambridge University Press, 2025), and the aim of making REA/HEA compensation analysis free and open to anyone. diff --git a/README.md b/README.md index 1cbdd23..e68fec1 100644 --- a/README.md +++ b/README.md @@ -98,6 +98,18 @@ You need [Node.js 22+](https://nodejs.org) and [Claude Code](https://claude.com/ 5. **Start a matter.** Say *"Analyse this matter: untreated effluent degraded a mangrove stretch; the unit holds an EC."* Aranya checks the forum, applies the statutes, and records findings and flags under `matters/`. 6. **Quantify.** Give the injury and restoration parameters and run `/hea-rea-calculator`; it returns the restoration scale with its range. +### Or install the skills as a plugin + +```bash +claude plugin marketplace add prathikcannotcode/aranya +``` + +```bash +claude plugin install aranya@prathikcannotcode-aranya +``` + +The plugin carries the five skills (namespaced, as in `/aranya:env-catalog`), the catalog and the calculator, and they work in any project. It carries no hooks. Outside an Aranya workspace nothing enforces the write guard, schema validation or append-only flags, and the calculator's result is saved by the agent, so clone the repo for work that will reach a court. + ## Skills Every skill is a slash command. You can also describe the task in plain English and Claude picks the right one.