with one click
ownership-session-security
Session ownership and authorization workflow.
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Session ownership and authorization workflow.
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
| name | ownership-session-security |
| description | Session ownership and authorization workflow. |
| origin | pi-crew |
| triggers | ["cancel run","respond to task","cross-session action","ownership verify","session security"] |
Use this skill for cross-session safety and trust-boundary work.
ctx.sessionManager.getSessionId() from Pi core ExtensionContextTeamRunManifest.ownerSessionId, src/extension/team-tool/run.ts, cancel.ts, respond.tssrc/utils/safe-paths.ts, src/state/state-store.ts, src/state/mailbox.tssrc/extension/team-tool/lifecycle-actions.ts, src/worktree/cleanup.tsTeamContext for every production tool/command path.ownerSessionId when available.ownerSessionId may remain permissive for backward compatibility, but document this behavior.cwd, import paths, artifact paths, task IDs) must be normalized and contained under an allowed base.resolveContainedPath, resolveRealContainedPath, assertSafePathId, and symlink checks rather than ad-hoc startsWith checks.confirm: true; referenced resource deletes must require force: true where applicable.Before mutating run state or cross-session operations, verify:
If ANY answer is NO → Stop. Verify ownership before mutating state.
ctx.sessionId exists directly on Pi context.cwd: ../other-project move run state into another project.respond/cancel mutate a foreign owned run.cd pi-crew
npx tsc --noEmit
node --experimental-strip-types --test test/unit/cancel-ownership.test.ts test/unit/respond-tool.test.ts test/unit/cwd-override-security.test.ts test/unit/api-artifact-security.test.ts
npm test
Iterative multi-round codebase audit with diminishing-returns detection. Run 5-20+ rounds, each focusing on one specific area. Built from 19 rounds of dogfooding pi-crew on itself.
Pi TUI crew widget data sources, display priority, and rendering performance.
Multi-phase orchestration for planners and executors.
Spawn 3 adversarial subagents (Skeptic, Pragmatist, Critic) to evaluate a decision, architecture choice, or plan. Anti-anchoring: each role receives ONLY the question, not conversation history. Aggregates votes into consensus recommendation with dissent tracking. Use when facing critical decisions, architecture choices, security tradeoffs, or plan reviews where single-perspective analysis is insufficient.
Background worker, heartbeat, stale-run, crash-recovery, and deadletter workflow. Use when debugging stuck/dead workers or changing async run reliability.
Child Pi worker spawning, lifecycle callbacks, and failure modes.