unworldly: Command for Claude Code

.claude/commands/sp.phr.md

sp.phr is a command for Claude Code from DilawarShafiq/unworldly. It costs 19 tokens per session (1,842 once invoked), scanned A, a copy of sp.phr, MIT.

A command that records an AI conversation as a Prompt History Record, a structured document for later learning, search, or audit.

In plain words
What is it for?
Use it to document feature work, planning, implementation, debugging, refactoring, discussions, and other completed exchanges.
Why use it?
It preserves the full exchange and its context instead of leaving useful decisions buried in chat history.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution.

This is DilawarShafiq/unworldly's own configuration. It tells Claude Code how to work on unworldly itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything unworldly configures →

Reuse

Borrowing it

Nothing to install: this file belongs to DilawarShafiq/unworldly. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/DilawarShafiq/unworldly/master/.claude/commands/sp.phr.md
Clone the repo
git clone --depth 1 https://github.com/DilawarShafiq/unworldly

Made for: Claude Code.

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 sp.phr

README.md
[![agentmods](https://agentmods.dev/badge/commands/dilawarshafiq/unworldly/sp.phr.svg)](https://agentmods.dev/commands/dilawarshafiq/unworldly/sp.phr)
Your own site
<a href="https://agentmods.dev/commands/dilawarshafiq/unworldly/sp.phr"><img src="https://agentmods.dev/badge/commands/dilawarshafiq/unworldly/sp.phr.svg" alt="Measured on agentmods" height="20"></a>
Per session 19 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,842 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod 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.00019 $0.01842
Opus 5 $0.00010 $0.00921
Sonnet 5 $0.00004 $0.00368
Haiku 4.5 $0.00002 $0.00184

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

Security

Grade A, and why

sp.phr scanned grade A with 0 findings 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

100% identical to sp.phr — 390 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.claude/commands/sp.phr.md · 196 lines

How it starts

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

COMMAND: Record this AI exchange as a structured PHR artifact

CONTEXT

The user has just completed work (or is requesting work) and needs to capture this exchange as a Prompt History Record (PHR) for:

  • Learning and pattern recognition (spaced repetition)
  • Team knowledge sharing and traceability
  • Compliance and audit requirements
  • Building a searchable corpus of effective prompts

User's input to record:

$ARGUMENTS

CRITICAL: The complete text above is the PROMPT to preserve verbatim. Do NOT truncate to first line only.

YOUR ROLE

Act as a meticulous documentation specialist with expertise in:

  • Knowledge management and organizational learning
  • Software development lifecycle documentation
  • Metadata extraction and classification
  • Creating structured, searchable technical records

QUICK OVERVIEW (strict)

After completing ANY work, automatically create a PHR:

  1. Detect work type: constitution|spec|plan|tasks|implementation|debugging|refactoring|discussion|general
  2. Generate title: 3-7 word descriptive title summarizing the work
  3. Capture context: COMPLETE conversation (never truncate to summaries)
  4. Route correctly:
    • Pre-feature work → history/prompts/
    • Feature-specific work → specs/<feature>/prompts/
  5. Confirm: Show "📝 PHR-NNNN recorded"

OUTPUT STRUCTURE (with quick flywheel hooks)

Execute this workflow in 5 sequential steps, reporting progress after each:

Step 1: Execute User's Request (if not already done)

If the user provided a task/question in $ARGUMENTS:

  • Complete the requested work first
  • Provide full response to user
  • Then proceed to Step 2 to record the exchange

If you already completed work and user just wants to record it:

  • Skip to Step 2

Step 2: Determine Stage and Routing

Select ONE stage that best describes the work:

Constitution (→ history/prompts/constitution/):

  • constitution - Defining quality standards, project principles

Feature-specific (→ history/prompts/<feature-name>/ - requires feature context):

  • spec - Creating feature specifications
  • plan - Architecture design and technical approach
  • tasks - Implementation breakdown with test cases
  • red - Debugging, fixing errors, test failures
  • green - Implementation, new features, passing tests
  • refactor - Code cleanup, optimization
  • explainer - Code explanations, documentation
  • misc - Other feature-specific work

Read the full file on GitHub · 196 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 · 196 lines · 19 tokens per session scan A fbdf18a194a6

Subscribe to this mod's changes

sp.phr is a command published in the GitHub repository DilawarShafiq/unworldly (9 stars, last pushed 1mo ago), licensed MIT. It adds 19 tokens to every session and 1,842 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to sp.phr, differing in 390 lines, and is treated as a copy.

Related

Other commands, from other repositories

graduate

Graduate a Lovable / Bolt / v0 export to GitHub Actions + a non-platform deploy target via the Starter Series 5-step path. Orchestrates the three audit MCP tools and surfaces lift-in steps for the matching starter.

starter-series/create-starter · 47 tokens

seed-security-guidance

Generate a starter claude-security-guidance.md at the repo root tailored to the detected Starter Series template. Anthropic's Claude Code Security Guidance Plugin (released 2026-05-26) reads this file as an in-session guard.

starter-series/create-starter · 48 tokens

audit-security

Check baseline CI security hygiene against the Starter Series bar — gitleaks, CodeQL, dep audit, license check, --ignore-scripts, Dependabot grouped, secret-scanning, claude-code-security-review, claude-security-guidance. Read-only, complementary to Anthropic's in-session security guidance plugin.

starter-series/create-starter · 63 tokens

proof-report

Generate a Launch Proof Report for an existing repo by combining release, publish, and security audit evidence.

starter-series/create-starter · 20 tokens

audit-cd

Check publish drift across destination registries — npm, PyPI, Open VSX, VS Marketplace, AMO (Firefox), GitHub Releases — via public read APIs. Read-only, makes outbound HTTPS.

starter-series/create-starter · 41 tokens

audit-release

Diagnose release-readiness against the Starter Series quality bar — matched starter, version-vs-last-tag drift, CHANGELOG drift vs merged PRs, and publish-workflow kind. Read-only.

starter-series/create-starter · 39 tokens