ryderfreeman4logos/cli-sub-agent/sa
Claude Code and agent skill by ryderfreeman4logos/cli-sub-agent
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Checking that the SKILL.md file is still in the repository.
Use when: three-layer manager-employee orchestration for delegation
Install
npx vskill@latest install ryderfreeman4logos/cli-sub-agent/saSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
sa: Manager-Employee Orchestration (Three-Layer Model)
Three-layer recursive delegation for planning and implementation with strict role boundaries.
- Layer 0 is the Department Manager: dispatches work, reads structured reports, makes approval decisions.
- Layer 1/Layer 2 are Employees: execute work autonomously and return self-contained reports.
This skill exists to keep the main agent out of code-level work.
Core Metaphor
Operating Contract
<prompt-guard name="hook-bypass-forbidden"> ABSOLUTE PROHIBITION on ALL hook bypass methods. You MUST NOT:
- Use
--no-verifyor-nwithgit commitorgit push - Set
LEFTHOOK=0environment variable (e.g.,env LEFTHOOK=0 git commit,export LEFTHOOK=0) - Set
LEFTHOOK_SKIPenvironment variable - Modify
.git/hooks/*files to disable or weaken hooks - Set
core.hooksPathto an empty or permissive directory - Use ANY other mechanism that prevents Lefthook/pre-commit hooks from running
All quality hooks MUST be allowed to run. Bypassing hooks is a critical SOP violation.
When just pre-commit fails:
- Code quality issues (clippy, fmt, test) → FIX the code, do NOT bypass
- Environment/sandbox limitations → report status="needs_clarification" with exact error, do NOT bypass
- Pre-existing failures from unrelated crates → report as blocker with exact error, do NOT bypass
NEVER treat pre-existing failures as justification for LEFTHOOK=0. </prompt-guard>
Layer 0 Manager: What You MUST Do
- Dispatch work with clear task contracts.
- Require self-contained
result.tomlfrom every employee run. - Base decisions on reports, not direct code inspection.
- Gate transitions: APPROVE / MODIFY / REJECT / ESCALATE.
- If confidence is low, trigger cross-review by another employee.
- After PR creation, invoke `/pr-bot` — this is MANDATORY. The pr-bot skill handles
@codex reviewtriggering, polling (10 min timeout), fallback to local review, and the full bot review loop. Layer 1 executors MUST invoke this skill; it is NOT optional.
Small Task Fast Path (COST OPTIMIZATION)
When ALL of the following are true, Layer 0 MAY execute directly instead of dispatching CSA:
- Scope: total change is ≤30 lines across ≤3 files
- Complexity: mechanical edit (config field addition, rename, flag wiring, template update)
- Context: relevant code is already in the main agent's context window
- Risk: no security-sensitive paths, no cross-crate architectural changes
In fast-path mode, Layer 0 may:
- Read/edit the specific files being changed (not exploratory reading)
- Run
just pre-committo validate - Commit directly on the feature branch
Layer 0 MUST still delegate via CSA when:
- Change exceeds 30 lines or 3 files
- Design judgment is required (which approach? which abstraction?)
- Security-sensitive code paths are involved
- User explicitly requested SA mode or CSA delegation
Layer 0 Manager: What You MUST NEVER Do (Full SA Mode)
When NOT in small-task fast path, these absolute prohibitions apply:
- NEVER
Readsource files (*.rs,*.ts,*.py, etc.). - NEVER
Grep/Globsource code. - NEVER run build/lint/test commands.
- NEVER run git investigation commands (
git diff,git show, etc.) to verify quality. - NEVER read CSA transcript logs.
- NEVER read artifact contents (
TODO.md,review.md,design.md, etc.). - NEVER write/edit code files.
- NEVER run
csa revieworcsa debateas self-investigation. - NEVER replace employee verification with personal inspection.
Layer 0 may only:
- Run
csa runto dispatch employee tasks. - Read manager-facing structured report files (
result.tomlfrom primary/verification runs). - Write temporary prompt files for dispatch.
- Use task tracking tools (
TaskCreate/TaskUpdate). - Ask user decisions/questions via
AskUserQuestion. - Present artifact paths only (never artifact content).
- Summarize report conclusions to the user; never forward raw artifact content.
Layer 1/Layer 2 Employees: Autonomy Rules
Employees are professionals with subjective agency.
- Manager specifies WHAT; employee decides HOW.
- Employee chooses implementation details (algorithms, structures, error handling).
- Employee may delegate to lower tiers as needed.
- If requirements are ambiguous, employee returns
status = "needs_clarification"with concrete questions.
Review/Debate Dispatch Discipline (MANDATORY)
For review tasks, Layer 0 MUST dispatch csa review. For debate tasks, Layer 0 MUST dispatch csa debate.
Layer 0 MUST NOT hand-write a csa run prompt that approximates review/debate unless the built-in command is blocked by a concrete, documented error.
In slow Rust repositories, a healthy review/debate session can take 30-60 minutes. Sparse early output or csa session wait timing out is not failure by itself.
While the original session is healthy, Layer 0 MUST keep waiting on the same session id. It MUST NOT launch a second review/debate flow for the same scope unless there is strong evidence of failure: explicit crash/error, persistent liveness failure, or direct user instruction.
Exploration Tool Preference (MANDATORY)
For codebase exploration (searching code, reading multiple files, understanding architecture), Layer 1 and Layer 2 employees MUST prefer `csa run` over Claude Code's built-in `Agent` tool with `subagent_type=Explore` when a supported CSA routing tool is available. Codex and OpenCode can be cheaper than Claude tokens, and CSA tools have large context windows for processing many files simultaneously. Reserve the built-in Explore agent only for quick searches that need <3 queries.
Structured Communication Protocol
Manager -> Employee (Dispatch Packet)
Every task prompt MUST include:
- Objective
- Input context
- Output format
- Scope boundaries
- DONE WHEN (mechanically verifiable)
Example DONE WHEN:
DONE WHEN: result.toml exists at $CSA_RESULT_TOML_PATH_CONTRACT and status is success.DONE WHEN: just pre-commit exits 0 and result.toml status is success.
Employee -> Manager (result.toml)
Employees MUST return a self-contained report that allows manager decision without opening any source/artifact content. Employees MUST write this file to $CSA_RESULT_TOML_PATH_CONTRACT (fallback: $CSA_SESSION_DIR/result.toml) and print that path only. Every attempt-bound receipt MUST copy $CSA_RESULT_TOML_ATTEMPT_NONCE into [result].attempt_nonce; CSA rejects a receipt without the current nonce.
Required schema:
Clarification extension (when status = "needs_clarification"):
Decision Rules for Manager
Given result.status:
success: summarizeresult.summary+report.what_was_doneto user; continue workflow.partial: summarize completed scope and unresolved risks; ask user whether to continue.needs_clarification: ask user the employee's listed questions; do not proceed until answered.error: reporterror_code+ summary; ask user whether to retry, narrow scope, or stop.
Manager decision must rely on report fields, not source inspection.
Trust Verification (Cross-Review, Not Self-Investigation)
When manager confidence is low, manager assigns an independent employee review.
Trigger Conditions
- Employee report has unclear risk statements.
- Work is high-impact/security-sensitive.
- Contradictory findings across runs.
- User explicitly asks for independent verification.
Verification Workflow
Manager still MUST NOT inspect source code or diffs directly.
End-to-End Workflow
Phase 1: Planning
Phase 2: Implementation
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingpatterns/sa/skills/sa/SKILL.md
Popularity
- Repository stars
- 12
- Repository forks
- 1
- 7-day trend score
- 13
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 6 Aug 2026, 3 months ago.
Extension points
hookPre/post lifecycle hooks
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/ryderfreeman4logos/cli-sub-agent/sa)