Skip to main content
ClaudeWave
Skill1.1k repo starsupdated today

oma-market

The oma-market skill classifies user intent into pain point, trend, competitor, or discovery categories, then fans out queries across community sources (Reddit, Hacker News, GitHub Issues, Bluesky, Mastodon, web) via deterministic CLI compute and the oma-search transport. It scores and clusters findings, applies strategic frameworks (SWOT, Porter's 5F, PESTEL) automatically, and outputs a single markdown brief with voice-of-customer signals, competitive positioning, and market trends. Use this when extracting real user pain points from communities, detecting category trends over time windows, analyzing competitor sentiment, or conducting open-ended market discovery research.

Install in Claude Code
Copy
git clone --depth 1 https://github.com/first-fluke/oh-my-agent /tmp/oma-market && cp -r /tmp/oma-market/.agents/skills/oma-market ~/.claude/skills/oma-market
Then start a new Claude Code session; the skill loads automatically.

SKILL.md

# Market Research Agent - Community Signal Intelligence

## Scheduling

### Goal
Classify user intent into pain / trend / competitor / discovery, fan-out to community sources via `oma search fetch`, score and cluster findings with deterministic CLI compute, auto-apply strategic frameworks, and emit a single LAW-compliant markdown brief.

### Intent signature
- User asks about pain points, user complaints, or voice-of-customer signals for a product or category.
- User asks what is trending, growing, or declining in a space this week or month.
- User asks how one product compares to another in community sentiment or positioning.
- User asks for discovery or exploratory market research on a topic.

### When to use
- Extracting real user pain points from community posts (Reddit, HN, GitHub Issues, Bluesky, Mastodon)
- Detecting trends in a product category over a time window (7d / 30d / 90d / 180d)
- Competitor sentiment analysis and SWOT positioning
- Open-ended discovery research across multiple sources

### When NOT to use
- General web research without market framing -> use oma-search directly
- Single-source queries only -> use `oma search fetch` standalone
- Delta tracking or trend velocity over time (v2 feature) -> defer
- Live dashboards or scheduled monitoring -> out of scope (v1 one-shot only)

### Expected inputs
- Topic string and optional `--intent pain|trend|competitor|discovery`
- Optional `--window 7d|30d|90d|180d` (default: `30d`)
- Optional `--sources <list>` to override defaults
- Optional `--vs <entity>` for competitor COMPARISON mode
- Optional `--frameworks auto|none|swot,5f,pestel`

### Expected outputs
- Single markdown brief at `.agents/results/market/{topic-slug}-{YYYYMMDD}.md`
- Badge first-line, `What we learned:` body opener (or COMPARISON title), engine footer
- No raw evidence dump; no Sources block; no em-dash; no `##` in body (framework/COMPARISON sections excepted)

### Dependencies
- `oma-search` for all fetches (`oma search fetch --only api`); never fetches directly
- Serena `trust-registry-cache` (read-only); Trust Registry labels inherited from oma-search
- `resources/intent-rules.md`, `resources/operator-packs/`, `resources/output-laws.md`

### Control-flow features
- Branches by classified intent, window, source availability, and env key presence
- detect-trap gate before harvest (exit 2 on broad/ambiguous topic, exit 4 on invalid)
- Paid sources (X, TikTok, Instagram, YouTube, Perplexity) auto-skip when env key absent
- Framework auto-toggle by intent (see Routes table)

## Structural Flow

### Entry
1. Run `oma market detect-trap "<topic>"` to preflight the query.
2. Classify or confirm intent from user prompt or `--intent` flag.
3. Select operator pack and framework set for the intent.

### Scenes
1. **PREPARE**: Parse topic and flags; run detect-trap; resolve intent, operator pack, window.
2. **ACT**: Build per-source `oma search fetch` URLs with operator pack query expansion.
3. **ACQUIRE**: Fan-out harvest via `oma market harvest` (parallel, per-source-limit 12, cache TTL 15m).
4. **VERIFY**: Score, fuse, and cluster candidates; validate JSON at each pipe stage.
5. **FINALIZE**: Render LAW-compliant markdown brief; run self-check; write to output path.

### Transitions
- If detect-trap exits 2 (REFUSE), surface reframe suggestion and halt.
- If all sources blocked, exit 2 with per-source diagnostics.
- If partial harvest failure, proceed; render annotates "coverage: N/M sources".
- If zero clusters, emit preview message and suggest wider window.
- If `--vs <entity>` flag is present, switch to COMPARISON template.

### Failure and recovery
- detect-trap exit 2: surface REFUSE reason and suggested reframe; do not proceed to harvest.
- Network timeout (exit 6): report and suggest `--window` reduction or `--no-cache`.
- Invalid JSON from any pipe stage: exit 4 with offending line in stderr.
- Render LAW self-check violation: strip or regenerate; exit 1 only if regeneration also fails.
- FS permission denied at write: exit 5.

### Exit
- Success: brief file written; first 50 lines previewed; engine footer present.
- Partial success: source failures and framework skips are explicit in footer and stderr.

## Logical Operations

### Actions
| Action | SSL primitive | Evidence |
|--------|---------------|----------|
| Run detect-trap preflight | `VALIDATE` | Topic arg, trap pattern rules |
| Classify intent | `SELECT` | Intent rules, user flags |
| Select operator pack | `SELECT` | `resources/operator-packs/` |
| Fan-out harvest | `CALL_TOOL` | `oma market harvest` -> `oma search fetch` |
| Score candidates | `INFER` | Engagement weights, freshness, intent blends |
| Fuse and deduplicate | `INFER` | URL canonicalize, RRF k=60, author cap |
| Cluster by entity overlap | `INFER` | Overlap coefficient >= 0.4, MMR lambda=0.75 |
| Select frameworks | `SELECT` | Intent-to-framework toggle table |
| Render and self-check | `WRITE` | Output LAWs, framework templates |
| Write brief | `WRITE` | `.agents/results/market/` |
| Report preview | `NOTIFY` | First 50 lines of brief |

### Tools and instruments
- `oma market detect-trap` (preflight gate)
- `oma market harvest` (delegates to `oma search fetch --only api`)
- `oma market score` (engagement weights, log1p, intent blends)
- `oma market fuse` (URL canonical, RRF, diversity guard)
- `oma market cluster` (entity overlap, MMR)
- `oma market render` (md/json, LAW self-check, file write)

### Canonical command path
```bash
TOPIC="VS Code pain points"
oma market detect-trap "$TOPIC" \
  && oma market harvest "vscode (broken OR bug OR migrate OR quit OR slow)" \
       --sources reddit,hn,bluesky,mastodon,github-issues --window 30d \
       --operator-pack pain \
  | oma market score --intent pain \
  | oma market fuse \
  | oma market cluster \
  | oma market render --format md --intent pain --frameworks auto
```

### Resource scope
| Scope | Resource target |
|-------|-----------------|
| `NETWORK` | Community sour
oma-academic-writerSkill

>

oma-architectureSkill

Architecture specialist for software/system design, module and service boundaries, tradeoff analysis, and stakeholder synthesis. Uses context-aware methods such as diagnostic routing, design-twice comparison, ATAM-style risk analysis, CBAM-style prioritization, and ADR-style decision records.

oma-backendSkill

Backend specialist for APIs, databases, authentication with clean architecture (Repository/Service/Router pattern). Use for API, endpoint, REST, database, server, migration, and auth work.

oma-brainstormSkill

Design-first ideation that explores user intent, constraints, and approaches before any planning or implementation. Use for brainstorming, ideation, exploring concepts, and evaluating approaches.

oma-coordinationSkill

Guide for coordinating PM, Frontend, Backend, Mobile, and QA agents on complex projects via CLI. Use for manual step-by-step coordination and workflow guidance.

oma-dbSkill

Database specialist for SQL, NoSQL, and vector database modeling, schema design, normalization, indexing, transactions, integrity, concurrency control, backup, capacity planning, data standards, anti-pattern review, and compliance-aware database design. Use for database, schema, ERD, table design, document model, vector index design, RAG retrieval architecture, migration, query tuning, glossary, capacity estimation, backup strategy, database anti-pattern remediation work, and ISO 27001, ISO 27002, or ISO 22301-aware database recommendations.

oma-debugSkill

Bug diagnosis and fixing specialist - analyzes errors, identifies root causes, provides fixes, and writes regression tests. Use for bug, debug, error, crash, traceback, exception, and regression work.

oma-deepsecSkill

>