How to write a SKILL.md for a nexus pack. Use when creating or editing a skill under packages/packs, importing a community skill, or fixing scanner findings. Covers front matter, the requires block, license and origin, body style, what the scanner flags, quarantine and signing.
2 stars
0 votes
0 copies
1 view
Added December 5, 2026
ai-agentsrustgogitsecurity
Works with
claude code
Security analysis
D50/100
criticalPipes output to a shell interpreter
criticalDownloads and executes remote scripts — classic supply chain attack
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Nexus Skill Authoring?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/prasadm1022-nexus-skill-authoring)
---
name: nexus-skill-authoring
description: How to write a SKILL.md for a nexus pack. Use when creating or editing a skill under packages/packs, importing a community skill, or fixing scanner findings. Covers front matter, the requires block, license and origin, body style, what the scanner flags, quarantine and signing.
license: MIT
version: 0.1.0
---
# Writing a pack skill
Pack skills are what nexus employees load. They are different from the Claude Code skills in `.claude/skills/`, which are for contributors. A pack skill is untrusted input until it is hashed, scanned and signed.
## File layout
One directory per skill: `SKILL.md` plus optional reference files and scripts. The content hash covers every file in the directory, in any order, so anything you add changes the hash and the signature.
## Front matter
```yaml
---
name: invoice-intake
description: Draft ledger entries from supplier invoices. Use when a PDF or email invoice arrives and needs to be recorded. Never pays anything.
version: 0.1.0
license: MIT
requires:
tools: [fs.read, ledger.draft]
hosts: []
classes: [read, write-local]
task-types: [finance.invoice-intake]
origin: # only for imported skills
url: https://github.com/example/example-skills
commit: 0123456789abcdef0123456789abcdef01234567
license: MIT
---
```
| Field | Rule |
| ------------- | ----------------------------------------------------------------------------------------------- |
| `name` | Lowercase letters, digits and single hyphens, at most 64 characters; equals the directory name |
| `description` | 1 to 1024 characters. Say what it does and when to use it; the router picks skills by this text |
| `version` | Semver |
| `license` | Required, an SPDX id on the permissive allowlist. CI fails a pack skill without one |
| `requires` | `tools`, `hosts` and `classes` the skill needs. Ask for the minimum |
| `task-types` | `<department>.<task>` names the skill serves |
| `origin` | `url`, `commit`, `license` of anything imported or adapted |
Signed skills use the strict codec: an unknown front-matter key is an error. Imported community skills go through the lenient codec into quarantine, which drops unknown keys with a warning.
## `requires` can only narrow
The run's grant is the intersection of the employee's hands, the skill's request, the team, the ticket and the department ceiling. A skill cannot give an employee a tool, host or class they lack. Declare every host you contact. Do not request a reserved class (money, trading, credential, cloud-resource, publish, irreversible) unless the skill's job is to prepare a card for it; the action itself still needs a human-approved card.
## Body
- Write imperative steps a model can follow. Short, specific, testable.
- Put long reference material in separate files in the skill directory. Descriptions load first and bodies on demand.
- State what the skill must not do and when to stop and ask.
- Never tell the agent to skip, defer or self-grant approval, claim a human already approved, ignore earlier instructions, hide output from the user, or disable a check.
- Never include secrets, tokens or personal data. Refer to credentials by handle.
## What the scanner flags
`packages/skills/src/scanner.ts` is the source of truth. As of the date of writing the rules are:
| Rule | Meaning |
| ----------------------------------------------------------- | ----------------------------------------------------------- |
| `remote-exec` | Downloads code and runs it (`curl ... \| sh`) |
| `dynamic-eval`, `process-spawn` | Evaluates run-time code; spawns processes |
| `obfuscation`, `encoded-blob` | Decodes hidden code; long encoded blobs |
| `credential-read`, `env-dump` | Touches credential locations; dumps the environment |
| `exfiltration`, `undeclared-host` | Sends local data out; contacts hosts not in `requires` |
| `bidi-control`, `hidden-unicode` | Bidirectional controls; zero-width or invisible characters |
| `prompt-injection`, `approval-bypass` | Overrides instructions; skips or self-grants approval |
| `undeclared-reserved-action` | Reserved action without declaring the class |
| `write-outside-workspace`, `persistence`, `unattended-loop` | Writes outside roots; installs itself; loops unattended |
| `binary-file`, `executable-binary` | Files that cannot be reviewed as text; compiled executables |
Severity and level decide block, warn or allow. Quarantine never blocks; personal blocks at critical; team and above block at high. Fix findings; do not argue with them.
## Lifecycle
1. New and distilled skills start in **quarantine**: no tools, no network, empty grant layer.
2. They are evaluated with the evaluation harness on held-out cases and scanned.
3. Promotion to team and above needs a clean scan and a valid signature. The org signing key is held by the security lead, never by an agent. Do not try to sign.
4. A revoked skill is refused everywhere.
## Importing a community skill
Never bulk-install. Each candidate needs a declared license on the allowlist, a scanner pass, a signature, and an `origin` record. A skill without a license is reference only. See the `nexus-license-policy` skill.
## Checklist
- [ ] `name` matches the directory; `description` says when to use it
- [ ] `license` is permissive; `origin` filled for anything imported
- [ ] `requires` is the minimum, hosts declared
- [ ] Scanner and validator pass; no findings left unexplained
- [ ] Tests or evaluation cases exist for the behaviour it claims