agentsclimarketplace

Claude cli

Skill namos2502/CortexLink/skills/agents/claude-cli

A simple plugin for CLI AI agents to stream lining cross-agent workflows

Install
npx -y skills add namos2502/CortexLink --skill claude-cli

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

This skill should be used when delegating general code tasks — explanations, refactors, fixes, analysis — via `claude -p`. Also use when context isolation or a specific Anthropic model is needed for the subtask.

SKILL.md

8.0 KB, ~2.0k tokens by cl100k_base, as published. Nobody here has run it

Claude CLI Agent

When to Use

⛔ If the host is Claude Code: use Claude CLI only when you specifically need context isolation or a different Anthropic model AND native tools (Task tool, inline work) are insufficient. Claude Code → Claude CLI is last resort. Prefer Copilot CLI for GitHub tasks; prefer Claude Code's native Task tool for general code tasks.


Use Claude CLI for:

  • General code tasks — explanations, refactors, fixes, analysis
  • Tasks needing Anthropic-specific models (Sonnet, Opus, Haiku)
  • Context isolation — offload long subtasks without polluting the host context
  • Tasks where you want a different model than the host is running

Do NOT use Claude CLI for:

  • GitHub-specific tasks (PRs, repos, Actions) — use Copilot CLI
  • Tasks that need your current session context or open files
  • When Claude CLI is not installed or not authenticated

Core Flags

FlagPurpose
-p "PROMPT"Print mode — non-interactive, exits when done
--output-format textPlain text output (default — easiest to parse)
--output-format jsonStructured JSON with metadata
--no-session-persistenceDo not save session to disk — keeps scripted calls clean
--max-turns NCap agentic turns — prevents runaway tasks
--bareMinimal mode: skip auto-discovery of hooks, skills, plugins, MCP servers, auto memory, and CLAUDE.md so scripted calls start faster. Claude has access to Bash, file read, and file edit tools

Tool Permissions

FlagPurpose
--allowedTools "TOOL"Tools that auto-execute without a permission prompt
--disallowedTools "TOOL"Tools removed from the model's context entirely
Use caseFlags
Questions, analysis--allowedTools "Read"
Modify existing files--allowedTools "Read" "Edit"
Create + modify files--allowedTools "Read" "Edit" "Write"
Create + modify files + run commands--allowedTools "Read" "Edit" "Write" "Bash(git *)"
Explicitly block shell--disallowedTools "Bash"

"Edit" modifies existing files. "Write" creates new files — add it when the task may need to create files.

Shell access (Bash(...)) is a separate, deliberate decision. Use --disallowedTools "Bash" to prevent any shell execution, even if the model tries.

Safety Flags

FlagPurpose
--max-budget-usd NCap API spend (e.g. --max-budget-usd 0.50)
--effort LEVELSet the effort level: low, medium, high, xhigh, max — available levels depend on the model. Session-scoped, does not persist
--permission-mode planRead-only planning mode — no writes or shell, overrides --allowedTools
--append-system-prompt "TEXT"Inject task-specific instructions into the system prompt

Model & Effort Selection

Model IDs are versioned and change with releases. Run claude models to get current names.

Task complexityModelEffort
Standard — analysis, single fix--model sonnet(default)
Complex — multi-step, judgment calls--model sonnet--effort high (or xhigh/max)
Quick availability check / ping--model <fastest-available>(default)

Use short aliases (sonnet, opus) for the latest version, or full IDs to pin a specific model. Omit --effort to use the model default. --effort is only available for Claude models — omit it when using non-Claude models. Complexity levels are defined in the orchestration skill.

Working Directory

Claude CLI is sandboxed to its working directory — the same restriction as Copilot CLI.

Always invoke from the repo root. Use --cwd or cd before invoking.

claude -p "..." --cwd $(git rev-parse --show-toplevel) --output-format text ...

Invocation Patterns

Always include --append-system-prompt with the CortexLink agent context below. This teaches the agent the report format and self-verify protocol via the system prompt — separate from the task prompt.

