market — Claude Code rule: market research and installation
This rule routes market research through the last30days engine, from query checks to a saved brief. It applies to trend scans, competitor research, and market discovery.
MIT ★ 1,472 updated 2026-11-05
/plugin marketplace add first-fluke/oh-my-agent
/plugin install oma@oh-my-agentWhat market does
Every research task starts with oma market detect-trap. If the check rejects a query, the agent must show the user a reframed version; bypassing it requires --force and renewed explicit consent. The rule resolves the last30days engine and calls it through oma market run rather than building a separate collection or clustering pipeline.
On each run, the agent reads the engine’s SKILL.md and follows its workflow, including query planning and output requirements. If the engine is missing, Python 3.12+ is unavailable, or execution fails, the task stops. A WebSearch-only summary does not count as market research under this rule. Projects without Python 3.12+ cannot complete the engine run.
The brief goes to .agents/results/market/{topic-slug}-{YYYYMMDD}.md; raw engine files go to market.save_dir, whose default is .agents/results/market/raw/. First-run setup, credential storage, and a Python install managed by uv require user approval. Queries targeting private individuals’ personal data are rejected before the engine starts.
What it helps with
- screen a research query for traps before collecting results
- run market research through the
last30daysengine - build SWOT or PESTEL sections from engine output clusters
- save a research brief and raw engine files to configured paths
Example prompts for the agent
- Research trends around local AI editors and save a market brief.
- Compare task-planning competitors and add a SWOT based on the resulting clusters.
- Check this market research query and suggest a reframe if it fails the initial screen.
How to install market
1Plugin marketplace
/plugin marketplace add first-fluke/oh-my-agent/plugin install oma@oh-my-agent2Manually: put the files in place
.claude/rules/market.mdThe paths frontmatter field limits the files
AGENTS.md
Codex reads AGENTS.md: paste the rule text there
Manually: put the files in place
.cursor/rules/market.mdcFrontmatter: description, globs, alwaysApply
Manually: put the files in place
.github/instructions/market.instructions.mdThe applyTo field sets which files it applies to
Manually: put the files in place
.devin/rules/market.mdManually: put the files in place
.clinerules/market.mdStep by step, with commands for each platform: AGENTS.md vs CLAUDE.md: what they are and which one to use
Questions about market
How do I install market in Claude Code?
Run /plugin marketplace add first-fluke/oh-my-agent, then /plugin install oma@oh-my-agent. The rule file is .claude/rules/market.md.
What does the market rule do?
It sets the checks and workflow for research through the last30days engine, along with the brief’s format and location. A summary based only on WebSearch violates the rule.
What does market need to run?
The last30days engine and Python 3.12+ are required. Sources that need keys are enabled through the engine’s setup wizard with user consent.
Source text
market.md · MIT
---
description: Market research standards - trap detection, installed last30days engine, framework layer, LAW enforcement
globs:
alwaysApply: false
---
# Market Research Standards
## Core Rules
1. **Preflight first**: every market research task starts with `oma market detect-trap`. If it refuses, surface the reframe to the user — never bypass without `--force` and explicit user reconfirmation.
2. **One engine, installed as a skill**: research runs on the upstream `last30days` engine through `oma market run`. `oma market resolve` finds the copy installed through the skills CLI (or a `market.path` / `LAST30DAYS_HOME` pin); `oma market update` installs it when missing (`bunx skills add mvanhorn/last30days-skill --skill last30days -g -y`) and otherwise updates it. Install only after the user agrees. Do not hand-roll harvesting, scoring, or clustering.
3. **Follow the upstream contract**: read the resolved engine's `SKILL.md` (`engine.skillMd`) top to bottom every run and follow it — setup wizard, pre-research resolution, query plan, PRECONDITION GATE, OUTPUT CONTRACT. The only substitutions are skipping its Python-hunt block and replacing the raw `python3 scripts/last30days.py` call with `oma market run` (same arguments).
4. **Never WebSearch-only**: if the engine cannot run (no engine, no Python 3.12+, non-zero exit), stop and report; a WebSearch-only synthesis presented as market research is a contract violation.
5. **Keyless-first**: Reddit, HN, GitHub, Polymarket, arXiv, Techmeme, Digg, and web run without keys. Keyed sources (X, TikTok, Instagram, YouTube transcripts, …) are enabled only through the upstream setup wizard with user consent; skipped sources stay visible in the footer.
6. **Frameworks cite the engine**: SWOT / Porter's 5F / PESTEL sections use only clusters present in the engine output, cited as `[name](url)`; plain text when a URL is missing, never `[name]()`. Auto-toggle: pain/trend → SWOT; competitor → SWOT + 5F; discovery → SWOT + PESTEL; `--frameworks` overrides.
7. **LAW enforcement**: the engine's badge is the first line; upstream LAWs 1–8 plus `resources/output-laws.md` self-check must pass before the file is written.
8. **Single brief, single date**: `.agents/results/market/{topic-slug}-{YYYYMMDD}.md`; raw engine files under `market.save_dir` (default `.agents/results/market/raw/`). Same-day rerun overwrites.
9. **Personal data refuse**: refuse queries that target a private individual's personal data before running the engine. Founders, creators, and public handles are allowed (upstream person mode).
10. **Side effects are consented**: first-run `.env` creation, credential storage, and a `uv`-managed Python install happen only after the user says yes in the upstream Step 0 flow.
© First Fluke · MIT · first-fluke/oh-my-agent