flow-discover
Multi-AI research using Codex and Gemini CLIs (Double Diamond Discover phase)
What this skill does
> **Host: Codex CLI** โ This skill was designed for Claude Code and adapted for Codex.
> Cross-reference commands use installed skill names in Codex rather than `/octo:*` slash commands.
> Use the active Codex shell and subagent tools. Do not claim a provider, model, or host subagent is available until the current session exposes it.
> For host tool equivalents, see `skills/blocks/codex-host-adapter.md`.
{{PREAMBLE}}
## Compaction-Resistant Contract
- Dispatch MUST go through background agents that call `${HOME}/.claude-octopus/plugin/scripts/orchestrate.sh probe-single`; direct single-model research is not a valid substitute.
- Use the dynamic fleet from `build-fleet.sh`; the plugin can route across Codex, Gemini, Copilot, Qwen, OpenCode, Ollama, Perplexity, OpenRouter, Cursor Agent, and Claude depending on local availability.
- Before synthesis, run `${HOME}/.claude-octopus/plugin/scripts/orchestrate.sh agent-summary` and use only providers reported as `ok`, `degraded`, or `timeout` with usable output.
- For `standard` and `deep` research, require at least 2 usable provider outputs unless fewer providers are installed; failed/rejected providers are reported as gaps, not cited as evidence.
## Pre-Discovery: Project Initialization
Before starting discovery:
1. Check if `.octo/` directory exists
2. If NOT exists: Call `./scripts/octo-state.sh init_project` to create it
3. Update `.octo/STATE.md`:
- current_phase: 1
- phase_position: "Discovery"
- status: "in_progress"
```bash
# Check and initialize .octo/ state
if [[ ! -d ".octo" ]]; then
echo "๐ Initializing .octo/ project state..."
"${HOME}/.claude-octopus/plugin/scripts/octo-state.sh" init_project
fi
# Update state for Discovery phase
"${HOME}/.claude-octopus/plugin/scripts/octo-state.sh" update_state \
--phase 1 \
--position "Discovery" \
--status "in_progress"
```
## Native Plan Mode Compatibility (v7.23.0+)
**IMPORTANT:** claude-octopus workflows are designed to persist across context clearing.
### Detecting Native Plan Mode
Check if native plan mode is active:
```bash
# Check for native plan mode markers
if [[ -n "${PLAN_MODE_ACTIVE}" ]] || claude-code plan status 2>/dev/null | grep -q "active"; then
echo "โ ๏ธ Native plan mode detected"
echo ""
echo " Claude Octopus uses file-based state (.claude-octopus/)"
echo " State will persist across plan mode context clears"
echo " Multi-AI orchestration will continue normally"
echo ""
fi
```
### State Persistence Across Context Clearing
**How it works:**
- Native plan mode may clear Claude's memory via `ExitPlanMode`
- claude-octopus state persists in `.claude-octopus/state.json`
- Each workflow phase reads prior state at startup
- Context is automatically restored from files
**No action required** - state management handles this automatically via STEP 3 in the execution contract.
## โ ๏ธ EXECUTION CONTRACT (MANDATORY - CANNOT SKIP)
This skill uses **ENFORCED execution mode**. You MUST follow this exact sequence.
### STEP 1: Detect Work Context (MANDATORY)
Analyze the user's prompt and project to determine context:
**Knowledge Context Indicators**:
- Business/strategy terms: "market", "ROI", "stakeholders", "strategy", "competitive", "business case"
- Research terms: "literature", "synthesis", "academic", "papers", "personas", "interviews"
- Deliverable terms: "presentation", "report", "PRD", "proposal", "executive summary"
**Dev Context Indicators**:
- Technical terms: "API", "endpoint", "database", "function", "implementation", "library"
- Action terms: "implement", "debug", "refactor", "build", "deploy", "code"
**Also check**: Does project have `package.json`, `Cargo.toml`, etc.? (suggests Dev Context)
**Capture context_type = "Dev" or "Knowledge"**
**DO NOT PROCEED TO STEP 2 until context determined.** Context type (Dev vs Knowledge) determines which provider prompts to use โ wrong context produces irrelevant research that wastes provider credits.
### STEP 2: Display Visual Indicators (MANDATORY - BLOCKING)
**MANDATORY: You MUST use the native shell command tool to run this provider check BEFORE displaying the banner. Do NOT skip it. Do NOT assume availability.**
```bash
bash "${HOME}/.claude-octopus/plugin/scripts/helpers/check-providers.sh"
```
**Use the ACTUAL results below. PROHIBITED: Showing only "๐ต Claude: Available โ" without listing all providers.**
If `OCTO_ALLOWED_PROVIDERS` is set, treat it as the source of truth for which providers may participate. Providers filtered out by that allowlist are intentionally reported as unavailable; do not invoke or recommend them in the workflow.
**Display this banner BEFORE orchestrate.sh execution:**
**For Dev Context:**
```
๐ **CLAUDE OCTOPUS ACTIVATED** - Multi-provider research mode
๐ [Dev] Discover Phase: [Brief description of technical research]
Provider Availability:
๐ด Codex CLI: ${codex_status}
๐ก Gemini CLI: ${gemini_status}
๐ฃ Perplexity: ${perplexity_status}
๐ต Claude: Available โ (Strategic synthesis)
๐ฐ Estimated Cost: $0.01-0.08
โฑ๏ธ Estimated Time: 2-5 minutes
```
**For Knowledge Context:**
```
๐ **CLAUDE OCTOPUS ACTIVATED** - Multi-provider research mode
๐ [Knowledge] Discover Phase: [Brief description of strategic research]
Provider Availability:
๐ด Codex CLI: ${codex_status}
๐ก Gemini CLI: ${gemini_status}
๐ฃ Perplexity: ${perplexity_status}
๐ต Claude: Available โ (Strategic synthesis)
๐ฐ Estimated Cost: $0.01-0.08
โฑ๏ธ Estimated Time: 2-5 minutes
```
**DO NOT PROCEED TO STEP 3 until banner displayed.** The banner shows users which providers will run and what costs they'll incur โ starting API calls without this visibility violates cost transparency.
### STEP 3: Read Prior State (MANDATORY - State Management)
**Before executing the workflow, read any prior context:**
```bash
# Initialize state if needed
"${HOME}/.claude-octopus/plugin/scripts/state-manager.sh" init_state
# Set current workflow
"${HOME}/.claude-octopus/plugin/scripts/state-manager.sh" set_current_workflow "flow-discover" "discover"
# Get prior decisions (if any)
prior_decisions=$("${HOME}/.claude-octopus/plugin/scripts/state-manager.sh" get_decisions "all")
# Get context from previous phases
prior_context=$("${HOME}/.claude-octopus/plugin/scripts/state-manager.sh" read_state | jq -r '.context')
# Display what you found (if any)
if [[ "$prior_decisions" != "[]" && "$prior_decisions" != "null" ]]; then
echo "๐ Building on prior decisions:"
echo "$prior_decisions" | jq -r '.[] | " - \(.decision) (\(.phase)): \(.rationale)"'
fi
```
**This provides context from:**
- Prior workflow phases (if resuming a session)
- Architectural decisions already made
- User vision captured in earlier phases
- If **claude-mem** is installed, its MCP tools (`search`, `timeline`, `get_observations`) are available โ use them to check for relevant past session context before launching research agents
**DO NOT PROCEED TO STEP 4 until state read.**
### STEP 3.5: Parse Intensity & Build Agent Fleet (MANDATORY)
**Parse the `breadth` and `intensity` parameters from the skill args.** The args string may start with `[breadth=light|standard|exhaustive]` and/or `[intensity=quick|standard|deep]`. If only breadth is specified, map `light -> quick`, `standard -> standard`, and `exhaustive -> deep`. If neither is specified, default to `"standard"` (backward compatible with `/octo:embrace` which doesn't pass intensity).
**Build the fleet dynamically using `build-fleet.sh`** โ this is the single source of truth for provider-to-perspective assignment. It detects ALL available providers (codex, gemini, copilot, qwen, opencode, ollama, perplexity, openrouter) and assigns perspectives with model family diversity enforcement.
```bash
FLEET_OUTPUT=$("${HOME}/.claude-octopus/plugin/scripts/helpers/build-fleet.sh" research "${INTENSITY}" "${PROMPT}" 2>/dev/null)
```
The output is one line per agent: `agent_type|label|perspective_prompt`
**Parse each liRelated in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts โ single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score โฅ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.