ln-011-agent-installer
Installs or updates Codex CLI and Claude Code. Use when CLI agents need installation or update.
- License 许可
- MIT
- 最近更新
- 2026-06-15
- Stars
- ★ 2
- Forks
- 1
01 前言 Front Matter
- name
- ln-011-agent-installer
- model
- claude-sonnet-4-6
- license
- MIT
- description
- Installs or updates Codex CLI and Claude Code. Use when CLI agents need installation or update.
02 资源文件 7
- 参考文档references/audit_scoring.md1.1 KB
- 参考文档references/audit_summary_contract.md2.2 KB
- 参考文档references/audit_worker_core_contract.md1.8 KB
- 参考文档references/coordinator_summary_contract.md1009 B
- 参考文档references/environment_worker_runtime_contract.md1.6 KB
- 参考文档references/templates/audit_worker_report_template.md1.6 KB
- 参考文档references/worker_runtime_contract.md1.7 KB
03 SKILL.md 正文
Paths: File paths (
references/) are relative to this skill directory.
Agent Installer
Type: L3 Worker Category: 0XX Shared
Installs or updates the two supported CLI agents: Codex CLI and Claude Code. Single pass per agent: install then immediately verify.
MANDATORY READ: Load references/coordinator_summary_contract.md, references/environment_worker_runtime_contract.md, and references/worker_runtime_contract.md
Input / Output
| Direction | Content |
|---|---|
| Input | OS info, disabled flags per agent, dry_run flag, optional runId, optional summaryArtifactPath |
| Output | Structured summary envelope with payload.status = completed / skipped / error, plus per-agent install outcomes in changes / detail |
If summaryArtifactPath is provided, write the same summary JSON there. If not provided, return the summary inline and remain fully standalone. If runId is not provided, generate a standalone run_id before emitting the summary envelope.
Runtime
Runtime family: environment-worker-runtime
Phase profile:
PHASE_0_CONFIGPHASE_1_INSTALL_VERIFYPHASE_2_POST_CODEX_SANITY_CHECKPHASE_3_WRITE_SUMMARYPHASE_4_SELF_CHECK
Runtime rules:
- emit
summary_kind=env-agent-install - standalone runs generate their own
run_idand write the default worker-family artifact path - managed runs require both
runIdandsummaryArtifactPathand must write the summary to the exact provided path - always write the validated summary artifact before terminal outcome
Output Contract
Always build a structured env-agent-install summary envelope per:
references/coordinator_summary_contract.mdreferences/environment_worker_runtime_contract.md
Payload fields:
targetsagents_processedagents_skippedversionscodex_drift_detectedstatus
Agent Registry
| Agent | Install Command | Health Check | Interactive |
|---|---|---|---|
| Codex | npm i -g @openai/codex |
codex --version |
codex or codex "prompt" |
| Claude | npm i -g @anthropic-ai/claude-code or claude update |
claude --version |
claude or claude "prompt" |
Automation uses:
- Codex:
codex exec ... - Claude:
claude -p ...
Note: codex / codex "prompt" are interactive TTY entrypoints. Non-interactive validation and review automation must use codex exec ..., because Codex rejects direct interactive mode when stdin is not a terminal.
Workflow
For each enabled agent: Install or Update -> Verify -> Record
Phase 1: Install & Verify
For each agent in registry, apply first matching rule:
| Condition | Action | Report |
|---|---|---|
disabled: true |
SKIP | disabled by user |
dry_run: true |
Show planned command | dry run |
| Codex | npm install -g @openai/codex then codex --version |
version or error |
| Claude installed | claude update then claude --version |
version or error |
| Claude missing | npm install -g @anthropic-ai/claude-code then claude --version |
version or error |
Single pass: install and verify happen atomically per agent. No separate scan phase; the install result is the state.
Error handling:
| Error | Detection | Response |
|---|---|---|
| npm not in PATH | npm --version fails |
FAIL gracefully, report npm not found in PATH |
| Permission denied | stderr contains EACCES |
FAIL, suggest npm install -g --prefix ~/.local {pkg} |
| Network error | stderr contains ETIMEDOUT or ENETUNREACH |
FAIL, report network error |
| Unknown error | Any other non-zero exit | FAIL, include stderr |
Output table:
Agent Installation:
| Agent | Action | Version | Status |
|--------|-----------|----------|--------|
| Codex | installed | 0.124.0 | ok |
| Claude | updated | 2.1.119 | ok |
Phase 2: Post-Install Codex Sanity Check
After successful Codex install/update:
- Check
~/.codex/config.tomltop-levelapproval_policyandsandbox_mode. - Check configured Codex marketplaces for duplicate active paths to this repo.
- If drift is found, report a WARN and defer remediation to
ln-013-config-syncer.
This installer does not install marketplace plugins, rewrite Codex marketplace layout, or manage Codex execution defaults. It only reports drift so install success is not mistaken for a healthy two-agent environment.
Critical Rules
- Never modify
disabledflags. Respect them, never change them. - Fail gracefully. One agent failure does not block the other.
- Global install only. CLI tools must be in PATH.
- Report all changes. Include config observations in the final summary table.
- Idempotent. Safe to run multiple times.
- Claude and Codex only. Do not add unrelated agent branches.
- Codex marketplace/plugin and execution-default remediation belongs to ln-013. This skill may detect drift, but must not rewrite marketplace/cache layout or Codex top-level permission defaults itself.
Anti-Patterns
| DON'T | DO |
|---|---|
| Separate check/install/verify phases | Single pass: install then verify |
| Retry failed installs automatically | One attempt, report failure |
Use sudo npm install |
Suggest --prefix for permission issues |
Install agents marked disabled |
Skip with clear report |
| Configure MCP settings or marketplace plugins here | Route environment alignment to ln-013-config-syncer |
Definition of Done
- [ ] Codex and Claude processed in single pass (install + verify)
- [ ] Disabled agents skipped with report
- [ ] Version verified immediately after each install
- [ ] Codex marketplace/plugin and execution-default sanity checked or explicitly reported for ln-013 follow-up
- [ ] Status table displayed
- [ ] Structured summary returned
- [ ] Summary artifact written to the managed or standalone runtime path
Version: 1.1.0 Last Updated: 2026-03-23
04 同仓库更多 Skills
solana-dev
Use when user asks to "build a Solana dapp", "write an Anchor program", "create a token", "debug Solana errors", "set up wallet connection", "test my Solana program", "deploy to devnet", or "explain Solana concepts" (rent, accounts, PDAs, CPIs, etc.). End-to-end Solana development playbook covering wallet connection, Anchor/Pinocchio programs, Codama client generation, LiteSVM/Mollusk/Surfpool testing, and security checklists. Integrates with the Solana MCP server for live documentation search. Prefers framework-kit (@solana/client + @solana/react-hooks) for UI, wallet-standard-first connection (incl. ConnectorKit), @solana/kit for client/RPC code, and @solana/web3-compat for legacy boundaries.
generating-trading-signals
Generate trading signals using technical indicators (RSI, MACD, Bollinger Bands, etc.). Combines multiple indicators into composite signals with confidence scores. Use when analyzing assets for trading opportunities or checking technical indicators. Trigger with phrases like "get trading signals", "check indicators", "analyze for entry", "scan for opportunities", "generate buy/sell signals", or "technical analysis".
prediction-monitor
Prediction Monitor - Auto-activating skill for ML Deployment. Triggers on: prediction monitor, prediction monitor Part of the ML Deployment skill category.
strategy-advisor
High-level strategic thinking and business decision guidance for planning and direction-setting. Use when: making strategic decisions, evaluating business options, setting direction, analyzing trade-offs, or when user mentions strategy, business planning, competitive analysis, or long-term planning.
app-paywall-pilot
Design, audit, debug, and implement App Store-compliant mobile paywalls, subscription flows, pricing screens, trials, offers, feature gates, and subscription lifecycle UX. Use when the user asks to audit my paywall, fix App Store 3.1.2 rejection, improve trial-to-paid, choose plans/prices/trials, review RevenueCat/Adapty/Apphud/Superwall setup, calculate LTV/ROAS, or build paywall implementation.
figma
Use the Figma MCP server to fetch design context, screenshots, variables, and assets from Figma, and to translate Figma nodes into production code. Trigger when a task involves Figma URLs, node IDs, design-to-code implementation, or Figma MCP setup and troubleshooting.