CORTEXLINK_AGENT_CONTEXT="You are operating as a CortexLink agent. Your output is consumed directly by a control center. Execute the task, verify your own work (Execute → Verify → fix if needed → Report), then return ONLY this structured report — plain text labels, no bold, no headers:\nSTATUS: ✅ Verified / ⚠️ Partial / ❌ Failed\nSUMMARY: <1-2 sentences>\nSTEPS:\n  - <step>\nFILES: <changed files or none>\nISSUES: <notes or none>\nMax 150 words. Never mark ✅ without actually checking. For analysis tasks, ✅ = completed the analysis even if you cannot run the code."

Read-only delegation (question, analysis):

claude -p "[delegation prompt]" --output-format text \
  --cwd $(git rev-parse --show-toplevel) \
  --allowedTools "Read" --model claude-haiku-4-5 \
  --no-session-persistence --max-turns 3 \
  --append-system-prompt "$CORTEXLINK_AGENT_CONTEXT"

Write delegation (fix, implement):

claude -p "[delegation prompt]" --output-format text \
  --cwd $(git rev-parse --show-toplevel) \
  --allowedTools "Read" "Edit" "Write" \
  --no-session-persistence \
  --append-system-prompt "$CORTEXLINK_AGENT_CONTEXT"

Write delegation + shell (runs commands):

claude -p "[delegation prompt]" --output-format text \
  --cwd $(git rev-parse --show-toplevel) \
  --allowedTools "Read" "Edit" "Write" "Bash(git *)" \
  --no-session-persistence \
  --append-system-prompt "$CORTEXLINK_AGENT_CONTEXT"

Planning / analysis only (no writes):

claude -p "[delegation prompt]" --output-format text \
  --cwd $(git rev-parse --show-toplevel) \
  --permission-mode plan --no-session-persistence --max-turns 5 \
  --append-system-prompt "$CORTEXLINK_AGENT_CONTEXT"

Piped input:

cat file.ts | claude -p "[delegation prompt]" --output-format text \
  --cwd $(git rev-parse --show-toplevel) \
  --allowedTools "Read" --no-session-persistence \
  --append-system-prompt "$CORTEXLINK_AGENT_CONTEXT"

Delegation Prompt

Follow the template from skills/orchestration/SKILL.md. Include the structured report format instructions at the end of every prompt.

Status semantics for analysis tasks:

  • ✅ Verified = you read the code and completed the analysis — even if you cannot run it
  • ⚠️ Partial = you could not access required files, or the diff was truncated
  • ❌ Failed = the gh command failed or the diff was inaccessible

⛔ Do NOT use ⚠️ just because you cannot execute the code being reviewed. Static analysis that is complete = ✅.

Handling the Report

The agent's stdout is its report. Capture it directly:

REPORT=$(claude -p "[prompt]" --output-format text \
  --cwd $(git rev-parse --show-toplevel) \
  --allowedTools "Read" --no-session-persistence \
  --append-system-prompt "$CORTEXLINK_AGENT_CONTEXT" 2>/dev/null)

Read STATUS first. If ⚠️ or ❌, read ISSUES before deciding next action.

Key Differences from Copilot CLI

Copilot CLIClaude CLI
Tool permissions--allow-tool='write, read'--allowedTools "Read" "Edit"
Prevent questions--no-ask-userimplied by -p
Working directorycd $(git rev-parse --show-toplevel) &&--cwd PATH
Model flag--model=<model-id>--model <model-id>

Error Handling

FailureAction
Command not foundTell user: npm install -g @anthropic-ai/claude-code
Auth failureTell user: claude auth login then re-run /cortexlink:setup
Budget exceededIncrease --max-budget-usd or handle natively
Unexpected outputRetry once. If still failing, handle natively.

Chaining

Pass the SUMMARY + STEPS excerpt from this agent's report as [Context] in the next delegation prompt. Do not pass raw output.

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.