skill-context-detection
Auto-detect work context (Dev vs Knowledge) — use to tailor workflows based on current task type
Skill by GongYuanCaiJi
Chalk Labs
Need help deploying skill-context-detection?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/gongyuancaiji-skill-context-detection
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: productivity
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions: not checked yet.
What's inside
- Skill name
skill-context-detection- Description
- Auto-detect work context (Dev vs Knowledge) — use to tailor workflows based on current task type
- License
- MIT
- Instructions
- 270 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Context Detection - Internal Skill
## Purpose
This skill provides **automatic context detection** to determine whether the user is working in a **Development context** (code-focused) or **Knowledge context** (research/strategy-focused). This replaces the manual `/octo:km` toggle with intelligent auto-detection.
## Detection Algorithm
When a workflow skill activates, detect context using these signals:
### Step 1: Check for Explicit Override
If user has explicitly set mode via `/octo:km on` or `/octo:km off`, respect that setting.
```bash
# Check if knowledge mode is explicitly set
if [[ -f ~/.claude-octopus/config/knowledge-mode ]]; then
EXPLICIT_MODE=$(cat ~/.claude-octopus/config/knowledge-mode)
if [[ "$EXPLICIT_MODE" == "on" ]]; then
echo "knowledge"
exit 0
elif [[ "$EXPLICIT_MODE" == "off" ]]; then
echo "dev"
exit 0
fi
fi
# If "auto" or not set, proceed with auto-detection
```
### Step 2: Analyze Prompt Content (Strongest Signal)
**Knowledge Context Indicators** (check prompt for these terms):
- Business/strategy: "market", "ROI", "stakeholders", "strategy", "business case", "competitive"
- Research: "literature", "synthesis", "academic", "papers", "research question"
- UX: "personas", "user research", "journey map", "pain points", "interviews"
- Deliverables: "presentation", "report", "PRD", "proposal", "executive summary"
**Dev Context Indicators** (check prompt for these terms):
- Technical: "API", "endpoint", "database", "function", "class", "module"
- Actions: "implement", "debug", "refactor", "test", "deploy", "build"
- Artifacts: "code", "tests", "migration", "schema", "controller"
**Scoring:**
- Count knowledge indicators in prompt
- Count dev indicators in prompt
- Higher count wins
- If tied, check project context (Step 3)
### Step 3: Analyze Project Context (Secondary Signal)
**Dev Project Indicators:**
- Has `package.json`, `Cargo.toml`, `go.mod`, `pyproject.toml`, `pom.xml`
- Has `src/`, `lib/`, `app/` directories with code files
- Recent files are `.ts`, `.js`, `.py`, `.go`, `.rs`, `.java`
**Knowledge Project Indicators:**
- Has `docs/`, `research/`, `strategy/`, `reports/` directories
- Majority of files are `.md`, `.docx`, `.pdf`, `.pptx`
- No code package managers detected
### Step 4: Default Fallback
If signals are ambiguous or equal:
- In a git repo with code files → Default to **Dev Context**
- No code files detected → Default to **Knowledge Context**
---
## Context Output Format
Return detected context as a structured object for use by workflow skills:
```json
{
"context": "dev" | "knowledge",
"confidence": "high" | "medium" | "low",
"signals": {
"prompt_indicators": ["API", "endpoint", "database"],
"project_type": "node_typescript",
"explicit_override": false
}
}
```
---
## How Workflow Skills Use Context
### flow-discover (Research)
| Aspect | Dev Context | Knowledge Context |
|--------|-------------|-------------------|
| **Research Focus** | Technical implementation, library comparison, code patterns | Market analysis, academic synthesis, competitive research |
| **Primary Agents** | Codex (implementation), Antigravity (ecosystem) | Antigravity (analysis), research-synthesizer |
| **Output Format** | Code examples, API comparisons, tech recommendations | Reports, frameworks, strategic recommendations |
| **Visual Banner** | `🔍 [Dev] Discover Phase: Technical research` | `🔍 [Knowledge] Discover Phase: Strategic research` |
### flow-develop (Build)
| Aspect | Dev Context | Knowledge Context |
|--------|-------------|-------------------|
| **Build Focus** | Code generation, implementation, architecture | PRDs, strategy docs, presentations |
| **Primary Agents** | Codex (code), backend-architect, tdd-orchestrator | product-writer, strategy-analyst, exec-communicator |
| **Output Format** | Source files, tests, migrations | Documents, frameworks, action plans |
| **Visual Banner** | `🛠️ [Dev] Develop Phase: Building code` | `🛠️ [Knowledge] Develop Phase: Building deliverables` |
### flow-deliver (Review)
| Aspect | Dev Context | Knowledge Context |
|--------|-------------|-------------------|
| **Review Focus** | Code quality, security, performance | Document quality, argument strength, completeness |
| **Primary Agents** | code-reviewer, security-auditor | exec-communicator, strategy-analyst |
| **Quality Gates** | OWASP, test coverage, maintainability | Evidence quality, clarity, actionability |
| **Visual Banner** | `✅ [Dev] Deliver Phase: Code review` | `✅ [Knowledge] Deliver Phase: Document review` |
---
## Visual Indicator UpdateFrom GongYuanCaiJi/dsh-claude-octopus, MIT.
More from GongYuanCaiJi/dsh-claude-octopus
- 0.511score
skill-authoring
GongYuanCaiJi
Principles for writing skills that behave the same way every run — use when adding, editing, or reviewing a skill in this plugin
SkillBFreshness: BClaude Code +9 - 0.504score
skill-agent-topology
GongYuanCaiJi
Audit whether a multi-agent setup earns its coordination cost — use before adding an agent, or when a workflow feels slow or agents agree without adding signal
SkillBFreshness: BClaude Code +9 - 0.496score
flow-deliver
GongYuanCaiJi
Multi-AI validation, scoring, and review using available external providers (Double Diamond Deliver phase)
SkillBFreshness: BClaude Code +9 - 0.492score
skill-debate
GongYuanCaiJi
Structured multi-provider AI debates between Claude and available advisors — use for critical decisions
SkillBFreshness: BClaude Code +9 - 0.270score
flow-define
GongYuanCaiJi
No description from the publisher yet.
SkillBFreshness: BClaude Code +9 - 0.270score
flow-develop
GongYuanCaiJi
No description from the publisher yet.
SkillBFreshness: BClaude Code +9 - 0.270score
flow-discover
GongYuanCaiJi
No description from the publisher yet.
SkillBFreshness: BClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Aug 15, 2026 (2 months ago)
- Last release
- Aug 15, 2026 (2 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
More from GongYuanCaiJi
- 0.525score
domain-modeling
GongYuanCaiJi
Build and sharpen a project's domain model.
SkillBFreshness: B★ 3Claude Code +9 - 0.525score
codebase-design
GongYuanCaiJi
Shared vocabulary for designing deep modules.
SkillBFreshness: B★ 3Claude Code +9 - 0.514score
implement
GongYuanCaiJi
Implement a piece of work based on a spec or set of tickets.
SkillBFreshness: B★ 3Claude Code +9 - 0.511score
skill-authoring
GongYuanCaiJi
Principles for writing skills that behave the same way every run — use when adding, editing, or reviewing a skill in this plugin
SkillBFreshness: BClaude Code +9 - 0.511score
graph-query
GongYuanCaiJi
Query the code graph database to understand component relationships, dependencies, and change impact.
SkillBFreshness: BClaude Code +9 - 0.511score
planning
GongYuanCaiJi
Create and manage persistent markdown planning files for structured task execution.
SkillBFreshness: BClaude Code +9
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get skill-context-detection running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
skill-context-detection. Agent Mart. https://agentmart.dev/skills/gongyuancaiji-skill-context-detection (last updated 2026-10-24)