name: context-discovery description: Discover context files for a task. Use when you need coding standards, security patterns, workflows, or project-specific context before implementing a feature. Invokes the context-scout subagent to find and rank relevant files from .opencode/context/. context: fork
Purpose: Discover and load context files before implementing features. This skill invokes the
context-scoutsubagent to find relevant standards, patterns, and workflows from.opencode/context/.
Invoke /context-discovery when you need to:
Rule of thumb: If you're about to write code or create a plan, discover context FIRST.
This skill runs in the context-scout subagent (isolated context) and:
.opencode/context/navigation.md/context-discovery [what you're implementing]
Examples:
/context-discovery authentication system
/context-discovery React component with animations
/context-discovery task breakdown workflow
/context-discovery TypeScript coding standards
The context-scout subagent returns a ranked list of context files:
# Context Files Found
## Critical Priority
**File**: `.opencode/context/core/standards/code-quality.md`
**Contains**: Code quality standards, functional patterns, error handling
**Why**: Defines coding patterns you must follow for all implementations
## High Priority
**File**: `.opencode/context/core/standards/security-patterns.md`
**Contains**: Security best practices, auth patterns, data protection
**Why**: Important for secure implementation
## Medium Priority
**File**: `.opencode/context/core/workflows/approval-gates.md`
**Contains**: When to request approval before execution
**Why**: Helps you know when to pause for approval
---
**Summary**: Found 3 context files. Start with Critical priority files.
Read every file marked as Critical Priority before proceeding:
Read: .opencode/context/core/standards/code-quality.md
Read: .opencode/context/core/standards/security-patterns.md
These files contain must-follow standards and patterns.
Read High Priority files for important context:
Read: .opencode/context/core/workflows/approval-gates.md
These files provide strongly recommended guidance.
Read Medium Priority files if you need additional context:
Read: .opencode/context/project-intelligence/architecture.md
These files are helpful but not required.
When you need to delegate work to another subagent (e.g., coder-agent, task-manager), include the discovered context files in your delegation:
Invoke task-manager subagent:
**Task**: Break down authentication system into subtasks
**Context to load first**:
- .opencode/context/core/standards/code-quality.md
- .opencode/context/core/standards/security-patterns.md
- .opencode/context/core/workflows/task-delegation-basics.md
**Instructions**: Create subtask files following the task.json schema. Apply security patterns from context.
Invoke coder-agent subagent:
**Task**: Implement JWT authentication service
**Context to load first**:
- .opencode/context/core/standards/code-quality.md
- .opencode/context/core/standards/security-patterns.md
- .opencode/context/core/standards/typescript.md
**Instructions**: Follow functional patterns and security best practices from loaded context.
This skill is part of the 6-stage OAC workflow:
/context-discovery to find relevant context/task-breakdown to create subtasksYou: "I need to implement user authentication"
Action:
/context-discovery user authentication
Result: Context-scout finds security patterns, coding standards, auth workflows
Next Steps:
You: "I'm not sure how to structure this React component"
Action:
/context-discovery React component patterns
Result: Context-scout finds UI patterns, React standards, component structure guides
Next Steps:
You: "I need to break down a complex feature"
Action:
/context-discovery task breakdown workflow
Result: Context-scout finds task delegation guides, subtask schemas, workflow patterns
Next Steps:
/task-breakdown with contextCause: Context hasn't been downloaded yet
Solution: Run /oac:setup to download context from GitHub
Cause: Request was too broad
Solution: Be more specific in your request (e.g., "TypeScript coding standards" instead of "coding")
Cause: Unclear prioritization
Solution: Always start with Critical priority files, then High, then Medium if needed
Discover context files for: $ARGUMENTS
Follow the navigation-driven discovery process and return ranked recommendations.