pua-cancel-loop: Cancel PUA Loop in Codex
One command to halt an active PUA loop and clean up state and worktree references.
The skill modifies ~/.pua/config.json in the user's home directory, with explicit cleanup intent, no permission scope expansion or data exfiltration mentioned. However, no rollback or backup mechanism is provided, and no explicit user confirmation step is mentioned. The repository contains an upload function for collecting JSONL session logs, but that is not part of this skill path; it hints at potential data flow concerns. Deduction: missing rollback and least-privilege detail.
The skill file provides clear instructions, but lacks error handling and test coverage. The code path is simple, but no failure feedback or abnormal input handling is documented. Deduction: static review cannot execute, and file content insufficient to prove reliable operation.
The skill addresses a clear scenario (canceling PUA loop), but boundary conditions are terse, trigger conditions not detailed. Chinese description, suitable for Chinese users, no network dependencies. Deduction: non-fit range not explicit, trigger precision may be insufficient.
The skill file follows SKILL.md format with name, description, license (MIT), but lacks version info, changelog, and maintenance responsibility. Repository has multi-language README, but the skill itself lacks examples or FAQ. Deduction: incomplete information architecture, missing version and common issues.
The core task is to clean state and cancel loop; from description it should execute correctly, but lacks actual execution evidence or example outputs. As a Codex alias, it provides convenience but marginal value. Deduction: no execution results verified, direct usability of output not confirmed.
Repository contains CI workflow and test files (e.g., upload-function.test.ts), but they target other functions, not this skill. Therefore no verifiable tests for this skill. Deduction: key path not covered by reproducible third-party verification.
- The skill modifies ~/.pua/config.json; ensure backup or confirmation mechanism before execution.
- The repository's contribution upload feature (collecting JSONL session logs) may raise privacy concerns, though not part of this skill, be aware.
- No rollback or recovery plan is provided for this skill; errors during cleanup could lead to inconsistent state.
What does this skill do, and when should you use it?
pua-cancel-loop is a Codex CLI alias for the Claude Code /pua:cancel-loop command, invoked via $pua-cancel-loop. It cancels the active PUA loop by cleaning loop state and worktree references, and records the event. When modifying ~/.pua/config.json, it preserves unknown fields and creates ~/.pua/ if missing. It is one of 45 skills in the repo and does not include other skills' capabilities.
The skill performs: 1) Removes PUA loop state files (e.g., under ~/.pua/); 2) Cleans up any worktree references associated with the loop; 3) Records the cancellation event in ~/.pua/config.json, preserving unknown fields; 4) Creates ~/.pua/ if it does not exist; 5) Requires command/output evidence before claiming completion.
- A user starts a PUA loop in Codex, but it becomes stuck or no longer needed; they type $pua-cancel-loop to stop it.
- A developer switches between projects and needs to clear lingering loop state to avoid interference.
- In an automated workflow, a script detects a timeout and invokes this command as a safety mechanism.
- When a user explicitly requests to stop the loop, this command ensures state is cleaned so future sessions don't mistakenly think the loop is active.
What are this skill's strengths and limitations?
- Provides a clear cancellation mechanism to prevent loops from running away.
- Automatically cleans state files and worktree references, keeping the environment tidy.
- Preserves unknown fields in config, avoiding clobbering.
- Simple one-command trigger.
- It is only an alias; it relies on Codex's SKILL.md mechanism and has no standalone script.
- The exact worktree cleaning process is not documented, possibly depending on external tools.
- As one of many skills, it lacks the full PUA functionality if extracted alone.
- MIT license but the repo does not specify maintainer support; long-term maintenance is uncertain.
How do you install this skill?
Install the entire tanweai/pua repository. For Codex CLI, use one-command install: ask Codex to run Fetch and follow instructions from https://raw.githubusercontent.com/tanweai/pua/main/.codex/INSTALL.md, or manual: create ~/.codex/skills/pua-cancel-loop/ and copy the content of codex/pua-cancel-loop/SKILL.md to ~/.codex/skills/pua-cancel-loop/SKILL.md. Note: the repo does not provide a separate install command for this specific skill.
How do you use this skill?
After installation, type $pua-cancel-loop in a Codex conversation. For example, enter exactly $pua-cancel-loop. The command will execute and provide output indicating success.