Skip to content
Back to skills

Rules

ASecurity

Verifies, compresses and completes the project rules in .claude/rules/viber/, or rewrites them from the code. User-only.

  • 8 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added October 7, 2026
developmentbash

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned December 1, 2026

npx -y skills add p2p2sp/p2p2.claude --skill rules --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Rules?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Rules
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/p2p2sp-rules/badge)](https://www.skillsdirectory.com/skills/p2p2sp-rules)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: rules
description: Verifies, compresses and completes the project rules in .claude/rules/viber/, or rewrites them from the code. User-only.
argument-hint: "[update|rewrite] [directory...]"
allowed-tools: Agent, AskUserQuestion, Bash(${CLAUDE_SKILL_DIR}/scripts/rules.sh:*)
user-invocable: true
disable-model-invocation: true
---

# rules

One `viber:rules-editor` per target directory, the script around them. Never read a brief, a note, a rule file or anything an agent wrote: act on script lines and return lines only. Arguments: $ARGUMENTS

`<rules>` is `"${CLAUDE_SKILL_DIR}/scripts/rules.sh"`, `<id>` the manifest's `<session-id>`. Run each call as one Bash line, every path double-quoted. Exit 2: show its `error:` line and stop.

## Arguments

- `update` or `rewrite` is the mode. `update` verifies, compresses and completes the rules of each target; `rewrite` deletes the rules assigned to each target and writes them from zero.
- Every other word is a target directory. None: the repository root.

## Ask

Never ask anything but these two: no approval before writing, no confirmation of `rewrite`, since everything deleted is in HEAD.

1. Run `<rules> list`. Each `OWN: <path>` line is a user rule outside `viber/`.
2. No mode in the arguments: one `AskUserQuestion`, options `update` and `rewrite`.
3. One `AskUserQuestion` call holding the questions that apply, skipped when none does:
   - No directory in the arguments: the targets, multiSelect, options `.` (the working directory) and up to 3 of its directories; a typed answer names directories separated by spaces.
   - Any `OWN:` line, even with full arguments: the files to adopt, multiSelect, options `None` and one per `OWN:` path while they fit in 4, else `None`, `All` and a typed subset. An adopted file moves into `viber/` and is verified and edited; any other is only read to avoid a duplicate.

## Prepare

Run `<rules> prepare <id> <mode> "<dir>"...`, followed by `--adopt "<file>"...` only when files were picked.

- `REFUSED:` lines (exit 3): show them and stop.
- One `BRIEF: <path>` line per target.

## Edit

Dispatch one `viber:rules-editor` per `BRIEF:` line, all in one message, prompt `brief: <path>`. Each returns `STATUS: DONE`.

## Check

Run `<rules> check <id>`, until it prints `DONE`:

- Per `BACK: <brief> | <violation> | ...` line, dispatch that brief's editor again, all in one message, prompt `brief: <brief>` and one `back: <violation>` line per violation.
- Then run `<rules> check <id>` again. The script prints one target's `BACK:` once only: never send an editor back on your own.

## Report

Run `<rules> report <id>` and print its output unchanged. The result stays in the work tree: never stage, commit or offer a commit.

Files in this skill

  • SKILL.md9.6 KB
  • scripts/rules-map.sh15 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.