init-signing-key

init-signing-key is a command for coding agents from ai-sdlc-framework/ai-sdlc. It costs 31 tokens per session (869 once invoked), scanned B, original, Apache-2.0.

A one-time command that creates an Ed25519 public-and-private key pair for signing code-review attestations. The private key stays on the machine, while the public key is added to the project's trusted-reviewer list.

In plain words
What is it for?
Run it before the project's execute workflow on a new machine, then add the printed public-key entry to the trusted-reviewer configuration and commit it for verification.
Why use it?
It prepares a machine to sign review results so automated checks can verify who produced them. It also refuses to replace an existing key unless explicitly forced.

Command

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

Part of the ai-sdlc plugin — 1 skill, 16 commands, 9 agents shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/ai-sdlc-framework/ai-sdlc/init-signing-key
Clone the repo
git clone --depth 1 https://github.com/ai-sdlc-framework/ai-sdlc

Or install ai-sdlc, the plugin that ships this one along with the rest of its 1 skill, 16 commands, 9 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for init-signing-key

README.md
[![agentmods](https://agentmods.dev/badge/commands/ai-sdlc-framework/ai-sdlc/init-signing-key.svg)](https://agentmods.dev/commands/ai-sdlc-framework/ai-sdlc/init-signing-key)
Your own site
<a href="https://agentmods.dev/commands/ai-sdlc-framework/ai-sdlc/init-signing-key"><img src="https://agentmods.dev/badge/commands/ai-sdlc-framework/ai-sdlc/init-signing-key.svg" alt="Measured on agentmods" height="20"></a>
Per session 31 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 869 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00031 $0.00869
Opus 5 $0.00015 $0.00434
Sonnet 5 $0.00006 $0.00174
Haiku 4.5 $0.00003 $0.00087

Measured 6d ago against content hash fc45537c064d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade B, and why

init-signing-key scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

chmod 700 "$HOME/.ai-sdlc"
ai-sdlc-plugin/commands/init-signing-key.md · 86 lines

How it starts

The opening of the file, as written. The whole thing — 86 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Generate a per-machine ed25519 signing key used by /ai-sdlc execute Step 10 to sign review attestations (DSSE envelopes). The matching public key gets added to .ai-sdlc/trusted-reviewers.yaml via a follow-up onboarding PR — CI verifies signatures against that committed file and skips its own duplicate review when the attestation is valid (AISDLC-74).

When to run this

You only need to run this once per machine before your first /ai-sdlc execute. If /ai-sdlc execute errors out with signing-key not found, run this command, open the suggested onboarding PR, and re-run /ai-sdlc execute once that PR merges.

What this does

  1. Generates an ed25519 keypair via Node's built-in crypto.generateKeyPairSync.
  2. Writes the private key to ~/.ai-sdlc/signing-key.pem with mode 0600. The private key never leaves your machine and is never committed.
  3. Prints the public key in PEM format plus a copy-pasteable .ai-sdlc/trusted-reviewers.yaml entry that you commit to a follow-up PR.

If the file already exists, the command refuses to overwrite unless you pass --force. Overwriting silently would invalidate every prior attestation this machine signed (the matching pubkey in trusted-reviewers.yaml is now stale and CI will reject new envelopes from this machine).

Usage

/ai-sdlc init-signing-key
# Generates ~/.ai-sdlc/signing-key.pem (refuses if it already exists).

/ai-sdlc init-signing-key --force
# Replaces the existing key. You must then open a PR removing the old
# trusted-reviewers entry and adding the new one.

Implementation contract

KEY_PATH="$HOME/.ai-sdlc/signing-key.pem"
PUB_PATH="$HOME/.ai-sdlc/signing-key.pub.pem"
FORCE_FLAG=""
if [ "$ARGUMENTS" = "--force" ]; then
  FORCE_FLAG="--force"
fi

mkdir -p "$HOME/.ai-sdlc"
chmod 700 "$HOME/.ai-sdlc"

if [ -f "$KEY_PATH" ] && [ -z "$FORCE_FLAG" ]; then
  echo "ERROR: $KEY_PATH already exists. Pass --force to overwrite (this will"
  echo "       invalidate every attestation signed by the existing key)."
  exit 1
fi

# Use Node's built-in crypto via the plugin's helper (no extra deps).
# The helper writes BOTH the private key (mode 0600) and the public key
# (mode 0644) and prints the trusted-reviewers entry to stdout.
node "${CLAUDE_PLUGIN_ROOT}/scripts/init-signing-key.mjs" $FORCE_FLAG

Read the full file on GitHub · 86 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 86 lines · 31 tokens per session scan B fc45537c064d

Subscribe to this mod's changes

init-signing-key is a command published in the GitHub repository ai-sdlc-framework/ai-sdlc (103 stars, last pushed today), licensed Apache-2.0. It adds 31 tokens to every session and 869 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.