Analyze code changes and detect intent drift using the pr-to-spec CLI — converts a branch, staged edits, or recent commits into a structured, agent-consumable spec.

MITAuto-check passed

Install PR To Spec

skills CLI
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill pr-to-spec -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jeremylongshore/tons-of-skills-marketplace pr-to-spec --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/mcp/pr-to-spec/.claude/skills/pr-to-spec .claude/skills/pr-to-spec && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
pr-to-spec
GitHub stars
2.8k
Token cost
~1.1k tokens
SKILL.md length
366 words
Files
1
Skills in repo
3,342
Repo updated
First seen
Licence
MIT

At a glance

Analyze code changes and detect intent drift using the pr-to-spec CLI — converts a branch, staged edits, or recent commits into a structured, agent-consumable spec.

  • Declaring intent before a change
  • SKILL.md covers Overview, Prerequisites, Usage and Output format, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Checking a finished change for drift against that intent

What it does

PR To Spec is an agent skill from jeremylongshore/tons-of-skills-marketplace. Analyze code changes and detect intent drift using the pr-to-spec CLI — converts a branch, staged edits, or recent commits into a structured, agent-consumable spec. Use when declaring intent before a change, checking a finished change for drift against that intent, or generating a spec for agent review. Trigger with "/pr-to-spec", "pr-to-spec scan", "pr-to-spec check", or "pr-to-spec intent".

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts. Compatibility notes: Requires the pr-to-spec CLI on PATH (Node.js 18+; ships with this plugin) and a git repository to analyze. Runs in Claude Code or any agent runtime with shell…

The repository describes itself as: Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com. The licence is MIT.

When your agent uses it

  • Declaring intent before a change
  • Checking a finished change for drift against that intent
  • Generating a spec for agent review
  • With /pr-to-spec

Example prompts

  • “/pr-to-spec”
  • “pr-to-spec scan”
  • “pr-to-spec check”
  • “/pr-to-spec”

Requirements

  • Node.js
  • Compatibility (from SKILL.md): Requires the pr-to-spec CLI on PATH (Node.js 18+; ships with this plugin) and a git repository to analyze. Runs in Claude Code or any agent runtime with shell access.
  • Pre-approved tools (allowed-tools): Bash(pr-to-spec:*)

What it can do on your machine

Read from SKILL.md and the folder at commit cfae287. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash(pr-to-spec:*)

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are bash, json and markdown).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com
    • jeremylongshore.github.io

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Requires the pr-to-spec CLI on PATH (Node.js 18+; ships with this plugin) and a git repository to analyze. Runs in Claude Code or any agent runtime with shell access.

    From compatibility in the SKILL.md frontmatter.

Context cost

PR To Spec loads about 1.1k tokens when it runs. Until then it costs about 102 tokens; SKILL.md has 366 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~102
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from jeremylongshore/tons-of-skills-marketplace at commit cfae287, republished under its MIT licence (© jeremylongshore). 366 words, ~1,125 tokens.

