Skip to content
Back to skills

Extension

ASecurity

Creates or adapts an agent in the project's .claude/agents/ that a viber build runs at its close, just before the run is archived, with one forked skill in .claude/skills/ per phase when its work runs in phases one after another, and registers it as an entry of build.extensions in .claude/viber.yml. Use when the project needs a closing step of the project's own, for example end-user help files written after every task is committed.

  • 6 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added October 7, 2026
ai-agentsrustbashgit

Security analysis

A100/100

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

Scanned October 7, 2026

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

Installs into .claude/skills of the current project.

Are you the author of Extension?

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

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

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: extension
description: Creates or adapts an agent in the project's .claude/agents/ that a viber build runs at its close, just before the run is archived, with one forked skill in .claude/skills/ per phase when its work runs in phases one after another, and registers it as an entry of build.extensions in .claude/viber.yml. Use when the project needs a closing step of the project's own, for example end-user help files written after every task is committed.
allowed-tools: AskUserQuestion, Skill, Read, Write(./.claude/agents/**), Edit(./.claude/agents/**), Write(./.claude/skills/**), Edit(./.claude/skills/**), Bash(${CLAUDE_PLUGIN_ROOT}/skills/extension/scripts/extension.sh:*), Bash(${CLAUDE_PLUGIN_ROOT}/skills/extension/scripts/extension.sh --add:*)
user-invocable: true
disable-model-invocation: true
---

# extension

```!
"${CLAUDE_PLUGIN_ROOT}/skills/extension/scripts/extension.sh"
```

The block above is this project's extension state as the script measured it: `CONFIG=` (`ok`, `no-config` or `stale`), `LISTED=` (the entries of `build.extensions` that have an agent file, in run order), `MISSING=` (the entries with none, or invalid) and one `AGENT=<name> | contract | plain` line per file of `.claude/agents/`, `contract` meaning it already carries the extension marker. It is trusted: never open `.claude/viber.yml`, never list `.claude/agents/` yourself.

## 1. Gate and report

`CONFIG=no-config` or `CONFIG=stale` -> say the configuration is missing or has no `extensions:` key under `build:`, name `/viber:setup`, and stop: nothing is written, nothing is added.

Otherwise report in one short block: the listed names, the missing ones, and each agent with `contract` or `plain`.

## 2. Create or adapt

One `AskUserQuestion`: create a new agent, or adapt an existing one. Offer `create new` plus one `adapt <name>` option per `AGENT=` line while the list fits; past that, offer `create new` and `adapt an existing one`, and take the name from the free answer. No `AGENT=` line -> there is nothing to adapt: say so, ask nothing and create.

## 3. Interview

One prose message, five questions, then wait for the answer:

- what the agent produces
- where it writes, as repository-relative paths
- in which language
- from which inputs: the run's specification, its notes, the build's commits, files of the project
- whether the work runs in phases one after another, and if so each phase's name and what it produces for the next

On adapt, add what the agent should keep doing as it is. The name of a new agent is the user's: lowercase letters, digits and hyphens, starting with a letter or a digit. Ask nothing else.

## 4. Write the agent and its phase skills

Read `${CLAUDE_SKILL_DIR}/templates/extension.md` and `${CLAUDE_SKILL_DIR}/references/authoring.md` now, and write every file below by the authoring rules.

- Create -> fill the template into a new `.claude/agents/<name>.md` with `Write`: the `name`, a `description` that says what the agent produces and ends with the template's fixed closing sentence, and the task section from the interview answers. Keep every other line of the template as it stands.
- Adapt -> `Read` the agent, then `Edit` it, never a rewrite: keep its own role and rules, and add or correct only what the template carries that the file lacks (marker line, input lines, the way to find the build's commits, the output vocabulary, the bans, the refused-tool paragraph, `Stop what you started`, the read-back). Its `description` gains the closing sentence.
- Phases in the answers -> one forked skill per phase, so no phase's tool output fills the agent's context: `Write` each new `.claude/skills/<name>-<phase>/SKILL.md`; a phase skill that already exists is `Read`, then `Edit`ed, never rewritten. Wire the agent to them as the authoring rules' Task section says.
- Write only under `.claude/agents/` and `.claude/skills/`. Read each file's tail back after the write and delete a leaked bare closing tag.

When `supercc:skill-designer` is in this session's skill listing, invoke it through `Skill` on the agent file and on each phase skill's directory, then apply what it approves. When it is not listed, skip this and install nothing.

## 5. Register

Run one literal line, nothing chained after it:

```
"${CLAUDE_PLUGIN_ROOT}/skills/extension/scripts/extension.sh" --add <name>
```

- `STATUS=added` -> the name became an entry of `build.extensions` holding `parallel: false`: the agent runs alone. Tell the user to set that entry's `parallel` to `true` in `.claude/viber.yml` to run the agent together with the parallel entries next to it.
- `STATUS=present` -> the name already has an entry in `build.extensions`: the entries are left as they are.
- `STATUS=no-config` or `STATUS=stale` -> the agent file stays, nothing was registered: name `/viber:setup` and stop.
- `STATUS=invalid-name` -> ask for another name and rename the file, then run the line again.

## 6. Close

Nothing is staged and nothing is committed: say the agent file, every phase skill and `.claude/viber.yml` sit in the working tree for the user to commit. End on one line telling the user to reload the session before a build uses the agent, because the harness loads a new agent file only at session start.

Files in this skill

  • SKILL.md5.1 KB
  • references/authoring.md3.1 KB
  • scripts/extension.sh8.2 KB
  • templates/extension.md3.1 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.

Comments

Loading comments…

Newsletter

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