ptp-workspace-init

Creates a ptp workspace in the current directory with preflight gates and a structured report.

Updated Jun 8, 2026
One-click install
npx skills add https://github.com/AlmogMaayan/ptp --skill ptp-workspace-init-almogmaayan
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: ptp-workspace-init
Source: https://github.com/AlmogMaayan/ptp/tree/main/skills/ptp-workspace-init
Command: npx skills add https://github.com/AlmogMaayan/ptp --skill ptp-workspace-init-almogmaayan

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires openspec.

What problem does it solve? Turning an arbitrary directory into a resolvable ptp workspace requires running the OpenSpec CLI correctly, seeding configuration without clobbering existing files, and handling edge cases like nested workspaces or partial trees. This Skill defines that creation procedure exactly, so one invocation produces one deterministic outcome. ## Core Features & Use Cases - Deterministic creation: Runs npx -y openspec init --tools none . in the current directory and seeds an empty .claude/ptp/config.json only when absent, leaving existing files byte-identical. - Ordered preflight gates: Refuses on any supplied argument, a non-directory openspec entry, an existing openspec directory, or a missing git root — creating nothing on refusal. - Structured reporting: Prints slug, isRoot, branch shape, config target, seed outcome, and warnings, with exactly one needs-human-action case carrying the repair command. - Use Case: A developer inside a git repository runs /ptp:workspace-init to declare the current directory a ptp workspace, and receives a report confirming resolution even when an ancestor workspace already exists. ## Quick Start Ask the AI to run /ptp:workspace-init in the current directory to declare it a ptp workspace and show the resulting report.

Frequently Asked Questions about ptp-workspace-init

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I initialize a ptp workspace in a directory?▼

Run /ptp:workspace-init with no arguments from inside a git repository. It executes npx -y openspec init --tools none . in the current directory and seeds an empty .claude/ptp/config.json, then reports the workspace slug and branch shape.

What happens if an openspec directory already exists?▼

The run is refused by gate 3, which fires on any openspec directory at the current path, even an empty or partial one. The refusal names npx -y openspec init --tools none . as the idempotent repair for a half-made tree.

Does workspace-init work outside a git repository?▼

No. Gate 4 refuses when workspace resolution reports no-git-root, because ptp requires a git root even though the OpenSpec CLI itself does not. Nothing is created or written on refusal.

Will workspace-init overwrite my existing config.json?▼

No. The seed is written only when .claude/ptp/config.json is absent. An existing file is left byte-identical, and the report states that the existing file was kept.

What happens when an ancestor workspace already exists?▼

The run completes with a warning naming the ancestor's absolute path and explaining that resolution now targets the new workspace. It never prompts or refuses, and deleting the new openspec directory restores the previous resolution.

Why did workspace-init report needs-human-action?▼

That state occurs only when the OpenSpec CLI exits non-zero or exits zero without creating both openspec/changes/archive/ and openspec/specs/. The report includes the exact follow-up command to run from the current directory.