threads — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited threads (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Use this skill to turn a broad request into controlled Codex-native subthreads with explicit lanes, file ownership, review gates, and verifiable closure.
Native Codex threads are short-lived parallel work lines inside the Codex workflow. They are not the same as OMX/tmux workers. If native subagent tools are not visible, discover them with tool search. If no native subagent capability is available, produce the thread prompt pack and execution plan instead of pretending threads were launched.
single_agent, plan_only, execute_direct, review_only, research_spec, or clarify_first.thread_dispatch_gate and spawn required native lanes before implementation.queue_gate, queue_ledger, and issue_to_pr_map.threads_run_log; write durable JSONL for queue, multi-lane, push, comment, or merge-capable runs.Do not use this skill for generic uses of "thread" unless the user explicitly means Codex workflow orchestration:
Choose one mode:
Use single_agent only for one-file fixes, simple questions, or tasks where the next step depends on one immediate result. If the user explicitly asks for threads, subagents, or a GitHub issue/PR queue and native subagents are available, do not silently choose single_agent; record a concrete no_spawn_reason before implementation work begins.
For any implementation mode, start with a lane map before spawning workers. For GitHub issue/PR queues, complete the Capability Gate and Queue Gate first; do not create worker lanes until capability_gate, queue_gate, queue_ledger, and issue_to_pr_map are written.
When the user explicitly asks for threads, subagents, "开几个子 agent", or a GitHub issue/PR queue that the skill classifies as plan_only, execute_direct, review_only, or research_spec, native dispatch is required whenever native subagent tools are available.
Record this gate before implementation, review, or merge work:
thread_dispatch_gate:
- explicit_thread_request: yes | no
- native_subagents: available | unavailable
- spawn_requirement: required | optional | unavailable
- fallback_mode: single_agent | prompt_pack_only | none
- planned_native_threads:
- id:
role:
target:
write_scope: read_only | disjoint_writable | none
spawn_status: planned | spawned | skipped
no_spawn_reason:
- native_thread_evidence:
user_requested_native_threads: yes | no
spawned_agents:
- lane_id:
spawn_tool:
agent_id_or_thread_id:
wait_evidence:
close_evidence:
result_collected: yes | no
fallback_reason:
- no_spawn_reason:Rules:
explicit_thread_request: yes, native_subagents: available, and spawn_requirement: required, spawn at least one bounded native subagent before claiming the run is using threads.native_subagents: available plus fallback_mode: none is valid only when native_thread_evidence.spawned_agents contains at least one real agent/thread ID.planned_native_threads lane must have a matching native_thread_evidence.spawned_agents[].lane_id or a lane-level no_spawn_reason; spawning one native thread does not justify running the remaining planned lanes serially.native_thread_evidence.spawned_agents.fallback_mode: single_agent and write no_spawn_reason before editing files, commenting on GitHub, or merging. Valid reasons are narrow: task is tiny and truly sequential, all possible writable lanes overlap, native tools are unavailable, or the user explicitly asks not to spawn.single_agent only after saying that no native threads were launched.Before dispatch, record this block as intent_contract:
intent_contract:
goal:
non_goals:
done_when:
merge_policy: no_merge | merge_after_gate | user_confirm_before_merge
remote_truth_required: yes | no
truth_level: A | B | C | D
queue_ledger: required_for_queue | optional | none
ci_truth_source: discovered_workflow | user_supplied | language_default | none
data_collection: final_report | local_jsonl | none
active_skill_source: path | source_sha | unknown
queue_bounds:
max_items:
time_budget:
queue_tranche:
remote_refresh:
cadence:
last_fetch:
stale_base_policy:
thread_dispatch:
explicit_thread_request:
spawn_requirement:
no_spawn_reason:Defaults:
merge_policy is no_merge unless the user explicitly authorizes merging in the current conversation.data_collection is local_jsonl for GitHub issue/PR queues, multi-lane runs, or any run that may push/comment/merge; use final_report only for tiny read-only/single-agent runs or explicit user opt-out.unknown rather than guessing.Direct actions: inspect repo instructions, fetch remote state, map lanes, apply the Explicit Thread Dispatch Gate, spawn required bounded native subagents, integrate results, verify, and report closure.
Escalate before: modifying high-context files, merging without fresh CI/review-thread truth, sharing writable files across workers, or switching to shell/tmux/OMX orchestration.
Evidence-backed pushback: choose single_agent only when parallelism adds coordination risk without independent work, and record the no_spawn_reason; challenge vague worker output, stale remote state, or unverified completion claims.
Feedback loop: record notable failures in threads_run_log, classify the failure mode, tighten the lane prompt or split, then retry only after the hypothesis changes.
If the user asks for issue/PR queue handling, remote_truth_required is yes and queue_ledger is required_for_queue.
Broad queue requests such as "all issues and PRs" are bounded by default. If the user did not give an explicit long-run budget, choose one smallest mergeable tranche, record max_items / time_budget / queue_tranche, and leave the remaining queue for the next run with exact next actions.
Before dispatching lanes, record whether native Codex subagents are actually available:
capability_gate:
- native_subagents: available | unavailable
- tools_seen:
- explicit_thread_request: yes | no
- spawn_requirement: required | optional | unavailable
- fallback_mode: single_agent | prompt_pack_only | none
- no_spawn_reason:
- manual_orchestration_allowed: yes | noRules:
spawn_requirement is required, do not proceed past planning until at least one native subagent is spawned or fallback_mode and no_spawn_reason are recorded.fallback_mode is single_agent, explain why parallelism was rejected.fallback_mode is prompt_pack_only, output exact lane prompts and stop before implementation.For GitHub issue/PR queue handling, write a queue_gate block before the lane map and before any implementation worker is launched. This is mandatory even when all open PRs look MERGEABLE or CLEAN.
The gate must use live state from the current session:
queue_gate:
- fetched_remote:
- truth_level:
- remote_refresh:
base_ref:
owner_lane:
origin_main_sha:
local_base_sha:
stale_base:
policy:
- current_branch:
- dirty_files:
- unpushed_commits:
- worktrees:
- open_prs:
- open_issues:
- pr_classification:
- PR:
head_sha:
merge_state:
check_rollup:
review_threads:
classification:
reason:
- issue_to_pr_map:
- issue:
covering_pr:
status: covered | uncovered | stale_or_superseded | needs_human_decision
reason:
- recommended_order:
- stop_conditions:Classify every open PR as exactly one of:
merge_readyreview_thread_blockedci_failedconflict_blockedstale_or_supersededneeds_human_decisionRules:
MERGEABLE or CLEAN is never sufficient by itself. A PR is merge_ready only when the current head SHA, check rollup, merge state, and GraphQL review-thread state are all fresh and clean.reviewThreads { isResolved isOutdated }; flat PR comments are not sufficient.maintainerCanModify: true, update that PR before opening a maintainer replacement unless the branch is unsafe, unwritable, or the user approves replacement.Use the highest truth level available from the current session and record it in intent_contract, queue_gate, and threads_run_log:
git fetch plus GitHub API or GraphQL can prove current PR head, check rollup, merge state, and review-thread state. Implementation, review, and merge gates may proceed if all other conditions pass.git fetch plus REST PR/review/comment data is available, but GraphQL review-thread state is unavailable. Implementation and review may proceed; merge is forbidden.plan_only or prompt_pack_only; do not implement, push, merge, or claim closure.Never fabricate remote state to reach a higher level. If the tool or permission gap matters, report the lower level and the blocked operation.
For issue/PR queues, keep a live queue ledger from discovery through final closure. The ledger can be a concise table in the conversation, a local durable log, or both, but it must survive handoff and compaction when the run is long.
Use these fields:
queue_ledger:
- item:
type: issue | pr | review_thread | local_task
remote_state:
owner_lane:
dependencies:
base_ref:
branch:
worktree:
writable_files:
pr:
head_sha:
ci_status:
review_thread_state:
acceptance_evidence:
merge_sha:
closed_by:
remote_checked_at:Rules:
origin/main, rebase or recreate the lane only after recording the dependency and checking for changed files.Fixes #... or close an issue until each meaningful acceptance point is mapped to evidence: changed files, tests, commands, PR, commit, or remote state.Long queue runs must refresh remote state without mutating worker worktrees:
git fetch --prune origin at queue start, before opening a new lane, before pushing, before merge review, and after long waits such as CI polling. For runs longer than one focused tranche, refresh at least every 20-30 minutes.origin/main SHA with each lane's recorded base_ref. Do not automatically merge or rebase during a lane.origin/main advanced, record stale_base: yes in queue_gate, queue_ledger, and threads_run_log.stale_remote_state when upstream changes overlap the lane, alter CI, or invalidate the acceptance evidence.single_agent tasks unless the task touches GitHub remote state.Write a short lane map before dispatch:
mode:
repo:
base_ref:
global_constraints:
verification_owner:
stop_conditions:
lanes:
- id:
role: planner | worker | reviewer | merge_reviewer | researcher
target:
depends_on:
execution_mode: parallel | serial_after_dependency | read_only_until_dependency
base_gate:
worktree:
writable_files:
forbidden_files:
exclusive_verification:
verification_scope: inspection_only | targeted | full_local | ci_only
expected_output:
verification:
native_thread_id:
no_spawn_reason:Rules:
queue_gate; no worker lane may start from open issue/PR lists alone.read_only_until_dependency until the upstream head is pushed and the base_gate is satisfied. Downstream planners may inspect and prepare a patch plan in parallel, but they must not edit files before the gate opens.base_gate must name the upstream condition that makes a downstream writable lane safe to start: current head SHA recorded, upstream CI/targeted verification status known, dirty upstream worktree absent or committed, and overlapping files checked.native_thread_id: none; every spawned lane must record the returned native tool agent ID.AGENTS.md, CLAUDE.md, settings, hooks, and setup scripts in forbidden_files unless the user explicitly asks to modify them.origin/main or the requested base.base_gate opens. Avoid starting writable downstream work on a stale base; if early exploration is useful, use a read-only planner lane instead..git/hooks, shared $HOME files, global caches, local daemons, or repo-level generated state belong to verification_owner and must not run in parallel lanes unless that mutable state is isolated.Choose parallelism on demand after the lane map, not by default.
Use parallel writable workers only when all are true:
depends_on edge exists between the lanesUse serial writable workers when any lane depends on another lane's branch, PR, generated output, CI result, review result, schema migration, shared setup/install behavior, or version bump. In that case, run the upstream writable lane first, record its head SHA and verification, then create or rebase the downstream worktree from that stable head.
Use parallel read-only planners/reviewers for dependent work only when they do not edit files or mutate GitHub state. Their output should be a patch plan, risk map, or review findings that can be applied after the upstream gate opens.
For stacked PRs:
stale_base and the recovery decision in queue_ledger and threads_run_log.Use verification_scope to keep review evidence useful without duplicating expensive full-suite work:
inspection_only: read-only diff/code inspection. Cheap static checks such as git diff --check are allowed when they are relevant.targeted: focused tests or linters for touched behavior only.full_local: one owner runs the project-wide local suite for the tranche, usually the root orchestrator, verification_owner, or a merge_reviewer.ci_only: fresh CI tied to the current head SHA is the full-suite truth source.Rules:
inspection_only or targeted. They must not run full project test suites unless the lane map explicitly names them as verification_owner or merge_reviewer.cargo test command, or use a broader module/path filter; do not pass several unrelated test names as positional filters in one command.verification_owner lane.Use native subagents when available. If the multi-agent tool is not loaded, search for it using tool discovery. Do not use shell/tmux/OMX orchestration unless explicitly requested.
When multi_agent_v1 tools are available, use spawn_agent for required bounded sidecar lanes, wait_agent only when the next critical-path step needs that result, and close_agent after collecting completed output. Keep immediate blockers in the main thread, but do not count the main thread as a spawned native thread.
Close completed subagents as soon as their evidence has been collected. For long issue/PR queues, finish a bounded tranche, record the ledger and resume query, and consider starting a fresh parent thread instead of carrying oversized context forward.
Use these lane types:
Load prompt-patterns.md when you need ready-to-use prompts for planners, workers, reviewers, or research lanes.
Every lane output must be evidence-bearing:
lane:
root_cause_or_claim:
files_read:
files_changed:
unauthorized_or_unassigned_changes:
commands_run:
head_sha_or_artifact:
native_thread_id:
blockers:Do not merge from worker output alone. Merge only after:
merge_policy is merge_after_gate or user_confirm_before_merge with explicit authorization from the current conversation.truth_level is A; lower truth levels may produce recommendations but must not merge.MERGEABLE, CLEAN, or a green check alone is not sufficient without the matching current head SHA, full check rollup, merge state, and GraphQL review-thread state.reviewThreads { isResolved isOutdated }; flat PR comments are not sufficient.reviewThreads result as clean. If a GitHub/Codex review connector was requested or is expected, do not merge until current-head connector completion is proven. Record no_connector_expected only after checking that no connector was requested or expected for the current head.REVIEW_LOOP after two repeated fix/review cycles on the same class of review-thread finding unless the hypothesis changes.WAITING_CI when there is no actionable local failure. Report PR number, head SHA, pending checks, last observed status, and the exact resume query.origin/main advanced and overlaps the PR scope, stop with stale_remote_state until the branch is rebased or recreated.If the user asked for “review then merge,” the merge reviewer should be a separate lane from the implementation worker.
For non-trivial runs, include a compact threads_run_log block in the final report. For GitHub queues, multi-lane runs, or any run that may push/comment/merge, append the same JSON object locally with scripts/append_run_log.py unless the user opts out; record no_log_reason when final-report-only is used. Read run-log.md before writing durable logs.
Run logs are observational. Do not record secrets, credentials, full prompts, or private user data. Prefer short summaries, file paths, PR/issue numbers, command names, failure codes, and verification outcomes.
End with a compact status table:
completed:
- lane:
result:
artifact:
verification:
merged:
- PR:
commit:
remaining:
- blocker_or_risk:
next_action:
remote_truth:
- open_prs:
- open_issues:
- checked_pr_heads:
- checked_review_threads:
- checked_ci:
- origin_main_sha:
- stale_base:
- remote_refreshes:
active_skill_source:
- path:
- source_sha:
local_state:
- dirty_worktree:
- stale_worktree:
- high_context_file:
threads_run_log:
- mode:
- native_subagents:
- explicit_thread_request:
- spawn_requirement:
- native_thread_evidence:
spawned_agents:
- no_spawn_reason:
- truth_level:
- lanes_total:
- queue_items_total:
- queue_bounds:
queue_tranche:
- failure_codes:
- verification:
fresh:
- remote_closure:
checked:
- run_log:
path:
write_status:
no_log_reason:Separate remote truth from local machine state in all GitHub queue final reports. State when a branch is merged remotely but local main is stale, dirty, diverged, or a worktree branch is no longer tied to an open remote branch.
For GitHub queue work, include remote closure fields:
remote_closure:
- open_prs:
- open_issues:
- touched_pr_unresolved_review_threads:
- touched_pr_unanswered_review_comments:
- historical_unresolved_review_threads:
- deleted_remote_branches:
- local_cleanup_left:stale_remote_state and refresh/rebase only through an explicit gate; do not silently continue on a stale base.evals/evals.json; use them when changing the skill description, dispatch modes, or near-boundary "thread" wording.~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.