Download SKILL.mdSave it as .claude/skills/pr-to-spec/SKILL.md (or your agent's skills folder).
name
pr-to-spec
description
Analyze code changes and detect intent drift using the pr-to-spec CLI — converts a branch, staged edits, or recent commits into a structured, agent-consumable spec. Use when declaring intent before a change, checking a finished change for drift against that intent, or generating a spec for agent review. Trigger with "/pr-to-spec", "pr-to-spec scan", "pr-to-spec check", or "pr-to-spec intent".
allowed-tools
Bash(pr-to-spec:*)
compatibility
Requires the pr-to-spec CLI on PATH (Node.js 18+; ships with this plugin) and a git repository to analyze. Runs in Claude Code or any agent runtime with shell access.
version
0.8.0
author
Jeremy Longshore <jeremy@intentsolutions.io>
license
MIT
tags
git, pr, spec, intent-drift, code-review, agent-protocol
argument-hint
[scan | check | intent set | intent show]

pr-to-spec Skill

Overview

Convert code changes into structured, agent-consumable specs with intent drift detection. The workflow is: declare what a change is supposed to do (intent set), make the changes, then check — the CLI produces a spec of what actually changed plus drift signals against the declared intent, wrapped in a versioned JSON envelope any agent can consume.

Prerequisites

  • The pr-to-spec CLI on PATH (it ships with this plugin; standalone install and MCP-server usage are covered in the repo README).
  • A git repository with something to analyze — a branch diverging from main, staged edits, or recent commits.

Usage

/pr-to-spec scan

Analyze current branch changes vs main and output a structured spec.

bash
pr-to-spec scan --branch main --json

Use --diff N to scan last N commits, or --staged for staged changes only.

/pr-to-spec check

Scan current changes AND check for drift against declared intent.

bash
pr-to-spec check --json

Returns exit code 3 if drift is detected, 2 if high-risk, 0 if clean.

/pr-to-spec intent set

Declare what this change is supposed to do.

bash
pr-to-spec intent set --goal "Add rate limiting to API" --scope "src/middleware/**" --forbid "src/db/**" --max-risk medium
/pr-to-spec intent show

Show the current intent declaration.

bash
pr-to-spec intent show --json

Output format

All --json output is wrapped in the agent protocol envelope:

json
{
  "version": 1,
  "command": "check",
  "status": "drift_detected",
  "exit_code": 3,
  "signals": [...],
  "spec": {...},
  "intent": {...}
}

The spec field is the structured description of what changed, intent is the declared intent (when one exists), and signals carries the drift and risk findings that produced the status and exit_code.

Show full SKILL.md (152 more words)Show less

Error Handling

Interpret exit codes — they are the contract:

CodeMeaning
0Clean — no issues
1Error
2High-risk changes detected
3Drift detected
  • Exit 3 (drift) — the change touched files outside the declared scope, hit a --forbid pattern, or diverged from the declared goal. Stop and investigate before continuing; either fix the change or re-declare intent deliberately.
  • Exit 2 (high-risk) — the change exceeds the declared --max-risk ceiling. Review the signals array for which risk flags fired.
  • Exit 1 (error) — the CLI itself failed (not a git repo, no intent declared for check, malformed arguments). The message on stderr says which; fix the invocation rather than the code.

Examples

Full declare → change → check loop:

bash
pr-to-spec intent set --goal "Add rate limiting to API" --scope "src/middleware/**" --forbid "src/db/**" --max-risk medium
# ...make the changes...
pr-to-spec check --json    # exit 0 = clean, 2 = high-risk, 3 = drift

Wire it into a project's CLAUDE.md so every significant change runs the loop:

markdown
## Change Validation

Before any significant code change:
1. Set intent: `pr-to-spec intent set --goal "..." --scope "..." --max-risk medium`
2. After changes: `pr-to-spec check --json` — exit 3 means drift, investigate before continuing

Resources

© jeremylongshore, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in plugins/mcp/pr-to-spec/.claude/skills/pr-to-spec of jeremylongshore/tons-of-skills-marketplace.

Open the folder on GitHubat commit cfae287

Compare with similar skills

PR To Spec next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

PR To Spec compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
PR To Spec this skilljeremylongshore/tons-of-skills-marketplace2.8k—~1.1kAutomated safety check: PassMIT
Detecting Container Drift At Runtimemukul975/Anthropic-Cybersecurity-Skills34k—~2.1kAutomated safety check: PassApache-2.0
Threat Detectionalirezarezvani/claude-skills28k—~3.5kAutomated safety check: PassMIT
Intent Requirements IntakeYeachan-Heo/oh-my-claudecode40k—~1.5kAutomated safety check: PassMIT
Harness Drift From Historyruvnet/ruflo74k—~632Automated safety check: NotesMIT
Resemble Detectgithub/awesome-copilot40k3 repos~4.1kAutomated safety check: PassApache-2.0

Similar skills

  • Detecting Container Drift At Runtime

    mukul975/Anthropic-Cybersecurity-Skills

    Detects unauthorized runtime drift in containers by monitoring binary execution, filesystem changes, and configuration deviation from the original immutable image, using Falco and Microsoft Defender…

    34k GitHub stars~2.1k tokensUpdated 1 mo ago
    DevOps & CloudAuto-check passed
  • Threat Detection

    alirezarezvani/claude-skills

    A skill your agent uses when hunting for threats in an environment, analyzing IOCs, or detecting behavioral anomalies in telemetry.

    28k GitHub stars~3.5k tokensUpdated 1 mo ago
    SecurityAuto-check passed
  • Intent Requirements Intake

    Yeachan-Heo/oh-my-claudecode

    Turns a pasted chat log or spoken problem report from support or ops staff into a reviewed five-section intent.md through numbered batches of questions.

    40k GitHub stars~1.5k tokensUpdated 3 days ago
    Product & Project ManagementAuto-check passed
  • One-command drift detection. An agent skill from ruvnet/ruflo.

    74k GitHub stars~632 tokensUpdated yesterday
    DevelopmentAuto-check: notes
  • Resemble Detect

    github/awesome-copilot

    Official

    Deepfake detection and media safety — detect AI-generated audio, images, video, and text, trace synthesis sources, apply watermarks, verify speaker identity, and analyze media intelligence using…

    40k GitHub starsUsed in 3 repos~4.1k tokens
    Media & CreativeAuto-check passed
  • Drift

    alsk1992/CloddsBot

    Drift Protocol - perpetuals and prediction markets on Solana

    3k GitHub stars~299 tokensUpdated 9 days ago
    Auto-check passed

More from jeremylongshore/tons-of-skills-marketplace

All 3,342 skills in this repo
  • Performing Security Code Review

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to conduct a security-focused code review using the security-agent plugin.

    2.8k GitHub starsUsed in 2 repos~1.3k tokens
    Auto-check: notes
  • Adapting Transfer Learning Models

    jeremylongshore/tons-of-skills-marketplace

    Build this skill automates the adaptation of pre-trained machine learning models using transfer learning techniques.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Agent Context Loader

    jeremylongshore/tons-of-skills-marketplace

    Execute proactive auto-loading: automatically detects and loads agents.md files.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Aggregating Performance Metrics

    jeremylongshore/tons-of-skills-marketplace

    Aggregate and centralize performance metrics from applications, systems, databases, caches, and services.

    2.8k GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Analyzing Capacity Planning

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to analyze capacity requirements and plan for future growth.

    2.8k GitHub stars~947 tokensUpdated today
    Auto-check passed
  • Analyzing Database Indexes

    jeremylongshore/tons-of-skills-marketplace

    Process use when you need to work with database indexing. An agent skill from jeremylongshore/tons-of-skills-marketplace.

    2.8k GitHub stars~2k tokensUpdated today
    Auto-check passed

Questions about PR To Spec

What does PR To Spec do?

Analyze code changes and detect intent drift using the pr-to-spec CLI — converts a branch, staged edits, or recent commits into a structured, agent-consumable spec. PR To Spec is an agent skill from jeremylongshore/tons-of-skills-marketplace. Analyze code changes and detect intent drift using the pr-to-spec CLI — converts a branch, staged edits, or recent commits into a structured, agent-consumable spec.

When should I use PR To Spec?

PR To Spec fits situations like: declaring intent before a change; checking a finished change for drift against that intent; generating a spec for agent review; with /pr-to-spec.

How do I install PR To Spec in Claude Code?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill pr-to-spec -a claude-code`. Or copy the skill folder (plugins/mcp/pr-to-spec/.claude/skills/pr-to-spec in jeremylongshore/tons-of-skills-marketplace) into .claude/skills/pr-to-spec in your project. Claude Code loads it when a task matches its description.

How do I install PR To Spec in Codex?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill pr-to-spec -a codex`. Or copy the skill folder (plugins/mcp/pr-to-spec/.claude/skills/pr-to-spec in jeremylongshore/tons-of-skills-marketplace) into .agents/skills/pr-to-spec in your project. Codex loads it when a task matches its description.

Can I use PR To Spec in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill pr-to-spec -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/pr-to-spec, .gemini/skills/pr-to-spec, .github/skills/pr-to-spec and .opencode/skills/pr-to-spec in your project.

What does PR To Spec need to run?

SKILL.md names no scripts, command-line tools or credentials: PR To Spec is instructions for the agent only. Our summary lists: Node.js. Its frontmatter pre-approves these tools: Bash(pr-to-spec:*). Compatibility (from SKILL.md): Requires the pr-to-spec CLI on PATH (Node.js 18+; ships with this plugin) and a git repository to analyze. Runs in Claude Code or any agent runtime with shell access..

Does PR To Spec access the network?

SKILL.md names 2 domains. As links in the text: github.com and jeremylongshore.github.io. This is read from the text; nothing was executed.

Is PR To Spec safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does PR To Spec use?

PR To Spec is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does PR To Spec use?

About 1.1k tokens (SKILL.md is roughly 4.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to PR To Spec?

Skills that share tags, products or a category with PR To Spec: Detecting Container Drift At Runtime (mukul975/Anthropic-Cybersecurity-Skills, 34k stars), Threat Detection (alirezarezvani/claude-skills, 28k stars), Intent Requirements Intake (Yeachan-Heo/oh-my-claudecode, 40k stars) and Harness Drift From History (ruvnet/ruflo, 74k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains PR To Spec?

jeremylongshore (a GitHub user) maintains it in jeremylongshore/tons-of-skills-marketplace, which has 2,827 GitHub stars. The repository holds 3,342 skills in this directory. The repository was last updated on October 10, 2026.

Source: jeremylongshore/tons-of-skills-marketplace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.